Notifications
Clear all

[Closed] Reset XForm on Parent object causes Problems

Hi,

I am a first time MaxScripter, but I feel I am tackling a rather weird or difficult problem.

I am writing a script to reset the XForms on objects which by themselevs work fine. The problem occurs if I run a reset XForm on some geometry that has child objects attached to it. The child object’s rotations, or scale or positions get out of whack when I reset the transforms.

Is it possible to run a reset XForm script without having to unparent the objects , run the script and them reparent them? This would be alot of work for large numbers of intricately parented objects…

I appreciate any help…I will also update any of my own progress, thanks!

12 Replies

Reset XForm takes the object-level transformations (rotation and scale) and moves the data to an XForm modifier on the stack, while resetting the rotation to 0,0,0 (world-oriented) and the scale to 1,1,1 (100%).
Obviously, any changes to the transformation matrix of a parent propagates to its children, so it is EXPECTED to happen.
Of course, unlinking, resetting XForm and parenting the original children back to your object is rather trivial in MAXScript. No idea where you got the idea you would have to do it by hand – dealing with thousands of objects is why we use MAXScript in the first place

I see your point…and this is exactly the reason I was going to begin using MaxScript…becauseI was doing it all by hand…

My question is for intricate hierarchies, how would MAX know what to parent and then unparent correctly back again,… slowly iterate through the structure unlinking, resetting, re-linking, move to next?

Changes will affect untranslated child objects even if they were linked to a parent that was previously translated, and then reset. The translation matrices “embed” that data down to the child objects.

Sorry for the lack of understanding, Ive never used Max before (everything else though!) and this seems really unique to a 3D program, afaik…

 PEN

Thanks for the link!

Using this and adding a unparent>run XFORM>reparent to that same object might do it for me…Ill keep anyone updated.

Seems proprietray realtime render engines always struggle with the transforms that come over with the model when its exported to prorietary formats.

Thanks PEN,

Your script is great…however, I am having trouble getting it to run.

Exactly how would I install it?Ive tried it all. Dragged the folder.mzp file to the viewport…tried to run the ms file and macro file but they give me errors.

Is there a MZP file I am missing…I am unsure how to run it…sorry for the misunderstanding…great tool anyway!

The reset transform/scale in the Hierarchy>Adjust Transform panel can be used on multiple objects and doesn’t cause the child transform issue you mention. I use this all the time on rigs.

 PEN

I tihnk that it is still using active X controls, like many of my tools they have not been updated as of yet.

Thanks for the replies…they are appreciated.

As for the active X issue, does that mean they are unusable on my machine or would I have to tweak them abit?

Thanks in advance

 PEN

They need to be converted to dotNet.

Page 1 / 2