Hey guys.
I teach Max to architects, we always need to change the coordinate system that is in the Main Toolbar to "World" instead of "View"
It would be very useful and practical to define that Max already starts in "World", mainly for beginning students.
In the old days this was made possible by a file called 3dsmax.ini or something like that, but now I can't find anything corresponding.
Can anyone help?
I thank you for your attention.
@yCekyLL wrote:I teach Max to architects, we always need to change the coordinate system that is in the Main Toolbar to "World" instead of "View"
Yeah... I know this annoying issue...
macroscript COORDS_WORLD
tooltip:"COORDS WORLD"
buttontext:"COORDS WORLD"
category:"denisT"
(
local force_def_coordsys =
(
callbacks.removeScripts id:#force_def_coordsys
callbacks.addScript #postSystemStartup "setrefcoordsys #world" id:#force_def_coordsys
callbacks.addScript #systemPostReset "setrefcoordsys #world" id:#force_def_coordsys
callbacks.addScript #systemPostNew "setrefcoordsys #world" id:#force_def_coordsys
callbacks.addScript #filePostOpen "setrefcoordsys #world" id:#force_def_coordsys
setrefcoordsys #world
)
on ischecked do (getrefcoordsys() == #world)
on execute do
(
setrefcoordsys #world
--updateToolbarButtons()
)
)
Two options:
Opt #1
Save the code above as .MCR file in one of autoloading directories
Opt #2
Copy the code in the Listener and run. The MAX will make a macro for you at
"C:\Users\<yourname>\AppData\Local\Autodesk\3dsMax\<maxversion>\ENU\usermacros\denisT-COORDS_WORLD.mcr"
For both methods, create a button for this macro script, which can be done like this:
Hi Dennis, thanks for the suggestion.
But your script works just like a button and can also be activated by a shortcut... But that was already possible with "World Coordinate system - Main UI".
What I would really like is that when starting MAX, it automatically changes to world.
I tried to put your script in the "Additional Startup scripts" folder but it had no effect. 😞
No... If you create a macro button, the coordinate system should switch to "World" every time MAX is loaded, file reset or new file loaded.
Hello again guys.
I analyzed Denis and Leeminardi's solution and indeed, the use of the "setRefCoordSys #world" command in a script in the startup folder really applies.
But it still has some more complicated problems than I imagined. As you may know the coordinate can be chosen for each tool: ( Select, Move, Rotate, Scale ) and all are originally configured for "View".
The script with just "setRefCoordSys #world" works by changing at startup just to the "Select" tool.
Also, if you switch to another tool and come back to the select tool, you'll see that everything returned the "View" coordinate.
It's actually more complicated than I thought... I just wanted all the tools to start configured for World.
:'(
try the advanced version:
macroscript COORDS_WORLD
tooltip:"COORDS WORLD"
buttontext:"COORD WORLD"
category:"denisT"
/*silentErrors:on*/
(
local force_def_coordsys =
(
with quiet on
(
callbacks.removeScripts id:#force_def_coordsys
callbacks.addScript #postSystemStartup "setrefcoordsys #world" id:#force_def_coordsys
callbacks.addScript #systemPostReset "setrefcoordsys #world" id:#force_def_coordsys
callbacks.addScript #systemPostNew "setrefcoordsys #world" id:#force_def_coordsys
callbacks.addScript #filePostOpen "setrefcoordsys #world" id:#force_def_coordsys
callbacks.addScript #spacemodeChange "if not GetQuietMode() do updateToolbarButtons()" id:#force_def_coordsys
preferences.constantReferenceSystem = true
setrefcoordsys #world
)
true
)
on isChecked do (getrefcoordsys() == #world)
on execute do with quiet on
(
if (getrefcoordsys() != #world) do
(
setrefcoordsys #world
updateToolbarButtons()
)
)
)
the button should switch to ON state if the current coordinate system is "world", and to OFF state if the coordinates are any other.
@yCekyLL wrote:But it still has some more complicated problems than I imagined. As you may know the coordinate can be chosen for each tool: ( Select, Move, Rotate, Scale ) and all are originally configured for "View".
The script with just "setRefCoordSys #world" works by changing at startup just to the "Select" tool.
it's a new condition. it can be solved, too, but it takes some thought.
OK. the new version above lets you use a constant Reference System for the Move, Rotate, and Scale tools.
@yCekyLL wrote:It's actually more complicated than I thought... I just wanted all the tools to start configured for World.
:'(
Do you want each mode to keep their own coordsys in the future? Because if not, you can check Ref. Coord. System > Constant in the Preferences and all the tools will use the same one all the time.
Can't find what you're looking for? Ask the community or share your knowledge.