1. #1
    Senior Member Follow User Gallery
    Join Date
    Oct 2005
    Location
    USA
    Age
    35
    Posts
    1,066

    Default updating run on all subtools zscript to 4r8

    I need help!

    None of the zscripts that I have written that run commands on all visible subtools seem to work anymore with zbrush 4r8. I'm not sure what all has changed on the zscript side with 4r8 and I've been banging my head against my desk trying to sort it out.

    I don't get any errors in zbrush when I load the script or when it runs. It will even spit out my print command at the end of the script telling me that everything ran. It's as if it is running, yet no commands are executed.

    Here is the sample code that I am tweaking to do what I need. I got it off of these forums awhile ago. I know there are a few different ways to do this so if there's a better way please let me know. Thanks!



    [VarDef,totalSubTools,0]
    [VarDef,subToolPath,""]


    [RoutineDef,DoIt,//start of routine
    //put code here for whatever you want to do
    [Note,"TEST"] //this note just to show - remove
    ]//end of routine



    //ZBRUSH MACRO
    [IButton,???,"Do for all Visible SubTools",
    [IShowActions,0]
    [IConfig,4]
    [If,[IExists,Tool:SubTool:SelectDown],//this makes sure that we've a 3D model selected
    [VarSet,totalSubTools,[StrExtract,[IGetTitle,Preferences:Misc:SubTools Count],10,256]]
    //go to top of subtool list
    [ISet,Tool:Sub Tool:SubTool ScrollBar,0,(totalSubTools-1)]
    [IPress,Tool:Sub Tool 0]
    [Loop,totalSubTools,
    [VarSet,isVis,0]
    [If,pos < 8,
    [VarSet,subToolPath,[StrMerge,"Tool:Sub Tool ",[Val,pos]]]
    ,
    [VarSet,subToolPath,"Tool:Sub Tool 7"]
    ]
    [If,[IModGet,#subToolPath=]=>=16,//if the subtool is visible
    [RoutineCall,DoIt] //call the routine for what we want to do
    ]
    [If,[IsEnabled,Tool:SubTool:SelectDown],
    [IPress, Tool:SubTool:SelectDown]
    ,//else no select down so end of subtools & exit
    [LoopExit]
    ]//end if
    ,pos]//end loop
    //go to top of subtool list
    [ISet,Tool:Sub Tool:SubTool ScrollBar,0,(totalSubTools-1)]
    [IPress,Tool:Sub Tool 0]
    ]
    [Note,"TEST COMPLETE"]
    ]//end of macro button




  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Hi Eric,

    I've just posted a new thread with the changes needed for 4R8:
    http://www.zbrushcentral.com/showthr...ecting-ZScript

    Let me know if you've any questions!

    Cheers,

  3. #3
    Senior Member Follow User Gallery
    Join Date
    Oct 2005
    Location
    USA
    Age
    35
    Posts
    1,066

    Default

    Absolutely perfect Marcus! Exactly what I needed!

    THANK YOU!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •