PDA

View Full Version : Assign hotkey to Spline interpolation


Julez4001
08-14-2008, 01:01 PM
I looked in the hotkey list and didn't see as an option but is there a hack to make hotkeys to change animation/f-curves (TCB, Linear, Stepped, Bezier). Sometimes when you animating inthe graphic editor, jumpin out to make that change slows you down.:D

My Fault
08-14-2008, 03:23 PM
You can do this by using some messiah scripting.

Go in to the key command manager and pick the "class" you want to add this new command to.

In this case, name the command "steppedKeys"

Under command type "ChangeCurveTypeAllObjects(3);" (without quotes of course)

Then hit the + key to add that to the list

Assign that new command to the keystroke you want

Then it is just a matter of having the key selected you wish to change. Whenever you hit that assigned key, you change that curve to stepped

the other key types are:
TCB = ChangeCurveTypeAllObjects(0);
Bezier = ChangeCurveTypeAllObjects(1);
Linear = ChangeCurveTypeAllObjects(2);

Julez4001
08-14-2008, 03:31 PM
BIG Thanks....


But it seems to change all Keys type to Linear on that object/bone ..sort of an always on effect like IK. Sort of like the Stepped Key in the EDIT panel.

I just want to select a key and change its curve type for that particular "selected channel".



I was wondering in the classic Whats new (2.1 & 5.1) and found this to add to graph editor knowledge:

Tension, Bias, Continuity Shortcuts - By popular demand!

In the Motion Graph: Tension: CTRL drag on the keyframe. Bias: SHIFT drag on the keyframe. Continuity: CTRL-SHIFT drag on the keyframe.

My fault - what are you working on these days

Ulven
08-15-2008, 08:31 AM
There's three kind of macro functions for this sort of thing.

The first changes all the keys on a given channel for a given object.
You could use it like this:
ChangeCurveType(CurObj,GetActiveChannel(CurObj),int);
with int being the type of curve. For the rest of it, follow brian's instructions.


ChangeCurveType(object, int, int)

DESCRIPTION: Object = The object for which you want to change al the curvetypes Int = The channel to change Int = the type of curve (0 is TCB, 1 is Bezier, 2 is linear, 3 is stepped)

ChangeCurveTypeAllChannels(object, int)

DESCRIPTION: Object = The object for which you want to change all the curvetypes for Int = the type of curve (0 is TCB, 1 is Bezier, 2 is linear, 3 is stepped)


ChangeCurveTypeAllObjects(int)

DESCRIPTION: Changes all curve types of all of the selected objects in the scene. Int = the type of curve (0 is TCB, 1 is Bezier, 2 is linear, 3 is stepped)



But I don't think there's one for just a single key on a single channel. It's not very hard to do with the SDK though, is this something you're doing a lot?

Julez4001
08-15-2008, 12:32 PM
It's not very hard to do with the SDK though, is this something you're doing a lot?



Yeah I would like to be able to change it on the fly.
M:S tends to have that little "sticking" bug when you dropped the curve type list (where it gos to the last item in the list) and you have to hit it a second time to get what you want so its just kinda slows up the process. If you got the time to whip something I can do a $10-$15 paypal but if its not worth it, carry on.

I think ppl ( and I mean "me") are looking forward to Walker.

CGTalk Moderation
08-15-2008, 12:32 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.