Page MenuHome

Rigify: add support for user-defined rig packages and related utilities.
ClosedPublic

Authored by Alexander Gavrilov (angavrilov) on Feb 16 2019, 12:34 PM.

Details

Summary

As suggested by @Ivan Cappiello (icappiello), and after discussion with @Brendon Murphy (meta-androcto),
I start a public request to commit third-party contributions already
accepted to https://github.com/eigen-value/rigify/tree/rigify_0.6_beta

Specifically, this includes:

  • Modularization of python script generation, allowing rigs to add their own utility functions and operators to the generated script. This is critical to make custom rig support really useful.

    https://github.com/eigen-value/rigify/pull/5
  • The utils.py file is split into multiple modules with a backward compatibility proxy for old functions.
  • Automatic verification that different rigs don't try to create different rig settings with the same name to alleviate increased risk of namespace conflicts with custom rigs.

    https://github.com/eigen-value/rigify/pull/7

Some other random changes by MAD have likely slipped through.

These changes have already been extensively discussed and accepted
into the branch by @Lucio Rossi (luciorossi), so I see no reason not to commit
them to the official repository to be tested during 2.8 beta.

Diff Detail

Event Timeline

@Alexander Gavrilov (angavrilov)

I start a public request to commit third-party contributions already accepted to https://github.com/eigen-value/rigify/tree/rigify_0.6_beta

i tried to test this merge and got this error when loading the addon in 2.8 (faa255c0a4e4) running on OSX Mojave 10.14.3

Traceback (most recent call last):
  File "/private/var/folders/jn/x12z9rgj4216nhlxwqnhjryc0000gn/T/AppTranslocation/8648B051-2B33-4828-8CAD-9638C68B6196/d/blender.app/Contents/Resources/2.80/scripts/modules/addon_utils.py", line 393, in enable
    mod.register()
  File "/private/var/folders/jn/x12z9rgj4216nhlxwqnhjryc0000gn/T/AppTranslocation/8648B051-2B33-4828-8CAD-9638C68B6196/d/blender.app/Contents/Resources/2.80/scripts/addons/rigify/__init__.py", line 361, in register
    ui.register()
  File "/private/var/folders/jn/x12z9rgj4216nhlxwqnhjryc0000gn/T/AppTranslocation/8648B051-2B33-4828-8CAD-9638C68B6196/d/blender.app/Contents/Resources/2.80/scripts/addons/rigify/ui.py", line 1360, in register
    register_class(cls)
ValueError: register_class(...): already registered as a subclass

would you mind having a look at it? do you have a working one i can test on your repo?

I can’t test on Mac OS, but it works for me on Linux when applied upon the latest commit.

My external rigs work with the expected minor modifications (mainly the matrix multiplication operator).

I can’t test on Mac OS, but it works for me on Linux when applied upon the latest commit.

@Damien Picard (pioverfour) please download the 0.6 beta and test it. Should be updated to your recent pulls (except for pantins related commits). If it works then it's os-related, if not, you probably did some modification to without stashing the related commit, so in that case we need to pull that too (without pantins related commits).

My external rigs work with the expected minor modifications (mainly the matrix multiplication operator).

This is happening way before, just clicking on the add-on enable button. So to be clear rigify is not loaded at all.

Removed another big chunk of unrelated code from MAD.

I can’t test on Mac OS, but it works for me on Linux when applied upon the latest commit.

@Damien Picard (pioverfour) please download the 2.6 beta and test it. Should be updated to your recent pulls (except for pantins related commits). If it works then it's os-related, if not, you probably did some modification to without stashing the related commit, so in that case we need to pull that too (without pantins related commits).

I've got a feeling you are under an impression that https://github.com/eigen-value/rigify/tree/rigify_0.6_beta is for 2.8 - that's wrong. This is based on my merge at https://github.com/angavrilov/rigify/tree/rigify_0.6_beta_2.8, with unrelated changes like new experimental rigs removed.

@Alexander Gavrilov (angavrilov)

I've got a feeling you are under an impression that https://github.com/eigen-value/rigify/tree/rigify_0.6_beta is for 2.8 - that's wrong.

got exact same error on 2.79 official too with our 2.6 beta.

will test from your repo and see if there's something different. Could be useful, as suggested in other posts, to have a working branch on yours or @Damien Picard (pioverfour) repository to help people download and test the branch in different situations. We can then have a pull request after features are well tested. @Alexander Gavrilov (angavrilov) if the one on your repo is good, let's start and work on that one.

@Alexander Gavrilov (angavrilov)
still no luck with your repo and 2.79 same os as above:

Traceback (most recent call last):
  File "/Applications/blender-2.79_TEST/blender.app/Contents/Resources/2.79/scripts/modules/addon_utils.py", line 331, in enable
    mod = __import__(module_name)
  File "/Applications/blender-2.79_TEST/blender.app/Contents/Resources/2.79/scripts/addons/rigify/__init__.py", line 148
    legacy_mode: BoolProperty(
               ^
SyntaxError: invalid syntax

please try unloading/loading the addon.

I don’t understand what you are trying to do, Alexander's branch is for 2.8 as implied in the branch name, right?

What worked for me was to apply this patch directly to the current Blender 2.8 Addons repository.

I don’t understand what you are trying to do, Alexander's branch is for 2.8 as implied in the branch name, right?

What worked for me was to apply this patch directly to the current Blender 2.8 Addons repository.

@Alexander Gavrilov (angavrilov), @Damien Picard (pioverfour), you can't expect normal users to test this applying patches.

There should be a repository for this. You chose where to put it, but standard user should be able to download and overwrite the rigify folder in blender.app/Resources/2.79/scripts/addons/ (OSX path) to test the featureset.
This is how pitchipoy and mad gave users access to test new features without having to compile/code/download blender nightly build. This is how you can expect people to easily test your features without generating pull requests and code pollution in master and have to wait for code review.

At this moment i can't find a repository (ours or yours) where i get a rigify version that has this feature implemented and working. If you have one, link it here and let people test it and report what's working or not for them.

If the addon doesn't load at all i cannot even discuss features.

I suggest to create a NEW branch and name it accordingly (do you expect it to be a 2.8 feature? or a 2.79c?) and manage this by yourselves till it gets stable.

cheers,
Ivan

@Alexander Gavrilov (angavrilov)
still no luck with your repo and 2.79 same os as above:

    legacy_mode: BoolProperty(
               ^
SyntaxError: invalid syntax

What are you doing trying to use a 2.8 branch with 2.79? They are completely incompatible. That "invalid" syntax is the only correct way for 2.8.

For me it works both on linux and windows, and @Damien Picard (pioverfour) also obviously has no problems, so you must be doing something wrong. Alternatively, it's possible that the mac os build on the download site is bad - it's obvious that it's old in any case.

This revision is now accepted and ready to land.Feb 19 2019, 10:50 AM

ok sorted it out.
there are two misleading information in this thread. I'll post this for other people eventually coming here reading.

I start a public request to commit third-party contributions already accepted to https://github.com/eigen-value/rigify/tree/rigify_0.6_beta

This points to a non working merge. Should be safer, as suggested in previous posts to link a repo that we know it's working. Should also be clear that this version is testable 2.8 ONLY.


I've got a feeling you are under an impression that https://github.com/eigen-value/rigify/tree/rigify_0.6_beta is for 2.8 - that's wrong.

This message in not so clear and states that there could be a rigify 0.6 beta working with 2.79. It's an incorrect assumption.


This is based on my merge at https://github.com/angavrilov/rigify/tree/rigify_0.6_beta_2.8, with unrelated changes like new experimental rigs

this is the important part. Let's assume from now on this is the unofficial repo for the branch. I downloaded and tested successfully this branch on 2.8 and got some issues.


after a basic test, now i got this issue:

after adding a single bone, in edit i should find a list of samples above the add sample button. It seems not to be there. I have a add sample button but no sample list. This happens with or without external library installed.

Brendon Murphy (meta-androcto) requested changes to this revision.Feb 19 2019, 11:13 AM

hi, it's likely this needs further testing and agreement before final commit. I may have been too early to accept the revision further testing may be needed.
This revision is accepted but should be committed only if the parties involved agree and we have a working addon in Blender on multiple os.

This revision now requires changes to proceed.Feb 19 2019, 11:13 AM

Fixed broken Add Sample UI.

I made a github branch specifically for this specific diff: https://github.com/angavrilov/rigify/tree/upstream-D4364

I also made a rig package zip from some legacy rigs for testing (includes metarig):

I made a github branch specifically for this specific diff: https://github.com/angavrilov/rigify/tree/upstream-D4364

Just tested this successfully. I'd like to polish a bit the 'Feature Set' panel, but that's way over this task's topic.

@Ivan Cappiello (icappiello): since you wanted to test this with 2.79, I created a branch that tries to match the patch result: specifically, I started with the same branch, removed the same unrelated changes, and added the relevant fixes like the Add Sample thing. I may have missed something though, because directly comparing the branches is very hard due to the amount of changes related to the 2.8 porting of rigify and all its rigs.

https://github.com/angavrilov/rigify/tree/upstream-D4364-v2.79

This revision was not accepted when it landed; it landed in state Needs Review.Mar 14 2019, 12:41 PM
This revision was automatically updated to reflect the committed changes.