Home Website Youtube GitHub

How to edit existing controllers?

Hi there!
As a non-programmer I want to achieve one very simple thing in my mgear rig.
I want this “ref” in channel box be avaliable in the leg component too:

image

Unfortunately it is not present in any leg component I tried in the standard components of mgear.
All I can have in the leg component is IK ref array.

As I understand there is a way to edit any components in mgear framework but unfortunately I couldn’t find any tutorials or documentation regarding this.

Basically I want to add a snippet of code to the existing Leg component which will add a “Ref” array to it.

How can I do this?

BTW I tried to use Arm component instead of the Leg but unfortunately I could find out how to change the name of “Elbow” to “Knee” and “Wrist” to “Ankle” without breaking the rig.
If there is a way to change those name this will do the trick too.

This isn’t any part of an arm component either. You are pointing to the space switch for the shoulder component.

You can add this to your legs by adding a shoulder to your legs. Hey, why not?

It doesn’t have to be a “shoulder”. You can also put a simple Control_01 between your hips and your leg component, and put some space switches on that Control_01. And choose that same control as your hostUI. Then that Control_01 will be a space for your entire leg.

1 Like

thank you this is perfect!
but could you please tell me the direction to find the information on how to edit the existing components or add own? :slight_smile:

This is where you would find the components by default in Windows:

C:\Users\ your name \Documents\maya\Modules\scripts\mgear\shifter_classic_components
for me it is :
C:\Users\Olivier\Documents\maya\Modules\scripts\mgear\shifter_classic_components

As a non programmer it will be tough to edit anything. My proudest moment was to edit the shoulder component to reuse it for the neck and allow World orient for the head.

Ah I was about to suggest to use IK switches for the leg component like I am doing below but that’s a world orient for FK legs you are looking for right?

From what I am understanding so far, you will need to do like suggested by Chris and this is the task I will have to tackle next too :slight_smile:

ah and if you want to start learning how to edit existing controllers, you can have a look at the mighty_neck component I created by updating the Shoulder_01 component. I don’t quite remember what I did so you could use a software like Notepad++ or any programming software to compare the two component.

http://olivier-ladeuix.com/ftp/mighty_neck_01.zip

Most of the work was done in the init.py and guide.py file. I didn’t need to touch the settigsUI.py file.

image

thank you @Moustache_Animation !
this is exactly what I was looking for :slight_smile:

My pleasure it took me a while to understand how to implement it too and hopefully this will help everyone.