Home Website Youtube GitHub

rg.buildFromSelection() into custom steps (pre or post)

Hello guys,

I try to use rg.buildFromSelection() into custom step. But, when I run the script with ‘Run Sel’, an infinity loop appear and I have to kill maya.

I’ve tried to use rg.buildFromSelection() on pre or post custom step. But it doesn’t work.
I can make a guide symmetry without any problems.
But to generate rig, mgear always pre process something in a infinity loop …

You can find my code bellow :

Thank you for your help,

Best !

Just one more thing,

when I use my function outside of customStepsUI it work :

image

Thanks !

There’s no need to include these codes in the pre-script.
This is the reason why the infinity loop is causing is that the pre-script is executed when ‘buildFromSelection’ is called in the shifter menu.

Users can either click ‘BuildFromSelection’ without selecting a guide or select a guide.

2 Likes

Ok, in this case I split my workflow with mgear batch functions and pre / post custom steps.

Thank you for you’re feedback !