Dimension

44 votes
Version: 
1.2
Date Updated: 
01/02/2012
Author Name: 
Anubis

Scale tool coded as modifier plugin

Dimension

Additional Info: 

Installation:
Put this script into your Max stdplugs\stdscripts and restart the Max.

Disadvantage:
The Garbage Collection don't like this modifier.
Recommended to collapse the modifier stack and restart the Max.

v.1.2

Update Log:
v.1.1 - added checkbox to keep proportion
v.1.2 - now switch between relative/absolute mode fixed

Usage Notes:
Such scripted modifiers are memory consumer and I prefer to omit any callbacks additions which might polish some behaviours but will make the whole solution more dirty.

Instead of future complications, just read next usage notes about 2 known cases:

1. The size of modified object is acquired once when the Dimension is added to it. And that mean any size's changes of the base object after that are not handled. Shortly, if you need to modify the base object, just temporality remove/cut the Dimension modifier and then you are done, turn/past it back on the stack.

2. When you apply the modifier as instance to many objects of varied size, and wish to work in Absolute mode, keep in mind that the XYZ values you see are the size of the first object (to which the modifier is applied to). I hope this not look too logical confusing.

Version Requirement: 
3ds max 4 and higher
AttachmentSize
simpleMod_Dimension.ms1.05 KB
simplemod_dimension_11.ms1.35 KB
simplemod_dimension_12.ms2.25 KB

Comments

Comment viewing options

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

updated

very quickly tested though ;)

my recent MAXScripts RSS (archive here)

harumscarum's picture

checkbox woks fine!

checkbox woks fine! thank you!

Anubis's picture

thanks

I update a bit the script, adding checkbox.
Drop a line on how it works when you test it.
Happy new year!

my recent MAXScripts RSS (archive here)

harumscarum's picture

yeah! thank you very much and

yeah! thank you very much and happy new year!

Anubis's picture

ok, i see

You're right about switching btw Relative/Asbolute, I s'd handle this.

As for the single checkbox, that w'd limit the usage, I think, as will constrain proportion always to X.

Ok, I'll play with this staffs after the holidays.

my recent MAXScripts RSS (archive here)

harumscarum's picture

regarding constrain proportion

i see it very simple. only one checkbox because object has only one proportion.
so if we have source sphere with dimensions by X,Y,Z=10cm and X changed to 15cm with "constrain proportion" enabled - Y and Z also be 15cm.

one more issue - default dimensions is Relative and it is ok, but when switch to Asbolute - object gain incorrect dimensions of 1,1,1cm

Anubis's picture

Thanks everybody

@maicogir - I'm too thought once about this but seems impossible mission. This modifier can be applied to one or multiple objects, but also can be applied to sub-object selection, for instance, you can add Mesh Select and made sub-selection, and then applying Dimension on top of the stack. And the problem is... well, lets quote the help file:

You should not try to access the object being modified from within the map handler as this will attempt to evaluate the scripted modifier again. This will result in an infinite loop and hang 3ds Max.

@harumscarum - Hmm, at first look this sounds as minor improvement that can be done but how you imagine the work of such checkbox? There are 3 dimesions (XYZ), maybe needs 3 checkboxes? Sounds a bit messy.

my recent MAXScripts RSS (archive here)

harumscarum's picture

nice script!

thank you
could you add "keep proportions" checkbox?

maicogir's picture

Great Work

Realy nice script!
I have one tip... would be wonderful if the function "relative" reads the actual size (x,y,z)of the object, and you could change this numbers accordly.

lantlant's picture

useful script

useful script

Comment viewing options

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