Skip to content

Commit

Permalink
Merge pull request #4225 from Russ4262/patch-1
Browse files Browse the repository at this point in the history
Path: Centroid post - Fix isinstance() `item.Proxy` error
  • Loading branch information
sliptonic committed Dec 31, 2020
2 parents f9bcfad + 08ec99a commit ecfd3e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Mod/Path/PathScripts/post/centroid_post.py
Expand Up @@ -169,7 +169,11 @@ def export(objectslist, filename, argstring):
# Write the preamble
if OUTPUT_COMMENTS:
for item in objectslist:
if isinstance(item.Proxy, PathScripts.PathToolController.ToolController):
if hasattr(item, "Proxy"):
itm_trgt = item.Proxy
else:
itm_trgt = item
if isinstance(itm_trgt, PathScripts.PathToolController.ToolController):
gcode += ";T{}={}\n".format(item.ToolNumber, item.Name)
gcode += linenumber() + ";begin preamble\n"
for line in PREAMBLE.splitlines(True):
Expand Down

0 comments on commit ecfd3e7

Please sign in to comment.