1. #1
    Member Follow User Gallery
    Join Date
    Nov 2006
    Location
    Ontario,Canada
    Posts
    98

    Exclamation Would like a script to displace all canvas layers horizontal and vertical by 512

    Would like a script to displace all canvas layers horizontal and vertical by 512...for creating seamless textures on the canvas without have to merge layers and ~ move.

    please please....thx

  2. #2

  3. #3
    Member Follow User Gallery
    Join Date
    Nov 2006
    Location
    Ontario,Canada
    Posts
    98

    Default

    That doesn't do what i'm wanting...displace each layer by 512 H x 512 V...so I dont have to do each manually or merge layers to ~ move doc.....

  4. #4

  5. #5
    Member Follow User Gallery
    Join Date
    Nov 2006
    Location
    Ontario,Canada
    Posts
    98

    Default

    Quote Originally Posted by Doug Jones View Post
    sorry...i don't claim to be a scripter of any kind....

    I tried just recording a zscript...assuming it was like an action/macro?....but didn't work for me


    ...anyone could help me out with a script for this...would be much appreciated, currently I have to go through each layer and manually do it for each one...not entirely time consuming, but its more of an inconvenience than anything...

    thx

  6. #6
    Senior Member Follow User Gallery
    Join Date
    Nov 2012
    Location
    BELGIUM Liège
    Age
    39
    Posts
    160

    Default

    Agree with Doug

    You can read http://docs.pixologic.com/user-guide...zbrush/macros/ maybe it could help you to nail the basics of your script.

    Don't hesitate to ask for help with your zScripting code

    ( Think that again, this belongs more in zScripting help section )

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

    Default

    Just copy this code into a text file and save it to your ZStartup/Macros/Misc folder. The file name will become the button name. Press Macro>Reload All Macros and your button should appear in the Macro palette. Note that any model in Edit mode will be dropped out of Edit (there's no warning).

    [IButton,???,"Offset all layers",
    [IShowActions,0]
    [VarSet,hAmount,[IGet,Document:Width]/2]
    [VarSet,vAmount,[IGet,Document:Height]/2]
    [ISet,Layer:W,1]
    [Loop,16,
    [VarSet,layerID,[Val,3852+n]]
    [If,[IsEnabled,layerID],
    [IClick,layerID]
    [ISet,Layer:Displace H,#hAmount]
    [ISet,Layer:Displace V,#vAmount]
    ,
    [LoopExit]
    ]
    ,n]
    ]


    Note that this offsets by half the document height/width. I thought that would be more useful than setting it to a specific value (though you can easily change that if you wish).
    Last edited by marcus_civis; 11-27-14 at 12:41 AM.

  8. #8
    Senior Member Follow User Gallery
    Join Date
    Aug 2011
    Location
    Mebane, NC
    Posts
    4,194

    Default

    Do you have a large document and want to make a bunch of different ones from it? Only reason I can think of...

  9. #9
    Senior Member Follow User Gallery
    Join Date
    Nov 2012
    Location
    BELGIUM Liège
    Age
    39
    Posts
    160

    Default

    Haha Super Marcus is a very civil person

    He's ZScript Rescue force best agent

    ( Just as I told you doug )

    PS: I'm not being sarcastic at all here

  10. #10
    Member Follow User Gallery
    Join Date
    Nov 2006
    Location
    Ontario,Canada
    Posts
    98

    Default

    you da man...thank you


    Quote Originally Posted by marcus_civis View Post
    Just copy this code into a text file and save it to your ZStartup/Macros/Misc folder. The file name will become the button name. Press Macro>Reload All Macros and your button should appear in the Macro palette. Note that any model in Edit mode will be dropped out of Edit (there's no warning).

    [CODE][IButton,???,"Offset all layers",
    [IShowActions,0]
    [VarSet,hAmount,[IGet,Document:Width]/2]
    [VarSet,vAmount,[IGet,Document:Height]/2]
    [ISet,Layer:W,1]
    [Loop,16,
    [VarSet,layerID,[Val,3852+n]]
    [If,[IsEnabled,layerID],
    [IClick,layerID]
    [ISet,Layerisplace H,#hAmount]
    [ISet,Layerisplace V,#vAmount]
    ,
    [LoopExit]
    ]
    ,n]
    ][/CODE]

    Note that this offsets by half the document height/width. I thought that would be more useful than setting it to a specific value (though you can easily change that if you wish).

  11. #11

    Default

    Hello.

    Thanks for sharing this script I have been needing this for a while.

    I have followed the instructions to install it but when I reload macros it does not appear.

    I am using the latest version of Zbrush 4r6.

    Any suggestions?

    Thank you.
    Chris

    Notes:
    I have tried restarting zbrush as well.
    I have made sure I installed the script text file into the MISC folder.

  12. #12
    Senior Member Follow User Gallery
    Join Date
    Aug 2011
    Location
    Mebane, NC
    Posts
    4,194

    Default

    Latest version is Zbrush 4r6 P2. You may not have copied the code correctly or named it wrong. Doesn't take too much with computer code.
    Probably [CODE] and [/CODE] don't need to be there.

  13. #13
    Senior Member Follow User Gallery
    Join Date
    Nov 2012
    Location
    BELGIUM Liège
    Age
    39
    Posts
    160

    Default

    As Dr Jones said, "[CODE]" and "[/CODE]" are not part of the script, it's some stray forum tag that shouldn't be visible. That must be the problem if you included them in your file.

    If it still doesn't work, check that your file has the .txt extension. You could also try to load it manually, going into ZScript > Load, so ZBrush will tell you about the eventual errors in the bottom panel.
    ZAdjustor Plugin for ZBrush : adjust Draw Size, Focal Shift and Z/RGB Intensity by simply moving your mouse/stylus while holding down a hotkey, just like in photoshop, mudbox, mari, maya... Many options.
    ZAdjustor0.92 for ZBrush 4R7/4R6 32bits OsX - (OSx version for ZB4R7 64bits coming soon)
    KeuPon is Jean-Julien JUPINET

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

    Default

    Here's the macro as an attachment you can download. Make sure you save the file to your ZBrush 4R6\ZStartup\Macros\Misc folder. Press the Macro>Reload All Macros button and then you should have a new "Offset Doc" button in the Macros>Misc sub-palette (you may need to click on the sub-palette titles to open them).

    Offset Doc.txt

  15. #15

    Default

    It works!

    Oh wow. Thanks so much for the help and the script. It works perfect and will be a HUGE time saver!

    I've got to learn to make these scripts

    Cheers

    Chris.

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
  •