Age | Commit message (Collapse) | Author |
|
|
|
Improve auto-generated UI naming and update basic.pivot, basic.raw_copy
and basic.super_copy. Also allow raw_copy to generate builtin widgets.
|
|
|
|
Use DEF: or CTRL: prefix on constraint names to move them during relink.
|
|
Register the most generic widgets in the list and add a few more.
Use it to assign a nicer looking shoulder widget in human metarigs.
|
|
Also make error handling more robust and extend constraint relink mixin.
|
|
Originally the raw_copy rig used a standard API of rigify to rename
the bone after generate already added an ORG prefix. However, if the
bone already had that prefix, generate didn't add the second one to
avoid 'ORG-ORG', and thus raw_copy removed the only remaining prefix.
As the simplest solution, hard-code handling of this rig in generate.
This isn't that bad, because this rig is special by definition, and
the special handling consists in doing nothing.
The original API based code is kept commented out as an example.
|
|
Also fix metarig Inherit Scale support in limbs.super_finger.
|
|
In 2.90 derived bone lookup was tightened to fix certain issues when
bone names use the .001 suffixes by using explicit data about which
bone is derived from which one. Unfortunately, legacy rigs don't
provide that info, so add a special case using matching by name.
Also fix incorrect error reporting method name.
|
|
It is not really safe to assume that by swapping ORG to DEF you will
get a deform bone derived from the given ORG bone. The new base rig
API already tracks copying of bones, so polish it up and use here.
Note however that this tracking doesn't work with bones created
without self.copy_bone, e.g. by legacy rigs.
|
|
Just removing some unused imports.
I tested generating every built-in metarig to make sure I didn't remove any imports that were actually used. I also tested installing and using a feature-set.
Reviewed By: angavrilov
Differential Revision: https://developer.blender.org/D8026
|
|
Add a separate rig aimed at transferring bones from the metarig
completely verbatim without the ORG prefix, and remove the hacky
copy_chain/super_copy option for renaming ORG to DEF. Share the
constraint retargeting feature between super_copy and raw_copy.
|
|
Allow replacing the parent bone and constraint targets after all
bones have been generated. When enabled, constraints with a '@bone'
notation in their name will have their target bone replaced with
the one from the name. Using just 'MCH' or 'DEF' will replace the
prefix of the existing target. The parent bone can be replaced via
a string input field in rig options.
Tested by wrapping the simple muscle system of MB-Lab.
|
|
Implement options to generate a parent switch mechanism for the
main pivot control, and to register the pivot as a parent for other
rigs to use (including support for one level parent injection).
|
|
For better compatibility, support the Tweak layer assignment
in super_finger for the detail controls, and allow changing
the B-Bone resolution.
|
|
This is necessary to fully preserve complex custom rigging
(especially with B-Bones) included directly in the metarig.
Doing this otherwise would require implementing correct
copying of all possible constraints and bone settings.
|
|
- Add an optional custom pivot between torso and the rest of the spine.
- Add a custom pivot rig that can be used as a parent of the spine.
- Add an optional custom pivot under limb IK controls.
|
|
The main goals are to provide an official way for rigs to
interact in a structured way, and to remove mode switching
within rigs.
This involves introducing a base class for rigs that holds
rig-to-rig and rig-to-bone references, converting the main
generator into a class and passing it to rigs, and splitting
the single generate method into multiple passes.
For backward compatibility, old rigs are automatically handled
via a wrapper that translates between old and new API.
In addition, a way to create objects that receive the generate
callbacks that aren't rigs is introduced via the GeneratorPlugin
class. The UI script generation code is converted into a plugin.
Making generic rig 'template' classes that are intended to be
subclassed in specific rigs involves splitting operations done
in each stage into multiple methods that can be overridden
separately. The main callback thus ends up simply calling a
sequence of other methods.
To make such code cleaner it's better to allow registering
those methods as new callbacks that would be automatically
called by the system. This can be done via decorators.
A new metaclass used for all rig and generate plugin classes
builds and validates a table of all decorated methods, and
allows calling them all together with the main callback.
A new way to switch parents for IK bones based on the new
features is introduced, and used in the existing limb rigs.
Reviewers: icappiello campbellbarton
Differential Revision: https://developer.blender.org/D4624
|
|
This fix an error introduced on fe90ef2b4.
|
|
|
|
|
|
|
|
I have updated the rig type API to be a bit clearer based on my
interactions with Kfir from PitchiPoy.
I've also disabled the "delta" rig type, as it is very obscure and
mostly just confuses people.
|
|
This makes it much easier for e.g. someone to branch Rigify for
custom purposes, since there won't be weird name conflicts.
Also changed from using __import__() for dynamic imports to using
importlib.import_module(). This simplifies the code and should
be more robust.
Finally, misc pep8 cleanups.
|
|
The biggest fixes relate to keeping ID data modification out of
draw methods. This was breaking Rigify with the current API.
Secondary fix was to move widget meshes to match the bones, even
if the widget meshes already exist. It's nice for when the user
is progressively tweaking the metarig.
|
|
Thanks to Jack Simpson for the heads up!
|
|
|
|
Plus a few styling enhancements.
[[Split portion of a mixed commit.]]
|
|
- remove/comment unused variables
- remove unused imports
- fixed some bugs using incorrect variables
|
|
copy_chain.
|
|
This is useful for bone chains that need their parent-child relationships
preserved exactly. For example, bbone chains, and chains that users want to
use auto-ik on.
Also moved the 'copy' rig type to the basic collection. This will break
some existing metarigs, but it is very easy to fix. Just change the 'copy'
rig type on bones that use it to 'basic.copy'.
|