THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2010 at 15:57, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) : C.O.F.F.E.E ;
---------
In R11.5 and lower I use scripts to export and import animation to text files
(ie chan export and import).
In R12 only the PSR values are keyframed (CallCommand(12410)) correct
but not object parameters when importing.
Using "Add Keyframe Selection", keys are set but no animation are set.
Values are simply not recognized.
Could this be connected to the pointselection/linkfield issue (no update until Event)?
Below is the part in the loop that sets FocalLength and Aperture (R11.5 OK, R12 not).
// asize is the amount of columns in txt file
// warray is the column used
if(op->IsInstanceOf(Ocamera) && asize > 7 )
{
var apert = op#CAMERAOBJECT_APERTURE / aspect;
{
if(format == 0 && warray[7]!=NULL) op#CAMERA_FOCUS = apert/(2*tan(Radians(warray[7])/2)); // chan verticalFOV
if(format == 1 && warray[7]!=NULL && warray[8]!=NULL)
{
op#CAMERA_FOCUS = (warray[7]); // chan TG 2.1 Focal Length
op#CAMERAOBJECT_APERTURE = warray[8]; // chan TG 2.1 Aperture Width mm
}
if(format == 2 && warray[7]!=NULL) op#CAMERA_FOCUS = (warray[7]); // ASCII Focal Length
if(format == 2 && warray[8]!=NULL) op#CAMERAOBJECT_APERTURE = (warray[8]); // ASCII Aperture mm
}
EventAdd(EVENT_ANIMATE); // <- tried but no go
op->Message(MSG_UPDATE); // <- tried but no go
}
EventAdd();
CallCommand(12410);//record
DrawViews(DRAWFLAGS_STATICBREAK);//R12
Cheers
Lennart