View Full Version : Set absolute scale?

05 May 2009, 09:00 AM
I would like to set the scale on an object, but absolute in centimeters. Much like Ctrl-Click the Universal Manipulator numbers. But I Can't find the way to do it.. could somebody help me?

05 May 2009, 02:58 PM
OK, I've solved it in a pritty easy way... This is the (python) code, for you who would like it:

import maya.cmds as cmds

objectBBX = cmds.getAttr('object.boundingBoxSizeX')
objectBBY = cmds.getAttr('object.boundingBoxSizeY')
objectBBZ = cmds.getAttr('object.boundingBoxSizeZ')'object')
cmds.scale((wantedWidth / objectBBX), (wantedHeight / objectBBY), (wantedDepth / objectBBZ), r = True)

CGTalk Moderation
05 May 2009, 02:58 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.