I want to be able to emptying PopUp-Tray, so I can control with .obj import which objects will appaear in the PopUp, for instance when I
[IPress,Tool:Geometry:InsertMesh]
[IPress,PopUp:originalobject]
Greetings, EddyL
I want to be able to emptying PopUp-Tray, so I can control with .obj import which objects will appaear in the PopUp, for instance when I
[IPress,Tool:Geometry:InsertMesh]
[IPress,PopUp:originalobject]
Greetings, EddyL
The only way to clear the popup is to reset the tool palette - which would clear ALL your loaded tools:
[IReset,3] //resets the tool palette
If you want to select an object like that in script you need to get the name when it’s loaded. If you know the file name then you could use something like:
[VarSet,object,[FileNameExtract,#filename,2]]//gets just the name from the full path
or you can get the name from the Tool palette Item Info slider (this is a better method as meshes can be renamed on loading):
[VarSet,object,[IGetTitle,Tool:ItemInfo]]
[VarSet,object,[StrExtract,object,0,([StrLength,object]-2)]]//takes off the end period
then switch to the mesh you want to add to and do this:
[IPress,Tool:Geometry:InsertMesh]
[IPress,[StrMerge,"Popup:",#object]]
HTH,
Hi Marcus, your answer is helpful, but still I am in need for a scriptway to delete specific Tools. In my zscript I use a copple of helptools that must be deleted after every extrude (I’m talking about my new plugin, NewGeoExtrude).
Now I do that by renaming every helptool with [IPress, Tool, Save As] under filename: dummy.ztl
THis works but leaves a long row of useless dummy Tools in the tray behind. Taking space in the screen and in memory.
Hope you know a workaround?
EddyL
Eddy,
The only way of deleting tools from the tool palette is by using the IReset command. You might be able to get around this restriction by re-using the same tool slot. For example, you might be able to append your new tool as a subtool of the old tool, then delete the old tool subtool.