hi guys can anyone write here the code for assigning a float reaction controller
to a specific morpher channel ?
thanks :)
Forum topic · General Scripting
By splinterD · 2011-02-04
hi guys can anyone write here the code for assigning a float reaction controller
to a specific morpher channel ?
thanks :)
ok so this is what i have so far
splinterD · 2011-02-13
ok so this is what i hve so far
so im writing a script to connect the morphs to a gui control .
i know there is a script out there that is based on the "stop staring" mel script
but i wanted to learn some maxscript on the way so...
im running into a problem , that is more of an inconvenience .
this method is producing duble the amount of states that is really needed
to achieve this setup.
as you can see in this picture:
![]() |
| From tests |
this is what the script produce .
but what i need is more like this:
![]() |
| From tests |
now when i do it manually i just erase all the states that are created when the data is being plugged in initially .
then when i create a state it holds both of the morphs in each state.
but i cant find a way to completely remove a state with maxscript.
it just removes the information of the state and leaves an empty state.
any one knows how to get the second setup with max script ????
this is the code im using right now
----------------------------------------------------------------------------
--------- 2 point controller gui intigration with morpher-------------
------------------------------------------------------------------------------
select $test_ctrl
macros.run "Animation Tools" "TransformToZero"
clearSelection()
cont = $sphere001.morpher[1].controller = float_reactor()
reactto cont $test_ctrl.pos.controller.Zero_Pos_XYZ.controller.Y_Position.controller
cond = $sphere001.morpher[2].controller = float_reactor()
reactto cond $test_ctrl.pos.controller.Zero_Pos_XYZ.controller.Y_Position.controller
move $test_ctrl [0,0,30]
createReaction cont
createReaction cond
move $test_ctrl [0,0,-60]
createReaction cont
createReaction cond
select $test_ctrl
macros.run "Animation Tools" "TransformToZero"
clearSelection()
select $Sphere001
setreactionstate cond 1 100
setreactionstate cont 3 100
thanks everyone
splinterD · 2011-02-22
ok thanks everyone for all the help
this forum is amazing i don't believe i would be able to write even one script
without all the help i got on this site
i wrote 2 simple scripts that work together
the first one creates a gui controller with freeze transforms and position limits
and the other one lets you connect specific morph targets to the controller limits
allot like the "stop staring" mel script just less sophisticated .
but it works
you can take a look over here:
http://www.youtube.com/watch?v=EHNmcsUdUtc
thanks again everyone
Try this:
Garp · 2011-02-07
$myObject.morpher[1].controller = float_reactor()
br0t · 2011-02-07
Seems to work! Cool, didnt think its possible :P
sweet!!!
splinterD · 2011-02-12
thanks allot man , much appreciated !
br0t · 2011-02-07
I don't think you can assign a reaction controller to a morph channel. I guess you have to find a way around that, maybe add the reaction to some other object and then pass a value over to that morph channel using wired parameters or script controllers or what not.
splinterD · 2011-02-06
guys i really need this can anyone please help
anyone ?
splinterD · 2011-02-06
i cant reach the channel and add a float reaction control to it ...
im able to reach the channel and get or change the value of it but just adding
.controller.float_reaction at the end doesn't work .
ca anyone help ?