1. #1
    New Member Follow User Gallery
    Join Date
    Oct 2014
    Location
    turin
    Posts
    8

    Default how to rename 3D layers

    Hi

    aaaaa chrome crashed,second time I'm writing this post hope it is not going to appear double hahha

    Soo, i'm new in scripting but i'm already in love with it
    i'm about to finish a plugin but i got stuck renaming 3d layers
    i would like to create a zscript that create always the same 5 layers with the same 5 names
    v1
    v2
    v3
    v4
    rec
    nothing variable and no custom keys i would like just always the same 5 layers

    I found this super useful post from marcus_civis
    http://www.zbrushcentral.com/showthr...eUtils-for-4R8
    if you are going to read it,thank you for adding also the txt file on it
    but hard to say i'm definitively to noob in scripting to extract what i need from it

    thank you
    Mattia

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

    Default

    The attached zscript will show you how to do it. It uses the ZFileUtils that you have the link to.

    The CheckSystem routine is important because it checks for the DLL file and assigns the correct path to the dllPath variable. If you change the name of the MyPluginData folder (which has the DLL files) make sure you edit the CheckSystem routine correctly.

    There's an odd thing that ZBrush does with the names you are using, where the first two layers change the names v1 to V1 and v2 to V2. rec gets changed to Rec as well. I don't think there's a way around this.

    As you're new to zscripting try and understand what the code is doing. Simply cutting-and-pasting invariably leads to errors sooner or later.


    CreateLayers.zip

  3. #3
    New Member Follow User Gallery
    Join Date
    Oct 2014
    Location
    turin
    Posts
    8

    Default how to rename 3D layers

    wow, so fast!!

    thank you very much marcus_civis i will try it as soon as i will arrive at home!!
    but looking at the script i was pretty far from the solution


    will do!!
    before study it, and change the path(if i will need it)
    at the moment i just have to copy the files
    .dll and .lib on
    C:\Program Files\Pixologic\ZBrush 4R8\ZStartup\ZPlugs64\MyPluginData
    and run the script right?


    thank you again

    Mattia

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

    Default

    You don't need to install the example - it's not a plugin:

    1. Unzip the file to your Desktop. The unzipping may create a folder, that's OK. Inside should be the CreateLayers.txt file and the MyPluginData folder (with two files inside). Leave everything as it is.
    2. Start ZBrush.
    3. Press the Load button in the Zscript palette.
    4. From the Open dialog, navigate to your Desktop and select the CreateLayers.txt file. ZBrush will load the script.
    5. The button will be at the bottom of the interface in the ZScript Window. Press 'H' on the keyboard to show it.
    6. With a 3D model selected in the Tool palette, press the button.

  5. #5
    New Member Follow User Gallery
    Join Date
    Oct 2014
    Location
    turin
    Posts
    8

    Thumbs up

    ook thanks, perfect!!
    it works like a charm!!

    thank you again

Tags for this Thread

Posting Permissions

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