ZBrushCentral

Zscript: Texture Doc Resize

This script will fill and resize the document to the dimensions of the currently selected texture. It will put this on a new layer and use the current material.

Remember, this will resize the doc so don’t run it if you have important data on other layers.

Lastly, do any Zscripters out there know how to have the script exit if you select ‘no’ to the automatic resize question? I know you can use the Message command separately, but I’d rather not have to answer the requester twice.

Special Thanks to Digits and cameyo for their help!

Hope you find it useful!

texture_doc_resize.txt

Nice work, Ken!

Here’s a bit of code I use sometimes:


This just displays one message window with “YES” and “NO” buttons.

It might look a little funny to have the [MessageYesNo…] command as the condition for the [If…] statement, but in fact ZBrush knows how to handle it. If the user presses YES, the condition is true, if NO, the condition is false.

The other thing that might look a little funny is the [IKeyPress,13,[IReset]].

This means, do an [IReset] with the Return key (coded number 13) pressed. The result is, the user never sees the standard [IReset] message.

Try it – I’m pretty sure this is what you’re looking for.

dave

Thanks Ken, another spot in your commontools. Also mighty handy in my zbone and animation script when your are rotoscoping and need to keep the proportions right.