I just want to get some custom controls scripted for parts of my rig (sliders/spinners) and I’m probably doing something daft which is glaringly obvious to someone who knows what they’re doing, but I can’t see what it is.
I thought that was to refer to the Attribute Holder modifier, on my control. ‘[1]’ = it being the first modifier on the stack and ‘$’ as the one selected. Or is that not needed?
Hey Pat, the modifiers call is fine, though it’s often safer to call the attribute holder by name rather than by where it sits in the modifier stack. The problem with the script you have is that you’re defining multiple things as RB_Rib_Control and 3ds Max doesn’t like having so many things with the same name. Specifically you have the rollout and the spinner in the rollout defined to the same variable. The code below works for me by changing those names a little. Hopefully it works for you.
Fresh max2009 scene, ran the script onto a torus with an attribute holder applied to it.
It’s legit code.
My best guess is your scene is f*cked or theres a problem with the ca variable. Have you used it as a (persistent global) variable in that scene previous to this problem?
Welcome to MAXScript.
<AttributeDef:RBRibCon>
true
Thanks for the suggestions guys, but it turned out to be as trivial as I had expected.
Because I use a laptop and I don’t have a numpad with a return key, I was using the normal ‘enter’ key which was causing Max Listener to read a single line of script, rather than the lot.
As you guys mentioned, the code worked fine so now I’m the happy owner of a custom slider. I just need to make sure I’m using ctrl + e to evaluate it, in the editor.
I’ve set a joystick control for my rib bone as a test. With this, animation for a belly wobble can be created in three dimensions, to match a walk cycle.
I’m creating an IK/FK blend set up for my leg, but when I come to apply an orientation constraint from the ‘blend foot’ to the IK, it flips and I can’t adjust it back into place.
[QUOTE=Patackular;8390]I’m creating an IK/FK blend set up for my leg, but when I come to apply an orientation constraint from the ‘blend foot’ to the IK, it flips and I can’t adjust it back into place.
do you have the “Keep initial offset” checkbox (I think that’s what it’s called, I’m batching right now and can’t check) active in the orientation constraint? Or is this issue occurring somewhere further down the line?
Ok, although it did snap the bone back into the right place, when I come to move it using the blend, it flips off at an angle, not following either the IK or FK set up.
Another issue I’m having is that creating a knee rotation control for my IK leg, causes my leg bones to flip when it’s activated to ‘Use’, in the properties.
Turns out that the flipping in the foot was being caused by an incorrect orientation constraint to the control and not the foot. Still no idea on the knee control front.