Creating and deleting keyframes
Richard Penney
Posts: 41
After selecting a figure or prop, I need to move to a specified frame, load a preset, and create a keyframe.
Any help willl be greatly appreciated.
Comments
Is it always the same frame and preset? That should be doable, with Scene.setTime( time ) ( http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/scene_dz#a_1aef3ed273c7d75d5a78efeb9c93ce8875 ) and the Contentmanager ( http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/contentmgr_dz ) - specifically openNativeFile( name ) http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/contentmgr_dz#a_1a73a08387feb791dd038d0a2030b6cc9a
Thanks for the assistance, Richard.
To answer your question, it's going to be different frames with different presets, such as poses, shapes, materials, etc.
The Scene.setTime() works great! I only had to convert the frame value to ticks by multiplying the frames by 160 (NTSC Video).
When I load a preset at a specified frame, I discovered that I first have to select the figure or prop, but I haven't figured out how to do that yet.
For those following this thread, Scene.findNodeByLabel(sLabel).select(true) selects the specified node in the scene. Before I call this, I make sure that no other node is selected. I do this by getting an arrray of nodes with Scene.getNodeList(), and then enum through the list, calling oNode.select(false) to deselect them.
I think I'm beginning to get the hang of DS scripting. Famous last words!