Age | Commit message (Collapse) | Author |
|
See T95597
|
|
This patch is a continuation of D8519, was also suggested in T88711#1170152.
It adds a checkbox for each feature set in the Rigify Preferences, to disable/enable that feature set without having to completely remove it from the file system.
Challenges that were hopefully successfully tackled:
- Keep list in sync when user manually adds or removes things through the file system instead of the "add/remove feature set" buttons in the UI.
- Avoid re-building the feature set list all the time so that the checkbox states can actually be stored when the user exits Blender.
- Disabling a feature set means calling its unregister function, then rebuilding the rig types and metarigs lists/menus.
- Some renaming slipped in because I found the variable name "feature_set" a bit confusing. If needed, I could split this change into a separate patch or just forget about it, but I think the longer names help here.
Testing would be welcome, since things turned out a bit more tricky than expected.
In a follow-up patch I would like to do a code quality pass, to split the code a bit better here. There is a bit too much stuff in __init__.py in particular. I will get started on that when this gets close to being finalized.
Reviewed By: angavrilov
Differential Revision: https://developer.blender.org/D12260
|
|
This reverts commit f0f48da209de08d66fd9e3b311e379687c7ba699.
|
|
|
|
This patch removes the two drop-down menus from the Rigify addon preferences, replacing it with a checkbox and a UIList.
Before:
{F8766280}
After:
{F8791382}
There is also a small bit of new functionality. The following keys are now recognized in the rigify_info dictionary, similar to Blender addons:
`'link', 'doc_url', 'tracker_url', 'description', 'author', 'version', 'warning'.`
They will be displayed underneath the UIList when the feature set is the active one in the list.
**Ideas for future**
I think this UI better enables us to do some cool things in the future:
- Disable feature sets without uninstalling them.
- Have a base set of feature sets in the list that aren't actually installed. Instead, selecting them would just reveal a button that opens their repository URL. This could be used for officially supported but external feature sets, such as what Legacy should be.
Feedback welcome.
Reviewed By: angavrilov
Differential Revision: https://developer.blender.org/D8519
|
|
|
|
|
|
Allow feature sets to register their own operators, in case
e.g. they want to add a button to the metarig UI panel.
|
|
|
|
Instead of adding the feature set installation directory
to the global path, and thus inserting the modules into
the top level namespace, add an empty rigify.feature_sets
package and use __path__ to redirect the module loader
to read its sub-modules from the feature set directory.
Now feature set modules are effectively installed into
that package and loaded as 'rigify.feature_sets.foo'.
As an aside, clean up loading code to avoid weird path
manipulations, add more safety checks when installing sets,
and add a way for sets to expose a user-friendly name.
|