When does the ZScript execute.(one that loads at startup)
I can see it connect to all fileExecute dll's on load,
But it seems to not actualy run the rest of the script if there is a button in it. Except that my variable all get set correctly. I am most interested in global routine calls.
I am kind of confused.
I have made scripts that run everything when ZBrush loads, setting imageSize and buttons visible and whatnot.
So Is my script executing all global calls (anything not in a button) twice if there is a button there.
It appears it runs everything when I click the button again.
How would you make it not re-run the script (mainly global routine calls). I am probably missing something simple here. I will try to post an example of what I am talking about if no-one understands me.
edited: added example file ================================================== =====>>Place both the TXT and ZSC files in zbrushRoot.../ZStartup/ZPlugs/
If you don't have a ZPlugs Folder Create one. WARNING: Any .ZSC file in this folder will load at startup.
Once files are in the folder, Restart ZBrush and in the ZScript tab, you will find the button [TestInitButtonFunc]
Press it and you will see the NoteBar at the top of the ZBrush window.
Now, this was a global routine and called globally,,,,so why is it called when I press the button?
Attached are the two files in the zip;Code:[RoutineDef,MyFunc, //** Define Routine/Function [VarSet,t1,"Only Should Be Called On Load"] [NoteBar,t1,.5] //** Set Notebar on load ,input ] [VarDef,v1,0] [RoutineCall,MyFunc,v1] //** Call Routine/Function [IButton, //** Just Clicking here will make the Notebar Show Up "ZScript:TestInitButtonFunc", "Test Global Commands", //** I would think this shouldn't run global Routines/Funcs [VarInc,v1] [If,v1>1,[NoteBar,"",0]]//** clear notebar ]