DeepSOIC / Part-o-magic

Experiment on FreeCAD-wide automation of Part container management. For FC v0.17-0.18
Other
12 stars 4 forks source link

Body can't be seen after uninstalling Part-o-magic #11

Open galou opened 7 years ago

galou commented 7 years ago

I was surprised no to see a body even after having used the "Fix and resave" option in the dialog that appears when you want to save a file with an active body. I decided that I'd prefer not to use Part-o-magic for now and uninstalled it. After uninstallation, the body can't be made visible again! Body activation doesn't help.

How can I recover my file?

DeepSOIC commented 7 years ago

Hi! Part-o-magic changes Body into a "Tip" state. Select Body, and on view tab, change "Display Mode Body" property to "Through". Also, check that objects are selectable (on view tab).

I just wrote up a console snippet to automate this:

for obj in App.ActiveDocument.Objects:
    if hasattr(obj.ViewObject, "DisplayModeBody"):
        obj.ViewObject.DisplayModeBody = "Through"
    if hasattr(obj.ViewObject, "Selectable"):
        obj.ViewObject.Selectable = True

Please report if it helps. If not, please share your project.

galou commented 7 years ago

Hi DeepSOIC, thanks a lot, this worked excellently! And thanks for writing Part-o-magic beyond other many stuff for FreeCAD!

DeepSOIC commented 7 years ago

Great, thanks. I'll explain this in PoM thread, then.