How to Restore Figure Shape

Looking for the scripting method to restore figure shape, or for that matter, activate any of the actions in the Edit -> Figure menu. 

Comments

  • See this sample file (and, if you use its code, make sure you abide by the license terms) http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/start#actions

  • CStratCStrat Posts: 17

    For anyone else interested, the specific action is 

    DzRestoreFigureShapeAction

    And the link Richard provided can help you set up the trigger, for example (and as stated, please use proper attribution since this code comes from the Docs):
     

    triggerAction("DzRestoreFigureShapeAction");    function triggerAction(sClassName) {        var oActionMgr = MainWindow.getActionMgr();        if (!oActionMgr) {            return;        }        var oAction = oActionMgr.findAction(sClassName);        if (!oAction) {            MessageBox.warning("The \"" + sClassName + "\" action could not be found.", "Resource Error", "&OK", "");            return;        }        if (!oAction.enabled) {            MessageBox.warning("The \"" + oAction.text + "\" action is currently disabled.", "Resource Error", "&OK", "");            return;        }        oAction.trigger();    }

     

Sign In or Register to comment.