change userdata by id - update childs
-
On 06/06/2013 at 10:01, xxxxxxxx wrote:
hi
i try to change userdata by code - it work but the child don`t change - i try to use setdirty without success
fixtures[c4d.ID_USERDATA,11] = presetobejct[c4d.P_LIGHT_COLOR] fixtures.GetDown().SetDirty(0)
-
On 06/06/2013 at 10:19, xxxxxxxx wrote:
its simply :
fixtures[c4d.ID_USERDATA,11] = presetobejct[c4d.P_LIGHT_COLOR]
c4d.EventAdd()dirty flags don't do anything for them self, they only do the object to be reevaluated on
the next pass. overwriting the user data will automatically flag the object and its data
container dirty. -
On 06/06/2013 at 10:23, xxxxxxxx wrote:
i have the EventAdd 4 lines after the code - it
s don
t workthe code change the user data of the object but the child don`t get the change
-
On 06/06/2013 at 10:53, xxxxxxxx wrote:
not sure why you do think the child has to be changed, you don't do anything to the child.
you flag the first child of fixtures dirty in your example, but you haven't changed anything
in that child so the flag is pointless. -
On 06/06/2013 at 11:07, xxxxxxxx wrote:
Sorry littedevil - a few Details
The Child has own userdata - they are connect by xpresso to the Patent Object
Now i change the userdata by code of the parent obeject - there the userdata change but the userdata of the Child don't change -
-
On 06/06/2013 at 11:43, xxxxxxxx wrote:
not sure why your setup does not work, your error has to lie somewhere else.
fyi, you do not have to flag the child dirty in a xpresso scenario, as changing the
user data on your object will flag the objects base container dirty and if that
basecontainer is connected to the childs basecontainer in xpresso it will be
updated automatically. -
On 06/06/2013 at 11:44, xxxxxxxx wrote:
change by Hand - it work but Not by Code