Scripting Issues
This is my 1st time scripting with Cheetah -- I am very familiar with javascript... so I'm just having issues learning the API.
What I am trying to accomplish is almost like the quicktime_VR script that was given, but instead of the camera moving around the object, the object would just simply rotate and at each rotation the script would render that frame. I have a quasi-working script:
function buildUI(obj){
obj.setParameter("name","lots of pictures");
obj.addParameterButton("update","RUN","take_pictures");
}
function take_pictures(obj){
var imagetype="jpg";
var doc=obj.document();
// var cam=doc.activeCamera();
for(var i=0;i<300;i++){
var newROT=new Vec3D((i*1.2), 0, 0);
obj.setParameter("rotation",newROT);
obj.update();
doc.render("/path/to/folder/"+i+"."+imagetype);
}
}
but when I place the object into the script and try to run it (render) the object in question does not show up in the rendered scene. I am sure it is something simple that I am completely unaware of -- but any help would be greatly apprecited.
THANKS
This is my 1st time scripting with Cheetah -- I am very familiar with javascript... so I'm just having issues learning the API.
What I am trying to accomplish is almost like the quicktime_VR script that was given, but instead of the camera moving around the object, the object would just simply rotate and at each rotation the script would render that frame. I have a quasi-working script:
function buildUI(obj){
obj.setParameter("name","lots of pictures");
obj.addParameterButton("update","RUN","take_pictures");
}
function take_pictures(obj){
var imagetype="jpg";
var doc=obj.document();
// var cam=doc.activeCamera();
for(var i=0;i<300;i++){
var newROT=new Vec3D((i*1.2), 0, 0);
obj.setParameter("rotation",newROT);
obj.update();
doc.render("/path/to/folder/"+i+"."+imagetype);
}
}
but when I place the object into the script and try to run it (render) the object in question does not show up in the rendered scene. I am sure it is something simple that I am completely unaware of -- but any help would be greatly apprecited.
THANKS