I haven't defined anything as a string (the script text is above) Other scripts don't define the names as strings so I don't understand why mine isn't working :( :P
It isn't defined at all. A block inside a "on button pressed" can't acces local variable from an other block. You have to redefine the path. See my code above. Then, you don't have to specifically define the type"as string", Max does it by itself.
Hey guys, I've been working on a small script to make my workflow a little faster at work. It's a multi .CNT (custom format) exporter. I want it to export to the defined path using the model name as file name. eg, C\Users\Greentooth\Desktop\Box001.CNT and repeat this for every selected model in the scene. I've been playing…
because $ is the same as selection as array. If you have multiple objects selected, $ returns an array of all those objects. Hence you can't access the name with $.name. Also there is a scope issue, as you define folderpath under "on btn_browse pressed" folderpath is local variable, so it is undefined under on btn_export…
mmh i'm not able to get using:exporterPlugin.Classes[13] to work. What format do you want to save to? Iges ? We could simply define the extension. on btn_export pressed do ( sel = selection as array folderPath = edt_path.text --redefine folderPath here theClasses =exporterPlugin.classes for obj in sel do --for each object…
Class 13 is a custom format we have here at work. The new snippet you sent works a treat! Thank you very much for helping me out man, sorry to pull you from your LoL game :P Here's the final script in case anyone wants to use it (you will have to change the exporter plugin class) To see the list of classes you have type…