1. #1

    Default I need help making a multi-subtool obj exporter script

    I have a set of subtools, I want to be able to export each individually in a zscript with their own subtool names (I don't want to use save as) as obj files.
    Here is what I have so far:

    -----------------CODE--------------

    //ZBRUSH MACRO - Recorded in ZBrush version 4.73
    [IButton,???,"Press to run this macro. Macros can be aborted by pressing the ëescí key.",
    [IShowActions,0]
    [IConfig,4.73]
    [Loop,[SubToolGetCount],//loop through all subtools
    [SubToolSelect,[Val,n]]//select each subtool
    [If,n>0,
    [VarSet,subToolPath,[IGetTitle,Tool:Item Info]]//get subtool name
    [VarSet,subToolPath,[StrExtract,subToolPath,0,[StrLength,subToolPath]-2]]//trim off period
    [IClick,[StrMerge,"Tool:Sub Tool:",subToolPath]]//turn it off
    ]


    [IPress,Tool:UV Map:Flip V]
    [IPress,Tool:Export]
    ,n]
    [IShowActions,-1]
    ]/*End of ZScript*/

    ---------------------- END CODE ----------------

    One problem is that I have to press enter after each file save, it's no big deal but would be good if it just did it automatically

    Can anyone help with this?

  2. #2
    Senior Member Follow User Gallery
    Join Date
    Feb 2015
    Location
    Paris
    Posts
    263

    Default

    Hi Robert,
    because you don't notify which name you want to give to your obj file
    try with that before the end of the loop.

    [FileNameSetNext, "subtoolname"]
    [IPress,Tool:Export]

    or to emulate the hit of enter key, [IKeypress, 13]

    Nicolas
    Plugins & Toolsets for Zbrush 4R8 : zCycler Pro | Plugin Manager |Matiere 3d | Twitter | @Facelessmindz

Posting Permissions

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