Notifications
Clear all

[Closed] Edit Macroscript from within Customize User Interface

This might not be an exact Maxscript related question but I assume you guys who hang in this area might have the solution.

When I rightclick on a script in here and pick Edit Macroscript, it creates a copy and puts it into the %localappdata%\Autodesk … folder.

I wonder if its possible to edit the original file directly.

The particular reason is following. Scripts add themselves into Categorys in a way that might or might not seem logical.
The unlogical one means that you need to know/remember what that dude’s name was who created that script you’re currently looking for.
So, to save my precious brain RAM I use to put them all into one category. So recently I thought I did come up with the splendid idea of right clicking, modifying the category location, then restart MAX (btw, is there a way to flush this thing, so I wont need to restart?) and voila! they’re all in my category… Except… I didnt change the original MCR file so they are still there, in their own category as duplicates.

I know I could go browse the 3dsmax folder, go find the scripts and do the changes there. But I really like the Customize User Interface window and its easy to do things from there.

Any suggestions?

10 Replies
2 Replies
(@gazybara)
Joined: 11 months ago

Posts: 0

I assume that you have already tried this example

edit @"C:\Program Files\Autodesk\3ds Max 2012\UI\MacroScripts\Macro_Notes.mcr"
(@haider_of_sweden)
Joined: 11 months ago

Posts: 0

Nice!

Actually I haven’t tried that out. However, using that solution out of the box wont help me because I would need to know where the file is located. It could be all from .\UI\Macroscripts to .\Scripts and so on.

However, I have a more interesting question for you.
How do I tweak the context menu that appears and gives me the option Edit Macro Script. It would be awesome to change that so it gives me two options where the other one is “Edit Original Macro Script”

I assume that the context menu is built up through script as well (cant help it being ex-maya user where alot of UI elements can be tweaked through script )

Yeah this is boring, but the only way I see is to edit the macroscripts from outside 3ds Max, in their original folder. then you have to change the category:“xxxxx”.

I think that can be done using MaxSDK but this is hard topic for me.
Maybe someone else can help you with that.
Cheers!

When I rightclick on a script in here and pick Edit Macroscript, it creates a copy and puts it into the %localappdata%\Autodesk … folder.

are you sure ? I think it’s actually the case when you install a macroscript it installs a copy to the local ui\usermacros folder, so when you select the menu item you are editing the one max is using at runtime. Its just the same when a script error occurs the local one is opened max doesn’t create a copy of the original and open that. Max doesn’t know about the original at runtime.

2 Replies
(@haider_of_sweden)
Joined: 11 months ago

Posts: 0

yup. Try it yourself.
I get the idea – you dont want to destroy original scripts. In case things mess up – the first tip you will get is to erase the 3dsmax folder inside %localappdata% and start fresh

But if people would’ve start messing around with the original scripts – whether they are such that came with 3rd party applications or built-in – you would’ve need to reinstall to make max work again.

But once you know what you are doing and how things work – you would be careful.

Lets hope more people take a look into this post and maybe someone knows a way to override it through MaxScript.

(@denist)
Joined: 11 months ago

Posts: 0

unfortunately the max behavior is different. you installed the macros in max\ui\macroscripts directory. when you edit the macros with RC the max copies the original file to local directory like …\AppData\Local\Autodesk\3dsMax\2010 – 64bit\enu\UI\usermacros
and uses this copy next time after load. I hate it! and I have my own macro script loader placed in startup directory to load all my marcos from a specific place for sure.

tell us more about it.

And about the previous question I asked:

… can there be something done to it?
That would give us the possibility to query the path to the original script and then edit it using the edit @”…” command.
If that’s not possible through scripting, then if someone knows any other script that lists scripts and categories similar to the Customize User Interface window.

FYI, it works by going to the macroscript folder as defined by the User Macro settings. It doesn’t go to the %localappdata%, it goes to getdir #usermacros. If you change that directory it changes where it defaults to expecting the user macros to be.

-Eric

1 Reply
(@haider_of_sweden)
Joined: 11 months ago

Posts: 0

You’re talking about Customize > Configure System Path > Additional Macros path?

while mentioning it, I take the chance to ask some questions about those Additional Macros, Scripts, Startup and so.

So everything that ends up there are duplicates? Its never required by the user to put stuff there?
Why i ask is another issue I am struggeling; what should I backup before reinstalling. At the same time, I want to separate things.
I realize that different developers put their stuff into different folders which makes it more tricky for us who have difficulties understanding all those things