There are functions (procedures) that can be called to generate the different modules. Each function requires a different number of values to run.
Now when you say the "modules", are you referring to the proxies or the final generated rig?
The modules to generate the final rig require a proxy module to derive the positions, the number of nodes, the hierarchy, etc.
For the proxy functions, there is error checking that is built in and would have to be bypassed most likely.
So without knowing exactly what you are trying to achieve, my short answer is yes, there are ways of building components using code. However this may not be the ideal method and would require digging into the code to understand how they work and how they must be called.
-Dustin
Hi Dustin,
Thank you for the quick reply.
I'm looking to just create the Proxies only by script. I'm trying to create somewhere around 100 Aux proxies off of a few parent modules and then snap the Aux proxies to particular geometry. The character is still in the R&D phase so I'd like to be able to just script it rather than changing by hand all the time.
I do see there are a couple functions for these, but I see what you're saying about error checks. The functions are based off the UI inputs from what I see too.(?)
Anyway at some point it'd be super useful to have the proxies built from funcs and args, but I realize that's probably a large undertaking :) I think the benefits are pretty awesome though: users could build rigs without even opening the UI, which would make rig building even batchable.
John
Yes, exactly. The functions are all ran from the UI typically. However, if you were to look at line 590 in RapidRig_Modular.mel, you can see how all the presets are created without the use of a UI. The parent node is selected, then the function is ran, followed by moving the proxies into place.
You could probably do something similar. The proc for auxiliaries is simply:
RRM_CreateProxyAuxiliary(string $modName, int $mirrorMod)
The $modName is the name of that auxiliary, and $mirrorMod is either 0 or 1.
You could create a loop that calls that procedure. Something like this perhaps:
//START
//code will generate 20 auxiliary proxies that are mirrored from left to right.
//user must select a proxy node to attach auxiliaries to.
$parentPtoxy = `ls -sl`;
$i = 1;
while ($i < 20)
{
select $parentPtoxy[0];
RRM_CreateProxyAuxiliary(("auxiliary_" + $i), 1);
move -r 0 $i 0 ("RRM_l_auxiliary_" + $i + "_Aux");
move -r 0 $i 0 ("RRM_r_auxiliary_" + $i + "_Aux");
$i++;
}
//END
Of course, you will probably want a better way to define where the locations are, etc. But this will work.
-Dustin
Comments on this feature request:
Dustin Nelson said over 11 years ago:
john joe said over 11 years ago:
Dustin Nelson said over 11 years ago:
john joe said over 11 years ago: