On 22/05/2014 at 04:32, xxxxxxxx wrote:
Hi,
Could some one please help with this as I'm struggling to find examples, or more so, have found other examples but am trying to reverse engineer them to work for this situation. I have a Python Generator with the code below. I am aiming to take the child of the generator and then return a copy of it in its disconnected state. Is that possible?
Also would this be possible with a python tag alone and not a generator at all?
import c4d
from c4d import utils as u
def main() :
obj = op.GetDown()
if not obj: return
source = obj.GetClone()
bc = c4d.BaseContainer()
bc.SetData(c4d.MDATA_DISCONNECT_PRESERVEGROUPS, False)
u.SendModelingCommand(
c4d.MCOMMAND_DISCONNECT,
[source],
c4d.MODELINGCOMMANDMODE_ALL,
bc)
return source
Thanks