THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2012 at 04:53, xxxxxxxx wrote:
hi,
i am looping through some InExcludeData data and smashing everything with SMC CSTO.
everything works as expected, but i am doing this the first time for a mograph cloner object and
this gives me some weird console output :
<c4d.SplineObject object called 'parametric/Spline' with ID 5101 at 0x000000001BB5A730>
<c4d.SplineObject object called 'basic/Spline' with ID 5101 at 0x000000001BB28CF0>
----> cloner
<dead c4d.SplineObject object at 0x000000001BB28EF0>
<dead c4d.SplineObject object at 0x000000001BB28F30>
<dead c4d.SplineObject object at 0x000000001BB28DB0>
<dead c4d.SplineObject object at 0x000000001BB28D70>
<dead c4d.SplineObject object at 0x000000001BB28CB0>
<dead c4d.SplineObject object at 0x000000001BB289F0>
what are dead splines ? i cannot insert them into the document for observation, as c4d says
ReferenceError: the object 'c4d.SplineObject' is not alive
the cloner contains only one parametric(circle) spline object, cloning it six times. CSTOing this cloner manually results in a null with six SplineObjects in it.
some code:
def getSplines(InExclude) :
result = []
for i in range (InExclude.GetObjectCount()) :
obj = InExclude.ObjectFromIndex(doc, i)
if (obj.CheckType(c4d.Ospline)) :
result.append(obj)
children = obj.GetChildren()
if(children != None) :
result += iterateObjectTree(children)
else :
smc = u.SendModelingCommand(command = c4d.MCOMMAND_CURRENTSTATETOOBJECT,
list = [obj],
doc = doc)[0]
if (smc.CheckType(c4d.Ospline)) :
result.append(smc)
children = smc.GetChildren()
if(children != None) :
result += iterateObjectTree(children)
return result
def iterateObjectTree(objectList) :
result = []
for obj in objectList:
if (obj.CheckType(c4d.Ospline)) :
result.append(obj)
children = obj.GetChildren()
if(children != None) :
result += iterateObjectTree(children)
return result
what are dead objects ? is this caused by wrong smc settings ? i have tried different smc modes, but the results were the same.