|
I use this script http://www.scriptspot.com/3ds-max/scripts/instance-replace
I replace many objects with instanceReplace
The problem: A few objects flips (like mirror). Or the object rotate?
Here a test script:
fn DumpObjInfo obj = (
format "____________________________________________\n"
format "DumpObjInfo for object: %\n" obj
format "%:\t%\n" "transform" obj.transform
format "%:\t%\n" "rotation " obj.rotation
format "%:\t%\n" "pivot " obj.pivot
format "%:\t%\n" "objectoffsetpos " obj.objectoffsetpos
format "%:\t%\n" "objectoffsetrot " obj.objectoffsetrot
format "%:\t%\n" "objectoffsetscale" obj.objectoffsetscale
format "%:\t%\n" "objecttransform " obj.objecttransform
)
obj_x=$'oben' obj_y=$'unten'
DumpObjInfo obj_x
DumpObjInfo obj_y
format "------------------------------------------------------" instanceReplace obj_x obj_y
format "------------------------------------------------------"
DumpObjInfo obj_x
DumpObjInfo obj_y
The output is:
OK
DumpObjInfo()
ResetAll()
$Editable_Poly:oben @ [0.000000,-0.000011,3.360594]
$Editable_Poly:unten @ [0.000000,-0.000011,1.142553]
____________________________________________
DumpObjInfo for object: $Editable_Poly:oben @ [0.000000,-0.000011,3.360594]
transform: (matrix3 [0,1,0] [1.62921e-007,0,-1] [-1,0,-1.62921e-007] [0,-1.10865e-005,3.36059])
rotation : (quat -0.5 -0.5 0.5 0.5)
pivot : [0,-1.10865e-005,3.36059]
objectoffsetpos : [0,0,0]
objectoffsetrot : (quat 0 0 0 1)
objectoffsetscale: [1,1,1]
objecttransform : (matrix3 [0,1,0] [1.62921e-007,0,-1] [-1,0,-1.62921e-007] [0,-1.10865e-005,3.36059])
OK
____________________________________________
DumpObjInfo for object: $Editable_Poly:unten @ [0.000000,-0.000011,1.142553]
transform: (matrix3 [0,1,0] [1.62921e-007,0,-1] [-1,0,-1.62921e-007] [0,-1.10865e-005,1.14255])
rotation : (quat -0.5 -0.5 0.5 0.5)
pivot : [0,-1.10865e-005,1.14255]
objectoffsetpos : [0,0,0]
objectoffsetrot : (quat 0 0 0 1)
objectoffsetscale: [1,1,1]
objecttransform : (matrix3 [0,1,0] [1.62921e-007,0,-1] [-1,0,-1.62921e-007] [0,-1.10865e-005,1.14255])
OK
------------------------------------------------------OK
$Editable_Poly:oben @ [0.000000,-0.000011,3.360594]
------------------------------------------------------OK
____________________________________________
DumpObjInfo for object: $Editable_Poly:oben @ [0.000000,-0.000011,3.360594]
transform: (matrix3 [0,1,0] [1.62921e-007,0,-1] [-1,0,-1.62921e-007] [0,-1.10865e-005,3.36059])
rotation : (quat -0.5 -0.5 0.5 0.5)
pivot : [0,-1.10865e-005,3.36059]
objectoffsetpos : [0,0,0]
objectoffsetrot : (quat 0 0 0 1)
objectoffsetscale: [1,1,1]
objecttransform : (matrix3 [0,1,0] [1.62921e-007,0,-1] [-1,0,-1.62921e-007] [0,-1.10865e-005,3.36059])
OK
____________________________________________
DumpObjInfo for object: $Editable_Poly:unten @ [0.000000,-0.000011,1.142553]
transform: (matrix3 [0,1,0] [1.62921e-007,0,-1] [-1,0,-1.62921e-007] [0,-1.10865e-005,1.14255])
rotation : (quat -0.5 -0.5 0.5 0.5)
pivot : [0,-1.10865e-005,1.14255]
objectoffsetpos : [0,0,0]
objectoffsetrot : (quat 0 0 0 1)
objectoffsetscale: [1,1,1]
objecttransform : (matrix3 [0,1,0] [1.62921e-007,0,-1] [-1,0,-1.62921e-007] [0,-1.10865e-005,1.14255])
OK
| Attachment
|
|
| Attachment
|
|
|