Home Website Youtube GitHub

Rgb control colors

hello people, so i wanted to implement rgb colors for controls and it be available in the main guide settings ui, as started writing this code I noticed some of the code i needed was already there but commented out, with the exception of ui stuff this was only a few lines to implement so i wanted to make sure that this hasn’t been left out for good reason before i try to commit.
anyway, this is what i did.


Hey, that’s pretty cool!

I wonder then, if there is any other code that doesn’t support RGB. For example, I sometimes use a color setting tool by Chris Zurbrigg that only sets the overrideColor. So if you had an RGB color set, using the tool to set an index color would change the overrideColor, but not disable the RGB color, so nothing would change. (Maybe he updated it, but I have an old version that I modified.)

Those are just the things I’d look around for. The replaceShape() command does work with RGB. So that’s good.

@JimBo_Drew thanks for doing this! And yes I started to implement it long ago, but didn’t finished it :stuck_out_tongue:
If I recall correctly we were using Maya 2015 that didn’t support RGB colors yet, and since it was not a priority I did stop and never found the moment to finish :sweat_smile:

I did a little bit more to this, all the index colors were already defined as rgb values in anim exporter so i used that to generate colors for the index settings (value 16 seems to be wrong in anim exporter should be white 255-255-255 but it is set to 1-1-1 amost black)
and then the buttons for rgb were big and ugly so i added a slider to act like maya color attrs and make the swatch smaller

i’ll try find time to commit this over the weekend, still not really used github though :stuck_out_tongue:


this is super cool! and user-friendly! :smiley:

got frustrated with github so wrote a bit more code :joy:
implemented a component level override. this pretty much the same code.

edit: adding color attrs to component broke duplicate sym

edit 2: adding this to colorParamDef in mgear.core.attribute seems to fix the broken duplicate sym
self.valueType = None


@JimBo_Drew awesome!
if you prefer, send me the files that you edited. I will merge it and commit to github :slight_smile:

thanks @Miquel, i think i have it figured out now, i have done a pull request, apologies if i have done this incorrectly, it’s my first time using github :stuck_out_tongue:
i will need to change a line in a couple of files outside of shifter also, one in anim_picker.gui and one in core.attirbute i have purposed these changes on git.


Thank! @JimBo_Drew I will check the PR and merge ASAP

I would be very grateful if I could get my hands on this update. Would either Miquel or JimBo be able to help share the code? I am also not very versed in git. Thank you.

Hi @izze You can grab the code here:

(I suggest backing up your mGear first before you merge in any new code.)

  1. If you are not versed in git and Github, here is the more complex link. It just shows all the changes, and which files were altered. This would be the way you could see exactly which files you needed. RGB color support · mgear-dev/shifter@8d411b4 · GitHub

  2. This is the shifter module. In theory, you could download all the files here. But it would also come with any other changes that people, between the release version you have, and this development version.
    GitHub - mgear-dev/shifter: Modular Rigging System

You can download them in a zip file with the link in the top right. “Code → Download ZIP”

And then you would put those files in mgear_X.X.X/release/scripts/mgear/shifter/

Thank you! I appreciate the help.