I LOVE that Carrara is openly extensible and the samples and cookbook are helpful.
However, I really would like a sample code of how to
1. change an object’s x,y,z translation
2. rotate the object
3. set a keyframe
I have achieved setting a keyframe. But every time I try to rotate an object the scale changes also.
I use the I3dShTreeElement:
TMCCountedPtr<I3DShTreeElement> object;
I set the time using:
MicroTick inTime=180000;
scene->SetTime(inTime,true,false,false,false);
Thanks to Carrara’s auto keyframing, any changes set will create a keyframe at the above time.
But I can’t transform an object accurately. So can someone give me an example that is the best practice
that is equivalent to the following:
object.xPosition+=10;
object.yPosition+=10;
object.zPosition+=10;
object.xRotation=45 degrees;
object.yRotation=45 degrees;
object.zRotation=45 degrees;
I appreciate any help greatly.


