Thank you Marcus, I’m getting somewhere with your help, but now I have new concerns. Changes in my code don’t evaluate as expected upon reloading the script. I have to restart ZBrush completely in order to see the code evaluate “correctly”.
You mentioned that I should try parentheses, and I remember doing that last night, and it still wouldn’t work.
As soon as I got to my computer this morning, I typed up the following: (the routine sets the geoSize array)
[RoutineCall, Get_Geo_Size, #geoSize]
[If, (#geoSize(0) == 2),
This WORKED. However…
I removed the parentheses and reloaded the script. It did not evaluate as expected. It failed like it did last night.
[RoutineCall, Get_Geo_Size, #geoSize]
[If, #geoSize(0) == 2,
So I put the parentheses back, and reloaded the script again (Expecting it should work as it did previously). It did NOT evaluate as expected.
I had to restart the application entirely to see my code evaluate as expected. This might be why I was stuck last night, no matter what I tried I couldn’t get results that made any sense to me.
Every heard of anything like that?
The method I use to reloading / controlling is to use another reloading plugin with the following code:
[ISubPalette, CONTROL_PLUGIN]
[IButton, [StrMerge,#CONTROL_PLUGIN,":",“Reload”], “”,
[If, [IExists, #CLOSE_PLUGIN], [IClose, #CLOSE_PLUGIN]]
[FileNameSetNext, #CLOSE_FILE]
[IPress, “ZScript:load”]
,0.5]
[IButton, [StrMerge,#CONTROL_PLUGIN,":",“Close”], “”,
[If, [IExists, #CLOSE_PLUGIN], [IClose, #CLOSE_PLUGIN]]
,0.5]