HEllo there, Sorry the title is not really explicite
So, i am entering slowly into studies and reasearchs for authoring Zbrush Plugin, the objective is about to improve my tools pipeline, but i just reached a limit and i have no idea how i could fix this issue.
let me explain you all this :
It a plugin to deal with exportation , but i wanna replicate some ui buttons available into Tool:Export mainly in this specific case.
I choose to start to work with obj format right now, and this is the reason why i need to access the export settings in Tool:Export:.
I used Two Switchs and it works seamlessly within the plugin panel in direction of tool:export,
But I am aware that if any people try to edit the export setting from the original place in Zbrush Ui ( tool:export),
The new statement on my plugin is not reflected.
I know that the Second argument of the Iswitch function, define if the button is enable(1) or disable(0).
so i want this argument to be dynamic and listen/tick if the original switch button has been changed.
Let me show you the part of the script :
[ISwitch, “Zplugin:RedTools:GoZ Maya:T”,
//check what is the current state of tool:export:tri, the value to return must to be 0 or 1,
//it must to check the default value when the plugin start at zbrush startup, but it must to update if we click on the original button from Ztool : export
[IGet, Tool:Export:Tri] // <— this function should be dynamic if i clicked on Tool:Export:Tri
, “export triangulized model”, //button tooltip
//enable button
[If, [IGet, Tool:Export:Tri] !=1, // if triangle is not enable,
[ISet, Tool:Export:Tri, 1]
[ISet, “Zplugin:RedTools:GoZ Maya:Q”, 0 ]
,//else
[ISet, Tool:Export:Qud, 0]
]
,//endif
//disable button
[ISet, Tool:Export:Qud, 1 ]
[ISet, “Zplugin:RedTools:GoZ Maya:Q”, 1 ]
]
[ISwitch, “Zplugin:RedTools:GoZ Maya:Q”,
//check what is the current state of tool:export:qud
[IGet, Tool:Export:Qud]
, "export quad model ", //button tooltip
//enable button
[If, [IGet, Tool:Export:Qud] !=1, //If Quad is not enable
[ISet, Tool:Export:Qud, 1]
[ISet, “Zplugin:RedTools:GoZ Maya:T”, 0]
,//else
[ISet, Tool:Export:Qud, 1]
]//endif
,
//disable button
[ISet, Tool:Export:Tri, 1 ]
[ISet, “Zplugin:RedTools:GoZ Maya:T”, 1 ]
]
Here it works but only read the state of tool:export:tri at the startup.
I tried that , but it may return a bad value and the plugin won’t rebuild[ISwitch, “Zplugin:RedTools:GoZ Maya:Q”,
//check what is the current state of tool:export:qud
// [IGet, Tool:Export:Qud] //disable
[If, [IPressed, Tool:Export:Qud],
[ISet, Tool:Export:Qud, 1]
,//else
[IGet, Tool:Export:Qud]
]
, "export quad model ", //button tooltip
//enable button
[If, [IGet, Tool:Export:Qud] !=1, //If Quad is not enable
[ISet, Tool:Export:Qud, 1]
[ISet, “Zplugin:RedTools:GoZ Maya:T”, 0]
,//else
[ISet, Tool:Export:Qud, 1]
]//endif
,
//disable button
[ISet, Tool:Export:Tri, 1 ]
[ISet, “Zplugin:RedTools:GoZ Maya:T”, 1 ]
]
Sorry but look like there is no code tag on the forum, and coloring text is not featured too , so i used big font to show you what is wrong.
Any kind of help would be greatly appreciated 
Nicolas


Every IButton, ISlider and ISwitch is evaluated when you load the .zsc file but the zscript commands they contain are not executed until someone interacts with the interface item they generate. If you activate another zscript or zplugin, the focus shifts and your code stops executing.