PDA

View Full Version : trying to store the current tool



fiddidilip
03-05-10, 02:43 AM
i am trying to store the currently active tool so that i can reselect it after running a section of script that works on other meshes
I'm assuming this should work but it doesnt :cry:


[VarSet,currentmesh,[FileNameExtract,[GetActiveToolPath],2]]

---code working on other meshes here----

[ISet,Tool:currentmesh]


also is there a listener in zbrush so i can see what the script is doing and where it fails to run?

cheers in advance

marcus_civis
03-05-10, 03:05 AM
You're not actually setting anything with your [ISet] command.

You don't really need the name of the tool to recall it. A simpler way is to store the number from the Item Info slider that's at the top of the Tool palette:


[VarSet,toolID,[IGet,Tool:Item Info]]
//do stuff
//recall tool
[ISet,Tool:Item Info,toolID]

For debugging you can use the [Assert] command, so that if the tested value isn't true the execution aborts. Alternatively, putting in a [Note] where you want to see a return value is a good way of checking execution. There's no listener as such.

HTH,

fiddidilip
03-05-10, 03:44 AM
works a treat cheers for that ;)