Notifications
Clear all

[Closed] How do you Freeze Transforms without that warning window?

Greetings,
I am new to MaxScript after learning Python in Maya.
I want to use MaxScript to Freeze Transforms, but is there any way to suppress that prompt window that appears, that warns about freezing the transforms?
There must be some command for that so the script can keep going…
The MaxScript for Freeze Transforms:

select objName
macros.run "Animation Tools" "FreezeTransform"

Then…

Thanks for the help!

11 Replies

just find file Macro_FreezeTransform.mcr, and make you own version by removing all about the warning message

Thanks for the quick reply, but I can’t get it to work.
I went the Macro file and deleted the “MessageBox” Lines, but now 3DS Max won’t work. It throws up errors on startup, and when I call the “Freeze Transforms” it says, ‘does not exist.’

Can you be more specific as to how to get this to work?
Thanks!

Thanks for the tip Doc, I learnt something…

@julian3d
code is like this:

	/* "Localization on" */  
	
--	if querybox ~QUERYBOX_FREEZING_TRANSFORM_INVOLVES~ title:~FREEZE_TRANSFORMS_TITLE~ == true do 
	
	/* "Localization off" */
  
	FreezeTransform()

Previously, the query box pops up asking you to pick Y/N…now in your case you want to suppress this, implying your answer would be Y all the time…hence I’ve commented out the asking if it’s ‘true’ or not…so next line is simly to do the Freeze and don’t bother asking me to input Y/N…

I found the line to comment out in the system Macro file for Freeze Transform, but I can’t save it in the program files folder.

If I save a copy and try to put it in the MacroScripts folder, 3DS Max stops working, and I have to reinstall.

It seems that people are doing this kind of edit to the system files, how is it done?

Thanks for all the help. I know this probably seems really simple, but I still haven’t gotten it to work…

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

it’s not a good idea to change built-in max scripts (except of a fixing bugs). Just make a changes and save the script with a different name and category.

you’ve closed down all Max…and you’re the admin on that pc ?

Thanks for the quick reply!
Yes, I am admin as it’s my computer… Just says “access denied” when I try to save the Macro. I tried Notepad and Sublime already…
Guess I will just restart my computer and try again…

not until you’ve gone into UAC and dragged the slider down to bottom…

https://www.howtogeek.com/howto/windows-vista/disable-user-account-control-uac-the-easy-way-on-windows-vista/

Wow, I am totally stuck here.
First, I delved into Windows 10 to change the system Macro as Vusta suggested. I unlocked all program file folders except the 3DS MacroScripts folder! Well done Autodesk, you foiled me…

Then I tried to take DenisT’s advice, and just leave the 3DS system folders alone.
I thought to just make my own version of the FreezeTransform, and call it when needed. I copied the FreezeTransform Macro, but it’s difficult for me to comprehend.

Something about replacing the current controllers with list controllers (which act as groups and take the values so they controller underneath stays at ‘zero’…?)
Not sure what the code is to identify say, the rotation controller, and replace it with a rotation list controller, then assign a new rotation controller in the ‘available’ slot…
I can sort of understand the theory, but the code… Not sure.

Thanks for the help guys. I’m really impressed by how helpful this community is.
…must learn…MaxScript…

1 Reply
(@vusta)
Joined: 11 months ago

Posts: 0

FYI, I’m on Win7, Max2017.

I never had to unlock anything. All Program Files\Autodesk blah blah folders still have ‘read only’ on them.

I dragged my UAC slider to the bottom for all new Windoze installations coz I don’t want to be treated like an idiot…are you sure you want to do this? are you sure you want to do that ?..did you ask your mum for permission ? Screw the Windoze police.

And that’s it, comment out 1 line in

C:\Program Files\Autodesk\3ds Max 2017\MacroScripts\Macro_FreezeTransform.mcr

works immediately.

Won’t be in a rush to move to Win10 I can tell you.

First of all you have to understand what “frozen” controller is.

A frozen controller is always a List controller where the first channel is original controller with its original value (state), and the second channel is a relative offset from original value. At the begging the offset is ZERO. So the setting of the second channel to ZERO returns the controller to original value.

That’s now ‘frozen’ controllers work.

So let’s code the ‘Freezing” of a controller:

fn freezePosition node = 
(
	c = node.position.controller = Position_List()
	c.setName 1 "Origin_Position"
	c.available.controller = Position_XYZ()
	c.setActive 2
	c.setName 2 "Free_Position"
	c	
)

fn freezeRotation node = 
(
	c = node.rotation.controller = Rotation_List()
	c.setName 1 "Origin_Rotation"
	c.available.controller = Euler_XYZ()
	c.setActive 2
	c.setName 2 "Free_Rotation"
	c	
)

fn freezeTransform node = 
(
	freezePosition node
	freezeRotation node
	ok
) 


this is the basic… and it’s very simple. The full and advanced version has to check if the controller not frozen yet, if not locked, if transform not scripted, etc…
so there are still many things to do yourself