Kredka Strikes Back "Controllers"
I'm back:)
Before I start writing 500 lines of code I have question about controllers to ask.
I search for this in help/net, no idea how to do it.
I have to do 2 operations
1) check for particular controller in objects selection like:
for obj in selection do
check if obj has given controller if yeas add object to list
2) take these objects with particular controllers and remove from them controllers.
It will be few controllers but let say now I'm looking for one particular notetrack.
I can do it like this:
notetracksobjmdq=#()
for s in selection do
(
tr1=classof s.controller == prs
if clasacontroler=true then ntrack=hasNoteTracks s.pos.controller
if ntrack=true then append notetracksobjmdq s
...... etc
)
but it will take hundreds of lines to define and check all controllers in this way. Is way to check for particular controller in selection and remove this controllers simpler than this one above? I need it for selection. Like always grateful for any help.
Comments
FORUM RULE
More information about formatting options
bga
yes, but I need two
yes, but I need two actions:
one) check which objects in selection contain those controllers
two) remove those controllers from selected objects
I would be very thankful for help.
...
Now U need to know that U can't delete some controlles of nodes but just resete or replace.
This is the fn for that
example:
Let's say we have a box object and "linear float" controlle assigned in "RotationY" track. By default this track is "bezier_float"
Also be careful which controller replace with.
bga
...
If you want to collect all abject by specified controller class then use this fn
exampe:
Let's say that you want to collect all object that have assigned "Linear Float" controller. For this it's not important to select any node
But if you want to work ei. look through objects in selections then chose other mode like this
bga
...
Do U want remove all controlles by specified class from the selection?
bga