ZBrushCentral

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

http://www.zbrushcentral.com/showthread.php?94752-Useful-small-ZScripts-and-Macros-for-ZBrush-4-amp-4R3&p=848052&viewfull=1#post848052

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…

Dig right in. http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/technical/

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

Agree with Doug :slight_smile:

You can read http://docs.pixologic.com/user-guide/customizing-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 :wink:

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

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).

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

Haha Super Marcus is a very civil person :wink:

He’s ZScript Rescue force best agent :cool:

( Just as I told you doug :wink: )

PS: I’m not being sarcastic at all here

you da man…thank you

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.

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. :wink:
Probably

 and 

don’t need to be there.

As Dr Jones said, "

" and "

" 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.

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).

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 :slight_smile:

Cheers

Chris.