ZBrushCentral

How to add tool settings in script tab?

I’m, doing a small script, and I would like to add “displacement map res” and crop and fill “alpha depth factor” parametter in my script tab, does anybody could escribe how to?

If you know what you want to set them to, then simply use:


[ISet,Alpha:Alpha Depth Factor,22.95]

and

[If,[IExists,Tool:Displacement:DPRes],[ISet,Tool:Displacement:DPRes,1024]]

setting to the appropriate values.
The [If,[IExists… statement is useful for the DPRes because the slider is not always available and so simply doing an {Iset might cause an error.

If you wish to be able to vary the values then you’ll need to create sliders which then set the Alpha DEpth or DPRes sliders:


[ISlider,"Slider Name",CurValue,Resolution,MinValue,MaxValue
,"Popup info Text"
,[If,[IExists,Tool:Displacement:DPRes],
[ISet,Tool:Displacement:DPRes,[IGet,"Zscript:Slider Name"]]
]

HTH,

Thanks a lot Marcus, I will try that.