PDA

View Full Version : Get,Set,ToggleBit errors with the timeline


Scott Ayers
10-22-2010, 06:11 PM
Does anyone know how to use the various Bit functions on timeline keys?
None of my experiments are working. And the SDK examples don't work either: var key = op->GetFirstCTrack()->GetCurve(CCURVE_CURVE, FALSE)->GetKey(0);// R12
//var key = op->GetFirstCTrack()->GetCurve(CC_CURVE, FALSE)->GetKey(0);// R11.5 and lower
println(key->GetValue());
key->GetBit(BIT_AAMAN); // member not found error
key->SetBit(BIT_AAMAN); // member not found error
key->ToggleBit(BIT_AAMAN); // member not found error
EventAdd();

-ScottA

Scott Ayers
10-22-2010, 10:22 PM
I just figured out how to make it work with Curves: //This script will toggle the state of a curve every time it runs

var track = op->GetFirstCTrack();
var curve = track->GetCurve(CCURVE_CURVE,false);
var key = curve->GetKey(0);

//curve->SetBit(BIT_AAMAN);//Sets the curve's state to a value of 1. Not used in this example
curve->GetBit(BIT_AAMAN);//Get's the curve's current state of existence
curve->ToggleBit(BIT_AAMAN);//Toggles the curve's state of existence
println(curve->GetBit(BIT_AAMAN)); //prints 1 if the curve exists(min of two keys). 0 if it doesn't

But this same code doesn't work with the keys. Member not found errors
Very Weird.
Still searching for an answer why.............

-ScottA

CGTalk Moderation
10-22-2010, 10:22 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.