Maxscript node cloning odd behavior

Maxscript node cloning odd behavior

Anonymous
Not applicable
467 Views
0 Replies
Message 1 of 1

Maxscript node cloning odd behavior

Anonymous
Not applicable

Immediately after cloning a node that has some children, the queried number of children in the cloned node is 0 (not correct). However, after execution of more maxscript, the number of children queried is what I would expect.

 

Here is the code snippet:

*******************************************************************

nnl = #()
maxOps.cloneNodes (objectsSelectedToExport as array) cloneType:#copy newNodes:&nnl #nodialog
format "num children: %\n" nnl[1].children.count
allObjects = $*
for OBJ in allObjects do
(
exportSelection = #()
print OBJ as string
)
format "num children: %\n" nnl[1].children.count

********************************************************

 

and here is the output:

num children: 0
$Editable_Poly:HINGE_DOOR_001_B @ [-62.722206,7.962832,-0.076272]
$Editable_Poly:HINGE_DOOR_001_A @ [-62.722206,7.962832,-0.076272]
$Editable_Poly:HANDLE_DOOR_001 @ [-46.104774,6.317981,-0.000319]
$DoorSystem:DoorSystem001 @ [0.000000,0.000000,0.000000]
$Dummy:DoorSystem001_pivot_0 @ [1.500000,0.000000,0.000000]
$Box:DoorSystem001_door_0 @ [1.500000,0.000000,0.000000]
$Editable_Poly:DoorSystem001_hng_dr_0 @ [1.500000,0.000000,25.605721]
$Editable_Poly:DoorSystem001_hng_dr_1 @ [1.500000,0.000000,173.394287]
$Editable_Poly:DoorSystem001_hndle_0 @ [-15.738667,-66.656960,99.500000]
$Editable_Poly:DoorSystem001_hndle_1 @ [-10.897926,-67.908867,99.500000]
$Editable_Poly:DoorSystem001_hng_fr_0 @ [1.500000,0.000000,25.605721]
$Editable_Poly:DoorSystem001_hng_fr_1 @ [1.500000,0.000000,173.394287]
$DoorSystem:DoorSystem002 @ [0.000000,0.000000,0.000000]
$Dummy:DoorSystem002_pivot_0 @ [1.500000,0.000000,0.000000]
$Box:DoorSystem002_door_0 @ [1.500000,0.000000,0.000000]
$Editable_Poly:DoorSystem002_hng_dr_0 @ [1.500000,0.000000,25.605721]
$Editable_Poly:DoorSystem002_hng_dr_1 @ [1.500000,0.000000,173.394287]
$Editable_Poly:DoorSystem002_hndle_0 @ [-15.738672,-66.656960,99.500000]
$Editable_Poly:DoorSystem002_hndle_1 @ [-10.897921,-67.908867,99.500000]
$Editable_Poly:DoorSystem002_hng_fr_0 @ [1.500000,0.000000,25.605721]
$Editable_Poly:DoorSystem002_hng_fr_1 @ [1.500000,0.000000,173.394287]
num children: 3

 

anyone have any ideas on why this happens?

0 Likes
468 Views
0 Replies
Replies (0)