PDA

View Full Version : biginer help


juako
02-15-2007, 03:56 AM
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

MerlinEl
02-15-2007, 07:38 AM
Create Callbacks:

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

Remove Callbacks:
deleteAllChangeHandlers id:#MyCallback

juako
02-15-2007, 03:23 PM
thanks MerlinEl

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

thanks

MerlinEl
02-19-2007, 12:17 PM
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 ;)

juako
02-22-2007, 02:28 AM
thanks MerlinEl!!!

CGTalk Moderation
02-22-2007, 02:28 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.