PDA

View Full Version : Merge Script = Scale Wonkiness


thatoneguy
02-13-2008, 02:29 AM
Has anybody had any problems where merging files using a script under rare situations merges them extremely distorted?

It's really weird their "scale" values are exactly the same but the editable mesh itself is like 50% taller than it should be.

I can't create an exact sequence of events which causes it but I've seen it happen about 4 times over the last couple thousand merges.

Has anyone else out there seen this happen in Max 2008?

JHN
02-13-2008, 09:30 AM
Weren't the objects parented to some NUscaled objects in the source file maybe?

-Johan

shibumenon
02-13-2008, 01:50 PM
Customize/Unit-setup/System-unit-setup
might be different in the current session of max and the merged max file.

JHN
02-13-2008, 02:52 PM
Does taller mean NU scaled? or just bigger... otherwise I'd go for aaachoo's suggestion.

-Johan

thatoneguy
02-13-2008, 05:43 PM
Non-Uniform.

They have no parent in the source file. There's just a bunch of editable meshes all lined up nicely.

And the 'scale' is identical between the source file and the merged file. The mesh itself is transformed... but still based on the axis point.

(Time to go through the code line by line...)

thatoneguy
02-13-2008, 06:19 PM
Found the source of the problem I guess it wasn't on the merge:

$.transform = prerotateX $.transform 270

99.9999% of the time that works properly. But for some reason on this one object it doesn't work.

Any ideas on why this single object isn't getting transformed properly?


Edit:
Figured out the cause of the problem:

Create a cube. Move the verticies to make it oblong. Rescale it back to a cube. And apply the prerotatex operation. I thought that operator only applied a local X rotation to the object. The local scales are getting swapped around in the process... hmmmm....

Edit2:

Workaround:
s = $.scale
$.transform = preRotateX $.transform 270
$.scale = s

CGTalk Moderation
02-13-2008, 06:19 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.