ZBrushCentral

scripting question

Hi

i have two questions …

  1. i use this script [IReset] , but when i run it they appear a message that say initialize and continue or skip etc…
    i want to not see this message just doing the command , is there a way ? Also if i make script with button that use [IReset] command , when i press on the button and i then on initialize and continue the zbrush crash … :frowning:

  2. is there a way when i run big script and it start to do all the commands but if i press ESC button the script stop , is there a way to set something on the code of this script that if i press escape button the script will stop but do something other that i want
    for example : if escape button is press do this /

Hope all this make sens

Thanks !

Just one more thing

is there a way to do this command but without clone the texture ? just to export it on this directory

[IPress,Tool:Texture Map:Clone Txtr]
[IPress,Tool:Texture Map:TextureMap]
[FileNameSetNext,“ZSTARTUP_ZPlugs64/ZBuilder/Data/ZBuilder2.psd”]
[IPress,File:Texture:Export]

Hi,

  1. You can do it like this:
    [IKeyPress,13,[IReset,4.73]]

(The IKeyPress command simulates a key press and the 13 is the code for pressing Enter. )

  1. Unfortunately no. This is something that would be very useful but at the moment there is no way to implement it.

  2. You can’t do this either. The only possible way is to export the model as an OBJ, in which case the texture map is exported as well (as a BMP file) but that’s not a very satisfactory method. It’s simpler to clone the map and export from the Texture palette. I agree that it would be better to export directly.

Thanks so much Marcus !

just one more thing ,

is there a way when i create new layer and if i click on fill color or poly paint from texture , the layer did not get any color information from this commands … Is there is a way to make it to work wit some script or something ?

and if is possible to have a script that remember the position of the model -store position / restore , something like Zaplink store/restore view position
Thanks !

Hi,

I think it may be possible to script a solution to the polypaint layer problem but I need to test some code which I’ll do tomorrow. Storing model positions is straightforward and I’ll post code for that tomorrow.

Hey Marcus ,

just wanted to ask you did you find some free time to test the scripts ? i m sorry to bother you i know you are very busy

thanks alot

Hi,

Yes, here are a couple of scripts for you.

The ViewButtons works in much the same way as the ZAppLink Views except it is a bit simpler and doesn’t automatically set the Back view when you set the Front view and so on.

The FillColor script is basically a routine for filling a model with color which will work when a Layer is in Record mode. Once the layer is filled with color then the Polypaint from Texture should work. The script has a button which tests this but I did find that sometimes the texture won’t be converted to polypaint unless you press the button a second time. I’ve not yet found out why but I’ll post a solution as soon as I find one.

Both scripts will show up in the Zplugin palette.

Any questions, let me know.

Thanks so much Marcus !!!

Hi Marcus

i play with view buttons , they works great !
Please can you edit the code and make just one button doing this: store view , open project , restore view …

Also is there a way of code that hide all layers (eye) and show only selected ?

i find some strange issue with layers , for example if i have a layer that have sculpt and polypaint when i split this layer . The sculpted part did’t able the options to merge down or duplicate or invert … Do you know why ?

Thanks !

Here are two more examples for you. The Layers script will turn all layers off except the selected one. The View script has two buttons, one for storing the current view of the model and the other for restoring the view. The view is automatically stored with a Project file (ZPR) so that when reloaded the view can be restored.

I don’t have any insights about layers, I’m afraid. I know they can be unreliable, especially when polypaint is involved. I’ll do some more testing when I get time.

Thanks so much Marcus !

Hey Marcus ,

i just wanted to ask you about this issue that i have .

For example i have a grey model and i create a layer with record turned on , i start to paint just a simple lines with different colors but the borders of the lines is sharp and toothed. If i just paint on the model without layers the borders are fade in and smooth … I think this is some layer bug or something ?

Thanks !

I’m afraid I don’t know why this is happening. I tried to reproduce it but couldn’t - but polypainting on layers definitely has some problems (plenty of people have reported issues). So yes, it looks like a bug.

Thanks for the replay Marcus , i understand …

Hey Marcus ,

thanks so much for all the help !

i just wanted to ask you is there a way to have a script that do this : create layer and name it automatically ? for example i need to create a two buttons that create two empty layes named color and sculpt

Thanks!

You’re welcome. :slight_smile:

Naming layers using zscript is not directly possible but TVeyes came up with a way that works on MacOSX - I’m looking to see if a similar method will work on Windows.

I’ve sent you a PM. I got it working but I need to revise the code for MacOSX before releasing as an update to the ZFileUtils, so have sent you the Windows only version to try.

it works great Marcus ! Thanks so much !

You’re welcome! :slight_smile:

Hi Marcus

just wanted to ask you is there a way to have save and load view buttons on this script that you early made ?
i attach it .

Thanks !