ZBrushCentral

(Solved):Zplug missing path problem

hey guys !

OK i have done 3 new Zscripts, and I have to say it is very fun to learn :slight_smile:

In one of my script, i made a switch button :

when it,on it goes to topology mode, so the Zbrush interface is changing

when it’s off, a part of the script is using a button of the new interface (Tool:projection:Projection).

It works well in Zscript, but when i generate a zplug,

the first time i press the iswitch, the script tries to look for the path which doen’t exist yet and give a warning message.

the second time i press, it works fine.

ant idea how to avoid this bug ?

Thx !

Just use an If statement with the IExists command:

[If,[IExists,My Plugin:Button],//true if button exists
[Note,“Hello World, this is my Plugin!”]
,//else button doesn’t exist
[Note,“Is it that time already?”]
]//end of if statement

HTH,

Thx Marcus I just found this solution 2 minutes before your post :lol:

But there is still a problem : i don’t have the error message anymore, but it still doesn’t work the first time i click on the Iswitch (it works on the 2nd time tough).

when it is not a plugin, it works at the first time

solved for the second problem : it was a useless bracket