THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/01/2010 at 23:23, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11.5
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
---------
Hey Folks,
I'm working on a little animation workflow script that I nearly have working, but I'm stuck on one thing.
Basically I have a script that when called jumps back a frame, selects the first child of the currently selected object and then records a keyframe for both objects. Then it deselects the child object and jumps back to the current frame.
What I want it to do in addition to this is to set the keyframe interpolation for the keys on the child object only to Stepped, while leaving the keys on the original selected object as they are. I've tried a bunch of variations, deselecting the original object before switching the interpolation, but nothing works so far, all I get is the keys of all objects switching instead of just the ones I want.
Is this possible? I believe R11 brought in more control over keys via Coffee but my understanding of this is a little limited right now.
Any ideas appreciated, here's how the code looks right now.
doc->StartUndo();
var ctrlr=doc->GetActiveObject();
var pivotNull=ctrlr->GetDown();// get 1st child of the controller (pivot null)
pivotNull->SetBit(BIT_AOBJ); // select the pivot null
CallCommand(12413); // Goto Prev Frame
CallCommand(12410);// Record key on active Objects (controller and Pivot Null)
/////// - Here is where I want to set the interpolation on the
// key on the Pivot Null to Stepped Interpolation
// this is what I'm trying but it selects ALL keys in the timeline -
// I just want the keys of the pivot
// null to be switched to stepped, not the ones on the Controller
CallCommand(465001012);// select all Keys < is there a select keys of one object version of this?
CallCommand(465001093);// set the selected keys to stepped
//
pivotNull#ID_USERDATA:1=1;
pivotNull->DelBit(BIT_AOBJ);//Deselect the Pivot Null again
CallCommand(12414); // Goto Next Frame *back to the original frame again)
Cheers,
Brian