Dis-/Enable UserData
-
On 29/01/2015 at 02:36, xxxxxxxx wrote:
Hello,
I've got the small problem of not understanding the GetDEnabling(....) function.
I wan't to dis-/enable a UserData field, currently working with "[c4d.DESC_HIDE]" provided by the forum here.
This is my small code in a PythonNode:
import c4d def main() : UD = myObject.GetUserDataContainer() #myObject is a link from the current object holding the UserData information for descId, container in UD: if descId[1].id == 2: container[c4d.DESC_HIDE] = Input1 #Input1 is the result of a Checkbox in the same UserData myObject.SetUserDataContainer(descId, container)
Now I "just" want to change hide into disable, but that seems to be a bigger problem?
-
On 29/01/2015 at 06:48, xxxxxxxx wrote:
Hi ,
'''Edit
didn´t read carefully sorry for that...please look at this thread:
~~https://developers.maxon.net/forum/topic/8350/10900_pluginsobjectdata-enablegadget-solved
~~Best wishes
Martin -
On 29/01/2015 at 07:47, xxxxxxxx wrote:
Hi,
GetDEnabling() has to be implemented in an ObjectData plugin to enable/disable user data of the object. It cannot be used to enable/disable user data on other objects.
-
On 30/01/2015 at 03:07, xxxxxxxx wrote:
and there is no way around this problem? Any ideas?
-
On 30/01/2015 at 09:09, xxxxxxxx wrote:
Originally posted by xxxxxxxx
and there is no way around this problem? Any ideas?
I'm afraid there's no workaround for this.
-
On 03/02/2015 at 21:26, xxxxxxxx wrote:
If I understand you correctly you want to enable/disable an object??
This is for a Cube, maybe this will put you on the right track.
obj = doc.SearchObject("Cube") obj[c4d.ID_BASEOBJECT_GENERATOR_FLAG,] = False