Scripting Questions; Bone Restlength?


#1

Thought i’d break this into a new thread…

Ok, I’ve got a pretty nice autorig library going, tested and pretty good. My plan to just use world space nulls to quickly scale my rig to new proportions is almost complete…

There’s one major hurdle left and a couple of polish steps…
I’ve trawled the docs and been checking examples but can’t see how to do the following…

[ul]
[li]How do I get/set bone restlength?[/li][li]Can I rename items from a script?[/li][li]Can I set an effects target object from a script? (bone deform in this case)[/li][li]Can I load a setup from the setup palette from within a script?[/li][/ul](those last two would truly automate the whole process, but are simple enough manually, renaming would just feel a bit neater, but again isnt a showstopper.

edit it seems that Borhan Berthet wrote a plugin to allow access to bone length from a script and included it in his “rigging tools” suite… I must try that!


#2

I’m not into Messiah-scripting but isn’t: GetSetupValue(object, channel) and SetSetupValue(object, channel) what you need??

/ Svante


#3

That was my first thought, but what “channel” is rest length?

Given that BBtools comes with a plugin to get BoneLength, it probably wasnt the case in 2003 when they were written…

That gives me a means to read rest length, but not to set it…
Looks like I’ll need to write a plugin to be able to set it… that’s a whole new adventure…


#4

Hmm the length, hmm… I don’t have a clue! :eek: You better ask PMG!

/ Svante


#5

Michael, as I told you: When using script languages, at some point you might hit the brick wall ! :banghead:

As far as I can see, the bone properties cannot be accessed via m:script. But I will take a look at writing a plugin that gives access to those properties.


#6

Hi Michael, I wrote a little plug-in that lets you read/write the rest length of a bone, as well as some other properties.

Hope you find it useful !


#7

Chris,

You should put that up on zoogono.


#8

How very kind of you, thanks for the informative source!
I am rendering right now but I will play with it later, thanks:thumbsup:

/ Svante


#9

How true! For animation scripts Messiah seems pretty simple (and pretty powerfull), but for everything else it’s not very mature!

Having skim read the SDK I can certainly understand your points about just writing plugins. There’s a bit more of a barrier to entry in writing plugins, but I think I’ll give it a go… ultimately it’s got to be worth it.

Many thanks for the plugin, I can finish My setup scripts now and your source will be an invaluable guide for the future. Your right that there aren’t many examples out there!


#10

hehehehe I ran into something like this when I was trying to write a script for a dynamic bone falloff. I wanted to bone falloff to change in reference to another object’s orientation. Never found out how to do it so I decided to use a morph map instead. Not as flexible but it solved the problem. It would be nice to be able to write bone falloff into an expression.


#11

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.