PDA

View Full Version : How to link custom parameters of multiple parameters from multiple objects in one go.


mocaw
02-02-2010, 12:34 AM
Hello,
I would like to have a customer parameter drive more than one target parameter...but need to find an automated or semi-automated way to do it.

I'm use to only needing to link a few parameters to a custom parameter, but right now I have something where I need to do hundreds. For some reason selecting the parameter in one object and opening its ppg, then selecting all the other similar objects so as to get a multi selected PPG doesn't help (even if moving the slider control DOES effect all the objects parameters). If I try and connect the parameters from my custom set to them it only effects the first object.

I'm positive if I knew more I could do this via scripting...but the most scripting I know is extremely basic.

Any hints on how to do this via scripting, ICE or otherwise?

Thanks,
-g

PS- I also already tried linking the parameters with the first object, then duplicating it so that the links are carried through each duplicate, but this is only OK if I never have to add another parameter to be driven after the fact.

Jettatore
02-02-2010, 03:47 AM
Someone hopefully has a better answer for you. But I can give you a workable way that may get you started.

Figure out a simple "expression" that sets up your connection. If your using custom parameter sliders as your controller, then you do it like this. Select the object you want controlled, go to the green animation parameter on it's ppg that you want controlled, right click it and go to expression editor. You'll see the expression editor pop up and let you type.

To figure out what to type you just need your controllers name....

For example lets say your Parameter Set is named car and your controlling Custom Parameter (this is the slider within the set) is called wheel and you want a perfectly equal relationship from the slider to the controlled object parameter. Simply type "car.wheel" and that's it, you have at least one object linked up now.

If you need to modify the expression you can do it as you like "car.wheel*10" or whatever math you need.

Now you press validate to check, and apply to apply it after validation passes. Now you can close the expression editor, right click on what used to be the green parameter box, and now should have an equal sign or an arrow in it, and go copy animation. Now select a second object, find the green parameter you want it copied to and go paste animation and it should be working on two objects now. Now...

Open the script editor, you will see in the history log that last thing you did, the paste operation. You can just select that, drag it down and change the number in your object name (assuming they all have the same name) and keep re-running the script as you change the name, or build a more complex script that uses wild cards that will paste to every object all in one shot.

If in the above they do all have the same name, you can simply delete the number at the end and put a * instead, and then you just have to run the script once and all your objects will be set correctly.

Example: "PasteAnimation "sphere*.polymsh.geom.subdivu" (I linked my controller to the U Subdivisions of several copied spheres, your's will look a little different, just pay attention to where the * wildcard is)

Sorry this process is a bit janky, but it should get you up and running (and the end result should be quite solid) -just in case you don't get a better reply soon enough.

mocaw
02-02-2010, 01:47 PM
Thank you- I'll give that a try and see how it goes!

Jettatore
02-02-2010, 04:00 PM
Let us know how it goes. Hope it works well enough, the end result should be solid if it worked.

Chinny
02-02-2010, 04:26 PM
Forgive me if I have misunderstood, but have you tried the View>Animation>Parameter Connection Editor?

Chin

geoath
02-02-2010, 06:58 PM
still in the connection editor someone has to ctrl+click to select for more than one object the specific parameter..

it would be much better (imho) if on the right panel with the driven objects, the top row had the selected objects (as it is now), but on the bottom row, instead of having again each object with it's parameters, to have only the parameters..
then you select the objects on the top row and the parameter on the bottom row

mocaw
02-02-2010, 08:07 PM
Thank you Chinny! I can get it to work using the parameter connection editor...but only if I do it in some magical order that I have yet to figure out while using link with on the multi-constrained objects parameter. When I fully figure it out in terms of steps I'll post...but if I try to use link with and select via the parameter connection editors GUI it doesn't work...odd.

Well it's still better than doing each one- one at a time!

EDIT:For some reason I'm getting "selection errors" in SI when selecting anything in a PPG. Sometimes I can't select things, sometimes they look selected but are not while something else is etc. I've noticed this while working in the 2010 build(s) but I thought it was just in the rendertree. Often in the render tree I have to select a node several times, or deselect the whole render tree window, select another object, deselect the object, then re-select the node to delete it. Apparently this is an issue throughout the build! Anyone else notice it? I should report it regardless...

I guess I can keep the scrip editor open to see what's going on...but it's annoying esp. when you're trying something new that you think doesn't work, but it's really because the wrong thing is selected etc. even though it LOOKS selected. Maybe it's a video card issue, but I have my doubts (running Nvidia). Windows 7 64bit error? I don't seem to have it in other applications...

Anyway- yes- if you leave the PPG open after performing an action on something and then use that to link with via the parameter connection editor it should work- this is pending you can get a "multi" select PPG up.

Jettatore
02-02-2010, 09:15 PM
Mocaw, any update on trying it the way I suggested above?

geoath
02-02-2010, 10:43 PM
i misunderstood, i thought chinny meant to do it entirely through the connection editor gui..
for many driven objects, the workflow through a ppg , or from the keying panel, with right click and "link with, is faster, as when the connection editor pops up, the parameters for the driven objects are already selected...

mocaw
02-03-2010, 03:38 PM
Mocaw, any update on trying it the way I suggested above?

I just did- and this is WAY more reliable than using the other method(s). It's way easier to do than write- so thank you for taking the time to write it up!

I'm really having issues using link with and custom parameters via any GUI and I can't wrap my brain around it- I've never had these issues before. I've looked into the expression editor and what the log says, and it should be working...but half the time there is no link...and sometimes there is and it works...and sometimes there is a link and it doesn't work.

Jettatore
02-03-2010, 11:04 PM
I've had the same issues with "link with" myself. Seems to require some sort of voodoo to get consistent results. Anyways, glad your up and running.

CGTalk Moderation
02-03-2010, 11:04 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.