ZBrushCentral

Some questions.

how can I make


 [IPress,Z] 
 [IUnPress,Preferences:Interface:Float Menu]
 

a top level command? Trying to maximize the zscript win to display an image.
Would actually prefer to have image display in zscript window but I need to play around first. Wish I could pick apart some of the zsc files but I know thats not allowed. =(

Also, how is the new info for zscripting going by chance?
Am really curious to get some tutorials up and running but lack certain information.

thanks

Hi MTB,

The easiest way is to use an [If,…] command and place your sub level commands in there. The [If,…] command can be placed at a top or sub level in your code. Also, unlike containers (Ibutton, Iswitch, etc) the code inside [If,…] commands can be executed automatically when your script is loaded.

[[color=PaleGreen]VarDef, init, 1] //set to 1 which equals TRUE in the following [If,...] command
 
 [If, init,
 [[color=PaleGreen]IUnPress, Preferences:Interface:Float Menu]
 [[color=PaleGreen]IPress, Z] 
 [VarSet, init, 0] // set init to False
 ] // End of If command

Your code above will be run one time as soon as the script is loaded. If you do not set the init variable to false, the [If,…] command will loop forever. In that way the [If,…] command differs from other programming languages.

You probably noticed I switched the order of your two commands. It is simply a layout issue. If you do not close the Float Menu before maximizing the Zscript Window you are left with a little canvas still showing.