Is Gui document observer possible?

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Is Gui document observer possible?

Post by DeepSOIC »

Hi!
I want to track and react to changes to visibilities of certain objects. But I don't see any way to do that, apart from adding a polling timer and check if anything has changed. So I ask, is there a way to add an observer to gui document, like one can add an observer to app document?

I want Part-o-magic's ShapeGroup to react to changes to visibilities of contained objects, and include or exclude an object from results (its own shape) depending on visibility of the objects.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Is Gui document observer possible?

Post by DeepSOIC »

Thinking about it a bit more, I think it might be possible to go with selection observer.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Is Gui document observer possible?

Post by DeepSOIC »

Well... I meant, in python :roll: but thanks anyway
Post Reply