Notifications
Clear all

[Closed] Reset Pose All

I need help, Someone can clarify the question of how to reset the transformations of all objects that have applied attribute holder with just 1 click?
I have very little knowledge about maxscript, so any help is welcome.

clearlistener() 

 b = $
 m = EmptyModifier name:"Reset Pose"
 ca = attributes BrowsCtrls
 

	(
	rollout rol "Reset Pose"
	(
			button rstsel "Reset Selected" width:120
			button rstall "Reset All" width:120 height: 35

		
			on rstsel  pressed do 
			( with undo on 
			  try (	
					for u in 1 to 3 do 
					(selection[1].pos.controller[u].controller.value=0.0
					 selection[1].rotation.controller[u].controller.value=0.0	
					)
				)
				catch(print "error")
			   )
			
			on rstall pressed do 
			( code here )
		
		
	)
 )
 custattributes.add m ca
 addmodifier b m