MaxScript: Change Handler

My beginner problems & solutions

Moderator: Falk

Antworten
Simon
Site Admin
Beiträge: 1678
Registriert: 10.10.2006, 16:41

MaxScript: Change Handler

Beitrag von Simon »

it's important to use the id to get access to the properties of the selected objects. if you use $.name you will get errors. if you use id.name (in this case obj.name) then all will fine.

Code: Alles auswählen

--call back
--change handler

--callbacks.addScript #modPanelSelChanged (
--	messagebox("selection changed");
--) id:#getinfos
rollout info "get scene/object information"
(

on info open do
(
	when select $objects changes obj do
	(
		$Text01.text = obj.name as string;
	)
)

on info close do
(
	deleteAllChangeHandlers()
)

)


CreateDialog info 150 150
{o,o}
|)__)
-"-"-
O RLY?
Cornelius
Beiträge: 1056
Registriert: 20.10.2006, 09:22
Wohnort: München
Kontaktdaten:

Beitrag von Cornelius »

all will "be" fine :wink:
|when you get to hell, tell them I sent you - you`ll get a group discount|
My Sketchbook
Blog
Simon
Site Admin
Beiträge: 1678
Registriert: 10.10.2006, 16:41

Beitrag von Simon »

war nur ein test um zu gucken obs jemand liest ;) hehe
{o,o}
|)__)
-"-"-
O RLY?
Antworten