Script to carry out repetitive actions.

I find that I am repeating the same actions very frequently ie
'Edit>Rigging>Adjust rigging to shape' 'Accept'
followed immediately by
'Edit>Geometry>Apply smoothing modifier'

Is it possible to achieve this (and similar repetitive actions) using a script?

Comments

  • rek_2158272rek_2158272 Posts: 0
    edited December 1969

    There's a very good chance it can be done.
    You could check the scripting docs to see if it daz script has the facilities to do what you need.
    Check the DAZ Script Api on this page: http://docs.daz3d.com/doku.php/public/software/dazstudio/3/start (docs for v. 4.x is not up to date, which is why I post a link to v. 3 docs)

  • Richard HaseltineRichard Haseltine Posts: 100,843
    edited December 1969

    the trouble is both of these are features that were not present in DS3, and so won't be in the DS3 scripting docs. I don't know if they are exposed to scripting.

  • rbtwhizrbtwhiz Posts: 2,250
    edited November 2013

    Produce a list of action group/label/classname...

    var oMgr = MainWindow.getActionMgr();
    var nActions = oMgr.getNumActions();
    var oAction = undefined;
    var aDetails = [];
    for( var i = 0; i < nActions; i += 1 ) {
     oAction = oMgr.getAction( i );
     aDetails = [
         oAction.actionGroup,
         oAction.text.replace( "&", "" ),
         oAction.className()
     ];
     print( aDetails.join( " : " ) );
    }

    Execute actions...

    var oMgr = MainWindow.getActionMgr();
    var oAction = oMgr.findAction("DzMVCCageAdjustRigToShapeAction");
    if( oAction ){
     oAction.trigger();
    }
    
    oAction = oMgr.findAction("DzMeshSmoothAction");
    if( oAction ){
     oAction.trigger();
    }

    -Rob

    Post edited by rbtwhiz on
  • frank0314frank0314 Posts: 14,049
    edited December 1969

    Thread moved to the developer discussion forum since it has to do with scripting.

  • rbel_295e7c1d4crbel_295e7c1d4c Posts: 99
    edited December 1969

    Many thanks Rob - just what I needed.

  • Causam3DCausam3D Posts: 212

    Works wonderfully.  Now, how do I turn the smoothing modifier back off with this script?

    Thanks!

  • Causam3DCausam3D Posts: 212

    Nevermind, I ran your discovery script and there it was right on top: DzRemoveMeshSmoothAction

Sign In or Register to comment.