Object Plugin - Generator Objects - Hiding the child objects in Editor View
-
Hi,
Happy New YearI have an internal development question.
How does this work, for example with Generators such as the Boole Object or Spline-Mask, when two objects are under the Bool-Object as childs, but these are no longer visible in their original form in the Editor View? But only the newly created object. They have to be hidden somehow but they are still visible in the Object Manager.
- How does this work exactly?
- Does this happen when registering the plugin with the method and specifying the info argument and type
plugins.RegisterObjectPlugin(info=type))
- Or do they have to be saved in a variable and deleted somehow or is there a Function to make them invisible?
Just to get the idea?
-
Hi @ThomasB,
~~these generators are (probably) plugins of type
ObjectData
. These plugins implement theGetVirtualObjects
method which returns what will be drawn on the screen, and only this will be drawn with complete disregard of the children. They do use their children as inputs to generate the result which you then see but the children themselves are not returned byGetVirtualObjects
.See also the documentation on
ObjectData
.~~Seems I was wrong about this, sorry. Maybe this plays together with
TouchDependenceList
but I'm not sure so I'll just keep my mouth shut now.Cheers,
Daniel -
@CJtheTiger
thanks
But that doesn't seem to work because if, for example, I create an object plug-in that returns a cube in the GetVirtualObjects() method and I assign 2 objects to this plug-in in the Object Manager, then I still see the child objects in the editor window.Do I have to set a parameter or a flag somewhere to specify the ObjectPlugin somehow?
-
Hi there is 2 options, the first one is to pass the flag
OBJECT_INPUT
when used withOBJECT_GENERATOR
this will force the generator to touch the children object.The second option, is to manually touch the object either by calling BaseObject.Touch or via a DependencyList as explained in this C++ manual (all methods exist in Python)
Touching an object means destructing its cache (so if there is no cache, there is nothing to show...), it also define BIT_CONTROLOBJECT on the child object and finally it reset it's dirty state.
Cheers,
Maxime. -
@m_adam
Thank you very much Maxime.
But there is one more thing I would like to know.
Why don't the highlighted links work? I am always referred to this site. -
Hey @ThomasB,
That has nothing to do with the highlighting but with the fact that Maxime used incorrect links.
developers.maxon.net/docs/
links will only work from outside of the forum. Inside the forum you currently have to usedvelopers.maxon.net/assets/docs/
as otherwise nodebb is trying to take over the routing. I am working on fixing that issue.I have fixed both links of Maxime.
Cheers,
Ferdinand