Page MenuHome

Update addons for D9697 "_RNA_UI" removal
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Dec 22 2020, 7:30 PM.

Details

Summary

This is a followup patch for D9697 which applies the changes to the addon reporistory.
Almost all of the changes are in rigify, but there is one small change in "curve_tools"
and two trivial changes in IO addons.

I don't have much experience with Rigify, so I haven't been able to do the most thorough
testing, but I have tested by creating rigs and inspecting their custom properties.
The changes are relatively simple anyway, it's just slightly changing the functions used
to create and copy custom property UI data.

Diff Detail

Repository
rBA Blender Add-ons
Branch
refactor-idprop-ui-data-addons
Build Status
Buildable 16600
Build 16600: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Dec 22 2020, 7:30 PM
Hans Goudey (HooglyBoogly) planned changes to this revision.May 11 2021, 11:44 PM

I will update this patch for the changes in the parent patch. For my reference:

update_rna -> rna_ui_data_update
rna_data -> rna_ui_data
clear_rna -> rna_ui_data_clear
copy_rna -> rna_ui_data_copy
custom_properties -> id_properties_create
  • Update for latest changes in D9697
Alexander Gavrilov (angavrilov) requested changes to this revision.Aug 25 2021, 9:09 AM
Alexander Gavrilov (angavrilov) added inline comments.
curve_tools/auto_loft.py
36

Seems to be an extra comma here.

rigify/utils/mechanism.py
445

What is the point of this replacement of get?

522

Likewise, what's the point of changes here? Especially the name line makes no sense.

This revision now requires changes to proceed.Aug 25 2021, 9:09 AM

Also, I don't know what is the object returned by id_properties_ui like, but maybe consider changing the code to avoid to_dict - possibly using getattr if needed or something.

To test custom property copying code, find a basic.super_copy rig in the metarig (e.g. shoulder bones), and add some custom properties to the metarig bone. They would be automatically copied to the generated control using the utilities touched in this patch.

Hans Goudey (HooglyBoogly) marked 3 inline comments as done.
  • Fix errors in changes, simplify with .get()

Sorry for the messiness in the earlier version of this patch. I admit I
didn't check it over properly when messaging you about it in chat.

The changes should be simpler now, and the cases you pointed out fixed.
And thanks for the tip about testing. I haven't encountered unexpected behavior in my tests.

Refactoring to avoid to_dict wouldn't be possible without changing the API,
which I'd like to avoid at this point. The UI data values aren't properties
currently because their presence depends on the IDProperty type.

  • Remove one last change
This revision is now accepted and ready to land.Aug 27 2021, 12:51 PM
MKRelax (MKRelax) added inline comments.
add_camera_rigs/build_rigs.py
327

soft_max = 5000.0 seems wrong. It was probably copied/pasted from line 161 above.
Looking at the old code, it should be soft_min=0.0, soft_max=1.0.

add_camera_rigs/build_rigs.py
327

Thanks for finding this., it does look like a typo. In this case, since the hard max and soft max are the same, specifying the soft max shouldn't be necessary. I'll commit a fix.