On 11/02/2014 at 01:45, xxxxxxxx wrote:
Hello everyone,
I need to cycle through a Object tree which consists of Null-Objects and Poly-Objects, nested.
Afterwards the selected "Null" will be merged to one Poly-Object.
But I need only the "deepest" Null Object and want to leave the Nulls in Nulls untouched.
Null-1
-Null-2
--Null-3 <- this should be returned
---Poly
---Poly
---Poly
--Null-4 <- this should be returned
---Poly
---Poly
---Poly
-Null-5
--Null-6 <- this should be returned
---Poly
---Poly
---Poly
Standard Python cycle - how to modify?
def GetNextObject(op) :
if not op: return
if op.GetDown() : return op.GetDown()
while op.GetUp() and not op.GetNext() :
op = op.GetUp()
return op.GetNext()
thanks in advance for any help.
mogh