canAnimate flag on property not being saved in scene file ?

PotatoHeadPotatoHead Posts: 38

I've made a script (inspired by Casual's UnAnimate/ReAnimate https://sites.google.com/site/mcasualsdazscripts/unanimate-and-reanimate script) to allow the visibility of an item to be animated (for instance, hair can dissapear and a hood can appear) because I didn't like having to manage Visible in Render while having viewport-render disparity.

Problem is, it seems every time I reload the scene, I have to re-run the script and re-apply the visibility states on each frame.

Is there an additional function I need to call to make the modification persist ?

// DAZ Studio version 4.8.0.4 filetype DAZ Script

var numNodes = Scene.getNumSelectedNodes();
for( var i = 0; i < numNodes; i++ )
{
 var node = Scene.getSelectedNode( i );
 reanimNodeTransforms( node );
}

function reanimNodeTransforms( prop )
{
 reanimProp( node.getVisibilityControl() );
}

function reanimProp( prop )
{
 prop.setCanAnimate( true );
}
Post edited by PotatoHead on
Sign In or Register to comment.