PDA

View Full Version : (Solved):Zplug missing path problem



cgvinny
01-19-10, 01:41 PM
hey guys !

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

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 !

marcus_civis
01-19-10, 02:58 PM
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,

cgvinny
01-19-10, 03:17 PM
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

cgvinny
01-27-10, 05:36 AM
solved for the second problem : it was a useless bracket