change default amount of frames on timeline
Hi!
We have 30 frames as default on timeline in DAZ studio. How can I change number to example 200 frames by script?
Post edited by Edpa on
You currently have no notifications.
Hi!
We have 30 frames as default on timeline in DAZ studio. How can I change number to example 200 frames by script?
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2025 Daz Productions Inc. All Rights Reserved.
Comments
It would probably be just as simple to save a scene with the desired number of frames - you are going to have to load a file either way. However, to do it in script I think you would use
Scene.setAnimRange( new DzTimeRange( starttime , endtime ) );
Scene.setPlayRange( new DzTimeRange( starttime , endtime ) );
where time is set in DzTime units - 1/4,800 of a second. So 200 frames at 30FPS would be 200 * 4800 / 30, or 32,000 (fortunately you don't have to use new DzTime( value ) - the script will, acording to the docs, accept a bare number instead of the DzTime constructor).
Again thanks :)
No, I'm stupid :) I have to determine which is the last frame in my animation. The function getAnimRange() gives 2 digits - the initial frame and the end. How can I assign for variable number of the last frame. Help me please
Number of frames will be time interval in seconds * FPS - so FPS * endTime / 4800
Richard, hi. I did write about another things a little :)
Example -
I'll have as result - string [0, 36000] to example. I have assign for variable digit 3600. How? What I have do with this string to take this digit?
I tried to work with split and substring as in Javascript with array. But I had error
That's a DzTimeRange - once you have the animRange use the members .end and .start to get the values (those are variables, not functions, so no parentheses).
var aR = Scene.getAnimRange();
var endTime = aR.end / 4800;
var startTime = aR.begin / 4800;
Ok. I didn't know about these variables - end and begin. Thank you, Richard.
Sorry, it's start not begin - dzTimeRange is documented here http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/timerange_dz
Richard, thanks