Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I have written some functions to be executed from the 3dsmax menu.
Therefore I created a file 3dsmax/Macroscripts/myScript.mcr.
As I want to re-use functions for multiple commands, I created a struct for it.
If I place a new struct inside the macroscript function, then I can use that struct.
But I need to use that struct in multiple different commands.
But if I try to define the struct outside the Macroscript function, it is not found.
Anything I am missing?
Some example:
struct modSceneScripts_global ( ,fn splitFileName &file &ext = ( for c = file.count to 1 by -1 do if (file[c]==".") then ( ext= substring file c (file.count - c+1) file= substring file 1 (c-1) return OK ) ) ) macroScript Mod_new category:"Inhouse" buttontext:"Modify Scene" tooltip:"Modify Scene" ( struct modSceneScripts_local ( ,fn splitFileName &file &ext = ( for c = file.count to 1 by -1 do if (file[c]==".") then ( ext= substring file c (file.count - c+1) file= substring file 1 (c-1) return OK ) ) ) localClass= modSceneScripts_local() globalClass= modSceneScripts_global() )
Solved! Go to Solution.