Home Website Youtube GitHub

Control_01 component space switching with mgear viewport menu

Hello!

tldr: The space/ref attributes created by the control_01 component do not follow the logic expected by the “mgear viewport menu” (mgear.core.dagmenu.py) for switching spaces/refs.

For this example, let’s say you’re using a control_01 component and have named it “sword”.

Issue 1
The enum attribute that holds the space or “ikref” node names is being named “control_ikref”, rather than “sword_ikref”. Therefore, when the code is trying to determine the space attribute name, it is looking for: sword_C0_ctl.control_C0_ctl (where the control name exists but the attribute does not)

Issue 2
The space switching code is looking for an extra token in the control name, which doesn’t get created.
The component creates: “sword_C0_ctl”
The space switching code is looking for “sword_C0_ik_ctl”.

Issue 3
The component is creating a “control_control” attr rather than an expected “sword_sword” attr.

Workaround

  1. Rename the control: “sword_C0_ctl” -> “sword_C0_ik_ctl”
  2. Rename attributes:
    “sword_C0_ctl” -> “sword_C0_ik” (string value of “sword_C0_ik_ctl,”)
    “control_ikref” -> “sword_ikref”
    “control_control” -> “sword_sword”

To Repro

  1. Import biped template (this isnt absolutely necessary, but gives a starting point".
  2. Add a control_01 component
  3. Rename the component to “sword” (Settings -> Main Settings)
  4. Set the Channel Host to itself (“sword_C0_root”)
  5. Add some nodes to the IK Reference Array (In Component Settings)
  6. Build Rig
  7. Toggle On mGear -> mGear Viewport Menu
  8. Select “sword_C0_ctl”, right click, and set to a different parent ik space
3 Likes

Hello @AaronPf for the nice feedback!

I have logged it here: https://github.com/mgear-dev/shifter_classic_components/issues/82

I will check this ASAP

1 Like

Thanks Miquel, the great news is once you fix these attr names and values, the mGear right click menu switching works awesome!

lmk if any of this is unclear?

1 Like

Hello @AaronPf

Just a quick head up about the issue. It was fixed here https://github.com/mgear-dev/mgear_core/issues/62

2 Likes

Awesome, thanks so much Miquel, very much appreciated!!

Aaron