Move and rotate per spreadsheet

Move and rotate per spreadsheet

Anonymous
Not applicable
1,018 Views
1 Reply
Message 1 of 2

Move and rotate per spreadsheet

Anonymous
Not applicable

Can a maxscript or a macro look at an external spreadsheet (such as Excel, or even a tab-delimited text file), take the name of an object, move it and rotate it?

 

For example, take a spreadsheet at "C:\spreadsheet.xls" that reads name/ location/ rotation:

Objectname1 12 5 0 0 0 45

Objectname2 10 7 3 0 70 0

Then 3dsmax would move Objectname1 to the x,y,z of 12,5,0 and rotate the object 45-degrees on the z-axis. Objectname2 would move to x,y,z of 10,7,3 and rotate 70-degrees on the y-axis.

Assume all pivot points and rotation begin at 0.

 

Can this be done?

 

Here's my situation:

I am trying to import geometry made from another 3d software which does not use pivot points internally. When I import the objects, they are in the right location and rotation in space, but all their pivot points are at 0,0,0 with zero rotation (even if they are actually rotated).

 

I want to use a procedural material (berconwood) that is mapped to each object's XYZ. Because all my objects are coming in with a pivot point of 0,0,0 and rotated 0-degrees, even if the actual object is moved and rotated off in space, the mapping is mapped to the world origin rather than oriented to each piece. The resulting render continues smoothly over every object, making all the objects look like one big conglomeration, rather than having the mapping being uniquely oriented to each object. Within the external 3d software, I can map the rotated objects correctly and export them successfully into 3dsmax. However, only if I use a bitmapped material does the mapping show correctly within 3dsmax. With a procedural object-oriented XYZ material applied, the imported objects' mapping does not work.

 

I can generate the spreadsheet from the external 3d software program, relocate all the objects to 0,0,0 and export them that way, which is why I was looking for the script to place them back into correct position/rotation in 3dsmax. I have thousands of these objects, so doing this manually is not feasible.

 

Any help? I ask because I do not know how to script.

Thanks,

Matt

0 Likes
Accepted solutions (1)
1,019 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

To answer the first part of the question -- yes, certainly it can (although I would use Python instead).
And using spreadsheets to store some very basic data seems like overkill.
A text file will do fine.

 

As for the rest, the script doesn't seem to be particularly complex, but you will not find a lot of people ready to do it for free.

0 Likes