Real Scale Tool Box

Introduction to Real Scale Tool Box:

When dealing with many lighting solutions (such as IES light profiles and vray) it is important for your models to reflect real-world sizes.  This is a simple script that allows you to preview the size of any object in your scene, and rescale it to real-world units.  The tool only needs an object’s bounding box data, so it can scale any object that has a transform node.  Centimeters, millimeters, meters, inches, feet, and yards are all supported.  The script reads in the units you have set for the scene, so it does not matter what you have your scene units set to.

Installation and Loading:

Download link: Real Scale Tool Box 1.4

    To install the tool all you have to do is download the file from the link above called “realScaleToolBox.mel,” then place it in your My Documents > Maya > MayaPrefs > Scripts folder.  Once inside maya, go down to your command line at the bottom of your screen(it can be turned back on from the Display > UI Elements > Command Line drop down menu if it is not visable), and type in “realScaleToolBox” (without the quotes) and hit enter.  The command is case sensitive so be careful.  If you get an error that reads, “// Error: line 1: Cannot find procedure “realScaleToolBox”. //,” then the .mel file is not in the right folder and you will need to double check your install.  If successful, the tool box should pop up, and you will be read to start working.  Note: this script was designed for Maya 2011, and my not work/appear correctly on older or newer versions.


Preview Units drop down:  Changes the units the targeted object will appear as.  Ex. if you have a sphere of with a diameter of 1 foot, then change this drop down to inches, the preview display will show a size of 12 inches.

Desired Units drop down:  This is where you set what you want the scaled object’s new units to be.

Current Target box:  Displays the name of the currently targeted object.  If you have more than one object targeted, it will show the total number of objects targeted in parentheses next to the name of the first object selected.  This box will also display any error messages you might run into.

Object’s Current Size fields:  Once an object is targeted, its x, y, z size will be displayed here in the units you currently have set under preview units.  If you have a series of objects selected only the first object selected will be displayed.  Keep in mind the default scene units is centimeters.

(click to enlarge)

Scale Mode:  This will only make a difference if you have more than one object targeted.  If you do, then this allows you to change the way it is scaled.  In local mode each object will be scaled in their local space individually.  In global mode, every object you have selected will be grouped together and scaled together.

Equal Scale Mode Check Box:  This changes whether you want all of the user input fields to match, or be separate.  IE. Do you want to scale the object to 1 ft in all axes, or do you want it to be scaled to 1 ft, by 2 ft, by 3 ft?  If you want the fields to match, hit this check box.

Desired Size fields:  Here you will enter what you want to scale the object to.  Units are determined in the Desired Units drop down above.  As you input values and hit enter, the script will calculate a delta value based on the difference between the number you entered and the targeted object’s size.  Then this delta value is used to update the other input fields based on that difference.  So for example, if you have a cube of size 1, 2, 3 and type a 4 in the X input field, the Y input field will update to 8, and the Z field will update to 12.  This works in reverse as well; such as entering 12 into the Z field.

Target Selected Object:  Hit this button once you have selected the object or objects you want the tool to work with.  Every time you want to work with a new object or set of objects, you will need to re-target them by hitting this button.  This button also acts as your tool box updater.  If you ever think the values it is showing are wrong, hit this to update everything; making sure to select what you want to work with again if you have deselected the objects since the last time you targeted them.

Rescale Target:  Once you have set the units you want the object to be, and how big you want it to be, hit this button to rescale the object.  Once you hit this button its new size will appear in the preview fields.

Close:  This button will close the window, but not delete it from memory.  The next time you open the window by calling it in your command line the window will simply be opened again with all the previous data still intact.  If you want to delete the window from memory and start from scratch, just hit the exit button in the top right next to the maximize and minimize buttons.

Final Notes:

That’s all there is to it.  Hopefully you can get a lot of use out of it, and if you have any questions or comments, feel free to contact me.

A few things to note: this tool uses the built in bounding box feature inherent to transform nodes to work.  If you are getting scales that do not seem right, it is probably because the object is rotated.  Try centering it up before scaling it, then rotating it again.  Also, I sometimes received an odd error relating to the ungroup command.  If you have an object rotated, and after scale it reverts to zero rotation, go into your ungroup tool’s option box and reset the tool.  This should fix the problem.


One response to “Real Scale Tool Box

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: