How are bones scaled during a copy/paste?

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

How are bones scaled during a copy/paste?

Post by mkelley »

Vern,

You suggested there was no need for your bone script now that AS has a copy/paste bones ability -- yet the primary reason I used it was to be able to scale the bone set. It doesn't appear that you can do this in AS 6 (which is to say, the behavior of bones and bone manipulation appears *exactly* the same as before).

If this is true, then your bone script is still needed. Have you tested it in AS 6? If so, could you post it with any changes that you might have to make? I suspect a lot of us will still really want it.

(BTW, copying bones between layers and/or using them as part of a library isn't very useful at all unless some sort of scaling is possible. I'm hoping this is available and you can just tell me where this is, as I find it hard to believe Mike would have left it out -- why do bone copying otherwise?)
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Well, my script is not needed as much. ;)

90%of my bone copying and pasting is actually limited to "non scaling" use. I would still use my bone copy/paste script for copying and resizing rigs. However being able to select bone/s and just use copy and paste to duplicate them on the same layer or any bone layer is a great improvement.

I should have said my script won't be needed as much as before. The main improvement is that the standard key board "copy/paste" key commands work with bones.
(BTW, copying bones between layers and/or using them as part of a library isn't very useful at all unless some sort of scaling is possible. I'm hoping this is available and you can just tell me where this is, as I find it hard to believe Mike would have left it out -- why do bone copying otherwise?)
There is no secret function to "scale" bone rigs, I tried to get that in but apparently there wasn't time. I think there are many reasons having a "simple" copy and paste bones WITHOUT scaling would be used all the time.

Scaling rigs is exactly why I created that button script. It works great and now I can make it even better with all the new script features. It exists. It works. There's no need for Mike to "reinvent the wheel" and add it to the application. It's already done.

I'll get it revised as quickly as possible. I may even be able to create a "tool" to "drag scale" an entire bone rig. ;)

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

The drag scale is what I need -- that's the reason I really wanted a bone scale built in by Mike. But if you think you can program it -- that would be really cool.

And if you don't have the time but the idea how, let me know and I'll be glad to give it a shot. Right now I haven't got a clue as to how a drag scale function can be implemented using Lua (well, I supposed I could look at other tools, but I assume they work because there is a built-in scale function to be called).

But I did think that Mike would at least LOOK at scaling bones in more than one direction for animation purposes. Heck, I think even *you* wanted that (but perhaps that was someone else and I'm mistaken). That's got to be the kind of programming thing that's a no-brainer.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I have the idea for the "rig scaling" worked out in my head. I'm surprised I never thought to try it before. It should be a piece of cake. I can just repurpose the code from my previous tool. The new script features should make it easier.

It is possible with lua I just never put two and two together. First time I heard it mentioned really.

My script is "copying" the bones and putting them on the same or a different layer. That was my goal to DUPLICATE bones... not scale a rig. That only became obvious as a use for it AFTERWARDS.

The "pasting" part of my script is just uniformly changing the LENGTH on frame 0. It isn't actually scaling. Changing the length is "uniform">

My new tool would do just that... grab the "top" bone in a rig... the top parent bone. And while dragging the length adjust the length and position of all the child bones with the same percentage. It would just store the postiions and length in a table and then apply that to each bone as the top bone is changed in length.

It was actually possible in 5.6... just never thought of it.

--------

I and others did request "two way scaling" of bones. It's unfortunate that wasn't done for this version but nothing in programming is a "no brainer". Every new feature or change at any stage of development has the potential to break something else. I know enough programmers now to have heard this a million times.

-----

On another topic I have a question... why would a feature like "rig scaling" be better created by mike and added as feature? If the end result is the same, a tool in the tool palette that scales all the bones in a rig, what difference does it make who created it?

Just curious.

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

The reason I think it would be better done by Mike is that he could add such a drag scaling process -- but if you think you can do that that would be just as good.

But actually, in thinking about this and examining your code I've already written most of something that works the way I want (and I can kick myself for not thinking of it before). I simply scale the layer the bones are in and then process this scaling back to the bones and reset the layer. That way I can see the scaling via the scaling tool (which is my basic complaint).

The more I think about the way this works the more I think I'll implement what I've always wanted -- the ability to pass the transforms of a layer onto all objects in the layer and then collapsing the layer back to frame 0 status. I've always thought it should be possible for objects to "inherit" the transforms of a layer, but never realized how easy it would be to implement this (then again, I have spent almost zero time programming any Lua stuff until I did the color script).
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Oh cool! That's brilliant! Ha ha! Transform the layer... I never would have thought of that. It does make sense. Assuming you like to keep your layers at 100% all the time of course (I ddo). MAN this would be COOL AS HECK! I can't tell you how many times I've had to scale multiple layers in a bone layer. You could apply that trick to the parent layer... apply the layer scaling to all the sub layers.

This could go even further. You could use this technique to move bunches of groups of layers... hard to explain...

I always get my layer 0 "wrong". I end up designing and building my character on frame 0 and I don't like where the default position is. You could use this process to transform all elements of sub layers from any transformations of the parent layer including translation, origin etc.

-vern
User avatar
synthsin75
Posts: 10045
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

See Mike, you're already surpassing me. (Of course that's not saying much.) I had thought about scaling the bone layer, but I hadn't realized that you could used that transform and reset the layer afterwords. Great idea!
Post Reply