Multiple transforms to a object and instanced

Hello, I would like to know if it is possible, to do via script/macro the following:

If i select a BOX in the viewport, an i want to apply multiple transform values, and make them instanced.
first line is the move x,y,z, while second line are the quat rotations: x,y,z,w

12011.95 23158.14 120.6522
-0.703436 0.071756 0.706524 0.028335

12011.94 23158.09 120.0983
-0.699457 0.103573 0.707085 -0.003733

12011.93 23157.97 119.5612
-0.690669 0.151483 0.705157 -0.052399

12011.95 23158.16 121.1725
0.705324 -0.050071 -0.705303 -0.050071

12010.66 23155.57 120.6522
0.071756 0.703436 -0.028335 0.706524

12010.68 23155.61 120.0983
0.103573 0.699457 0.003733 0.707085

12010.69 23155.72 119.5612
0.151483 0.690669 0.052399 0.705157

12010.66 23155.55 121.1725
0.050071 0.705303 -0.050071 0.705324

12010.01 23157.5 120.6522
0.548157 0.446665 -0.519611 0.47954

12010.04 23157.49 120.0983
0.567811 0.421335 -0.49732 0.502633


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cyberspeed's picture

Anyone able to HELP at all?

Anyone able to HELP at all?

obaida's picture

Attach TXT File .

Attach TXT File .

cyberspeed's picture


Are you able to see attached TXT with transforms?

cyberspeed's picture

TXT Sample with transforms

So sorry for this very late reply, i did NOT see the message above.

test_trans.txt 51.76 KB
obaida's picture


save your numbers to txt file and Select the object you want to instance and run this Script .

 - NOTE : the numbers order should be as you mentioned (p1 move-rotate , p2 move-rotate .....)

AttachmentSize 1.08 KB
cyberspeed's picture

Thank You!

Hello, thank you for the script, it works based on example above.

Actually the TXT files have them as single line, but for some reason the website would not display them correctly, and i had to put move in one line, rotation in one line then add space, etc. for every single one of them.

They are as follows: name of the geometry followed by the move, rotate and scale, each column is separated by a TAB character, not space.
GeometryName->12011.95 23158.14 120.6522->-0.703436 0.071756 0.706524 0.028335->1 1 1
or: move, rotate, scale
12011.95 23158.14 120.6522->-0.703436 0.071756 0.706524 0.028335->1 1 1
while some have no scale and just move, rotate:
12011.95 23158.14 120.6522->-0.703436 0.071756 0.706524 0.028335

Would that be even more complex?

ps. i had to add "->" where TAB character should be, so the website can display them as should and not tangled.
Also, i noticed the script does not make the selected geometry/object as master and move/rotate it to the first transforms then the following transforms its instances, basically it keeps that selected geometry/object at 0,0,0 and then makes instances out of the transforms in the specified TXT.

obaida's picture

Check This

There is 1 Limitation for the new Script :
if the line has 3 parts then the order should be (move,rotate,scale) NOT (Name,Move,Rotate) .

Shift Instance 3.68 KB
cyberspeed's picture


The same error is shown on 3dsMax 2012, 2018 and 2022, except for 2012 at line 53, while other two at line 57 as in error.png screenshot attached.

I have noticed also, at line 21 it tries to find for "->" to be replaced with "_" there is no "->" in the text transform, i only meant in my comment above that i had to add those so the website will not tangle them, i attached another example.png screenshot as to how the values look in the text file.

I am sorry for the confusion.

error.png 38.08 KB
example.png 50.48 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.