Python Tag plugin : Is it possible to disable(ghost) the host object's parameters?
-
Hello Hi Dear....
In a Python Tag plugin, is it possible to disable (ghost) the host object's parameters? GetDEnabling only allowed disabling the tag's own options.
Is there a way to do this?
ex) the tag disables some options of the Bend object.def GetDEnabling(self, node, id, t_data, flags, itemdesc) : #disable --> DEFORMOBJECT_ALIGNMENT DEFORMOBJECT_FITTOPARENT DEFORMOBJECT_MODE def Execute(self, op, doc, host, bt, priority, flags): doc = c4d.documents.GetActiveDocument() bend = op.GetObject()
Thank You....
-
Hey @ymoon,
thank you for reaching out to us. While you can access the description of a scene element at any time via
c4d.C4DAtom.GetDesccription
, it will always be static, i.e., read only there. Only in the context ofNodeData.GetDEnabling
andNodeData.GetDDescription
, the description of a node will be dynamic (that is what the 'D' stands for in these methods), i.e., writeable.It is therefore only possible to runtime modify the description of nodes you do implement yourself. Otherwise the system would inevitably produce race conditions. Where a parameter X of an object O being shown or not, would depend on how two objects A (wants to show O.X) and B (wants to hide O.X) are placed in relation to O in the object manager; and which of (A, B) is therefore executed first and which last.
There is one exception to that rule, and this is user data, accessible via GetUserDataContainer (Python) and C4DAtom::GetDynamicDescription(Writeable) (C++), here you can always modify the description. There is however no direct flag in the description to disable an element, the closest thing you can do, is hide an element with
DESC_HIDE
.Cheers,
Ferdinand -
@ferdinand
Thank you for your kind explanation. I will explore other options.