Plugin hiding children/turning visibility off
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/07/2012 at 01:36, xxxxxxxx wrote:
Hey guys.
I tried to wrap my head around this and haven't found a solution. I want to write a plugin that uses multiple splines as input and spits out a new connected spline. Input splines are children of the plugin-object. Is there any way to turn their visbility off or hide them without using the c4d.ID_BASEOBJECT_VISIBILITY_EDITOR, c4d.ID_BASEOBJECT_VISIBILITY_RENDER attributes?
For example the internal Spline-Mask does it the way I want: children are hidden, only the newly generated spline is visible. But if I selected one of the two input-splines I see their points and can still edit them.
Is there a way to achieve something similar with python?
Thanx in advance
Phil -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/07/2012 at 03:08, xxxxxxxx wrote:
Look into the Py-SpherifyModifier example plugin. You have to register your plugin with
c4d.OBJECT_MODIFIER and override c4d.plugins.ObjectData.ModifyObject().-Nik
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/07/2012 at 04:23, xxxxxxxx wrote:
Hi Nik.
Thanks for the answer. I have already looked at the sphere-deformer but this plugin only modifies the given objects, I want to create a new spline. Therefore according to the documentation I would need the OBJECT_INPUT flag along with an OBJECT_GENERATOR flag.
Quote from the documentation:
"OBJECT_INPUT
Used in combination with OBJECT_GENERATOR. Specifies that the generator uses builds a polygon or spline, using its subobjects as input. (E.g. Sweep NURBS, Boolean.)"
Now this is exactly what I want, just without seeing the subobjects (and without using the previously mentioned visibility-attributes.) -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/07/2012 at 06:24, xxxxxxxx wrote:
Take a look at NewDependenceList, AddDependence, and TouchDependenceList.
What you do in your GetVirtualObjects routine is create a dependence list, add each child object of the plugin object to that list, and then call TouchDependenceList. Despite the odd names, and the poor SDK explanation, what that does is hide your input objects and replace them with the generated object.
You'll have to experiment with it and read around it - but there must be an example in the Python SDK examples. See the C++ docs and examples as well.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/07/2012 at 08:23, xxxxxxxx wrote:
Yeah, that's what I'm looking for. Not very good to find in the doc without knowing what one is looking for.
Thank you very much, it's working.