matrix scale


i’m wanting to scale an object using matrix transform rather than the scale tool. Not sure how this works on a bone object however. A fragment of code might help. thnx in advance


is the .scale property not enough for your purposes? or even the scale function?
what do you need to do exactly?


Want to scale up a set of bones using bonesys. I know its not recmmened but I simply want to establish the bones in relative positions so the user can then manipulate them. trouble is , when I use the scale technique, it messes up the bones in that the parent stretchy bone loses it property to be moved around in all axes by the child bone, so that it has the strecthy effect but not able to be moved around except along central axis. Don’t know why. IF I apply xform gizmo sacle everything is fine, but I really dont want the extra modifeie and orange gizmo there. I thought using matrix 3 scale would work but same prob perists. I’d like to know why this behviour exists, but I guess I can live with it. But like to now my scale doesnt presrve all stretchy bone properties.


what you are trying to do with bones is completely wrong. it sounds like you only need that is to stretch the bone (not scale it in bone’s direction).
what actually the bone stretching is? it’s moving a child bone in its parent’s direction. for bones it’s position x value.

 delete objects
 p = boneSys.createBone [0,0,0] [10,0,0] [0,0,1] = "parent_bone"
 b = boneSys.createBone [10,0,0] [20,0,0] [0,0,1] = "child_bone"
 b.parent = p
 p.boneFreezeLength = off
 -- stretch the parent bone by moving child:
 b.pos.controller[1].value += 10

or do you really want to scale a bone?


Yes I already tried exactly what you describe and it works Ok but actually I want to scale up a set of bones on click and drag, like the way the biped model is drawn out in max, only for a simple set of face bones. I mean…couple of approaches work well enough I suppose already,(I don’t like the xform modifier solution as it leaves that orange gizmo on the bone…) - just looking for a better solution. Thought scaling matrix might work but it screwed up the child bone movement for some reason I can’t quite fathom, since some aspects of the bone were retained…so , yeah, i want to scale up a set of bones.

Oh by the way, I did try this: use xform to scale, then scaled each bone at the end of the drag by using bone.scale*=bone.mod[1].gizmo.scale.value then deleting the xform mod…(pseudocode),but after this operation, the bones didnt behave quite right either.


yeah, just parent the rig to a helper object and it inherits the scaling. You were all right to ignore me. Simple…


Never scale rigs! Unless you have a really good reason to do so. Your reason is not a good one.

Moving the bones and having them stretch is the way that you want to do it. I have the tools that you all ready describe I click and drag out body parts. When I store the positions of the bones I store them as a normalized rig, meaning it is all just one unit in length then when I click and drag I can multiply the positions by the distance the mouse has traveled plus the innitial click position. Call the reset bones functions as you go and it looks like the bones are scaling but they are not.


Ok thnx for that Paul. Do you mean that you store start and end positions of each bone and multiply those by the scaling fcator? be great to see some code but I know you’re busy.
I know never scale rigs but I’m actually scaling only the bones, not the rig with ctrl objects …is that still bad?


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.