Skip to content

Commit

Permalink
Path: Fix isinstance() item.Proxy error
Browse files Browse the repository at this point in the history
Some items in `objectList` do not contain a `Proxy` child and cause a fatal error in post processing with this post module.
  • Loading branch information
Russ4262 committed Dec 31, 2020
1 parent f9bcfad commit 08ec99a
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 08ec99a

Please sign in to comment.