PDA

View Full Version : [NEWBIE] attachObjects behavior


irakleio
07-22-2009, 08:38 AM
Hi

I took a quick look in the forum but didn't find anything that could help me...
Here is my problem : I made a script which goes through following steps

1 - import a .3ds file
2 - create a node
3 - reparent all top nodes to this newly created node

now when i select the root node and rotate it, i expect the whole geometry to follow, but this is not happening. More than this, the reparent behavior is different each time i execute the script

i didn't find how to attach files :s so here are the links to my script and to the model i'm testing

http://up.k10x.net/cckbdtuiczcrr/MOCTest.mcr
http://up.k10x.net/ixlkvcxvtauap/BERLIET_SB.3ds

any help would be very much appreciated :)

denisT
07-23-2009, 08:02 PM
Hi

I took a quick look in the forum but didn't find anything that could help me...
Here is my problem : I made a script which goes through following steps

1 - import a .3ds file
2 - create a node
3 - reparent all top nodes to this newly created node

now when i select the root node and rotate it, i expect the whole geometry to follow, but this is not happening. More than this, the reparent behavior is different each time i execute the script


any help would be very much appreciated :)



resetMaxFile #noPrompt
importfile <your_file> #noPrompt
nodes = for node in objects where node.parent == undefined collect node
master_node = <create anything that you want>
for node in nodes do node.parent = master_node


But you have to know that relink might screw up Link_Constaints. But in your case it doesn't matter. 3DS format doesn't support Link_Constraint controller (as I know) anyway.

irakleio
07-24-2009, 08:12 AM
thanks for your reply

unfortunately this did not solve the problem (try 2-3 times to import the model i attached with the script, and then rotate or translate the root node. Nodes who follow the parent are not the same each time :/ ). I guess this is not a hierarchy problem, but more like my 3ds file export is not good. I guess i miss to initialize some transformation info in the file, which involve weird results

For info, when i export a model from 3ds and reimport it i don't have this strange behaviour.
When i export a model, modify and save it with my other app, and reimport in 3ds, here there is a problem


thanks again though :)

irakleio
07-24-2009, 02:55 PM
problem fixed

my .3ds export (using lib3ds api v1.3.0) did not initialize transformations properly, and this involved weird result in 3DSMax

CGTalk Moderation
07-24-2009, 02:55 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.