Notifications
Clear all

[Closed] reset button

hi guys,
i created reset button , and now i wanna when pressed this button my object hole back to [0] position! what type of order i can used.?

ca=attributes fak
(
	rollout R1 "reset"
	(
		button reset "ResetPosition"
    )
	on resetposion pressed do
	(
		[B]?[/B]
	)
)
custAttributes.add $.modifiers[1] ca
2 Replies

Hi


ca=attributes fak
(
	fn resetPos obj = if obj != undefined do obj.pos = [0,0,0]
	rollout R1 "reset"
	(
		button btnr "ResetPosition"
		on btnr pressed do resetPos selection[1]
    )
	
)

em = EmptyModifier()
addModifier $ em
custAttributes.add $.modifiers[1] ca

wow tnx MerlinEl, it really work.