On 06/09/2017 at 02:46, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :
---------
I have a tag plugin and I want to set the objects "Visible in Editor" using keyframes.
Here my code.
A keyframe is set on frame 0, but the value for "Visible in Editor" is not correct (always On).
What am I doing wrong?
track = CTrack::Alloc(op, DescID(ID_BASEOBJECT_VISIBILITY_EDITOR, DTYPE_LONG, 0));
if (track) {
// Add track to op
op->InsertTrackSorted(track);
// Get track curve
CCurve* curve = track->GetCurve();
if (curve!=nullptr) {
CKey* key = curve->AddKey(BaseTime(0.0));
key->SetValue(curve, 1); //set to Off
}
}
-Pim