Notifications
Clear all

[Closed] biginer help

Hi I’m truing to learn max script for rigging complex characters , but i cant get along with max.
I don’t know how you can put events , for example i want a box to have the exact position with another object, but only using max script, its not so hard , i hope its not so hard.
Another example , the only way i found to user events its something like this:
when select $sphere01 changes do

(

deselect $sphere01

select $sphere02

)
but the problem with this is that max scene doesnt save “when” commands.
If somebody know a tutorial or something script that interacts with the users pleas let me know
thanks

4 Replies

Create Callbacks:

when select $objects changes id:#MyCallback do
(
if $sphere01.isSelected do
(
deselect $sphere01
select $sphere02
)
)

Remove Callbacks:

deleteAllChangeHandlers id:#MyCallback

thanks MerlinEl

can you tell me if Callbacks are the only way to check human interaction , of course by script

thanks

I know these methods:


1)

fn redrawviews_p = print “Viewports Redrawn”
registerRedrawViewsCallback redrawviews_p
unRegisterRedrawViewsCallback redrawviews_p

2)
end_operation = 50
while end_operation > 0 do
(
end_operation -= 1
print “progress”
)


3)

when select $objects changes id:#MyCallback do
(
if $sphere01.isSelected do
(
deselect $sphere01
select $sphere02
)
)

4)

callbacks.addScript #nodeHide “my_function()” id:#mYFu
callbacks.addScript #nodeUnhide “my_function()” id:#mYFu

callbacks.removeScripts id:#mYFu

etc…

god luck Juako

thanks MerlinEl!!!