View Full Version : float controller psoitions
07-13-2011, 03:17 AM
What is the most efficent way to create a function that returns the position of any float controllers on a morpher modifier, then convert them to bezier? Do I compare strings or is there a better way? thanks in advance.
position of any float controllers? what? could you explain again?
07-13-2011, 12:43 PM
well if you open the curve editor, you will see a list of controllers under the morpher entry, like Morpher etc...they are bezier by default, but if you add wiring, you create float controllers...what I want to do is to go through all the list controllers and see which are float or script or whatever, then convert them back to bezier, in order to effectively give control back to the morpher spinners and clean up all the controllers,...so one way I guess would be to use 'getName' of controller and compare this string with "float_controller" but this doesn't seem the correct way to do it, anyway I cant get it to work easily...so...am I making myself clear or...? thanks for reply
but if you add wiring, you create float controllers...
That is what confused me. They are all float controllers, if you add wiring you add a float_wire. You want to convert it to bezier_float.
You need to be testing the class of the controller (assuming morphMod is your morpher modifier):
for i = 1 to 100 do if morphMod[i].controller!=undefined and classOf morphMod[i].controller != bezier_float do morphMod[i].controller = bezier_float()
07-13-2011, 01:17 PM
fantastic lo. thanks heaps. One more thing...what if I want the location(as in Morpher[a][b][c] whatever, of the Weights on a morpher? Same sort of thing?
I've completely lost you again. :surprised
07-13-2011, 01:43 PM
ok, not making myself clear. For example, In my scene, the morpher object has ,say, a morph target at $.Morpher,
it has a subanim float controller at $.Morpher, and the Weights control is returned by typing in $.Morpher in the listener.
What I want to do is locate the Weights control on the Morph modifer via a script, and also return where it was found, for eg - in $.Morpher[x]...where x is the location, if you like....This is so I can place the morph spinner value back to 100, so re-setting that particular morph ....is that any clearer..? thnaks again for your patience.
Let me see if I got this right...
You have a Float_List controller on one of the morpher channels, and you'd like to know on which channel that is, and also return it's weights array?
fn findListController morphMod =
local found = false
for i = 1 to 100 while not found do
if morphMod[i].controller!=undefined and classOf morphMod[i].controller == float_list do
found = true
result = #(i, morphMod[i].controller.weight)
07-13-2011, 02:20 PM
I think that's it...you have been very helpful sir, thank you.
07-13-2011, 03:32 PM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.