Returning a GetClone() weirdness

On 08/11/2013 at 11:50, xxxxxxxx wrote:

Super simple python in a Generator in R14. I added a userdata for the object, and one 'real' numbers

For some reason it doesn't seem to refresh properly. and when the real number Userdata updates it dissapears. Any ideas as to what I'm missing?

import c4d
def main() :
    someUserData = op[c4d.ID_USERDATA,2]
    obj = op[c4d.ID_USERDATA,1
    obj2 = obj.GetClone()
    obj2.Message (c4d.MSG_UPDATE)
    return obj2

Thanks for your patience, I'm learning : )

On 08/11/2013 at 20:37, xxxxxxxx wrote:

obj = op[c4d.ID_USERDATA,1 need ]

try to have console open while using python generator to view the error origin.

Ok tested in r14, not refreshing in the view but using script on the python generator return the sphere with desired radius.

working file:

On 11/11/2013 at 09:22, xxxxxxxx wrote:

Hi Focus3D,
Thanks for reply. I've opened your file, but it has the exact same problem. For instance, if you turn off the Python Generator then back on again, the sphere doesn't appear until another refresh. Tested in R14 and 15. Any thoughts?

Also I do keep the console open, it just doesn't return any errors on this one.
Thanks again.

On 11/11/2013 at 09:56, xxxxxxxx wrote:


right ?

On 11/11/2013 at 09:58, xxxxxxxx wrote:

Originally posted by xxxxxxxx


right ?

Never from an Expression/Generator/or alike. It could lock C4D in an unconditional loop of refreshes.

It works when you put the generator before the sphere in the hierarchy. Waiting for an answer from
the devs.


On 11/11/2013 at 11:11, xxxxxxxx wrote:

Got an answer. It's quite easy, the bits of the clone need to be reset. The easiest way is to pass
c4d.COPYFLAGS_NO_BITS to GetClone().

>     obj = op[c4d.ID_USERDATA,1].GetClone(c4d.COPYFLAGS_NO_BITS)


On 11/11/2013 at 12:54, xxxxxxxx wrote:

Never would have figured that out in a million years. Thanks fellas!

On 13/11/2013 at 07:55, xxxxxxxx wrote:


nice one, thanks.