diff options
author | Hans Goudey <h.goudey@me.com> | 2021-08-27 16:29:15 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-08-27 16:29:15 +0300 |
commit | 104ba1c5682016a55b8a8ed06be52e0c05e913e9 (patch) | |
tree | 2c04f9a2d776b005a4791b646ced1ccf0b2d9daf /add_camera_rigs | |
parent | 53c7859c9135eeb5274008d4d6caa8364ea0c308 (diff) |
Update addons for D9697 "_RNA_UI" removal
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 change in "curve_tools" and two trivial changes in IO addons.
Differential Revision: https://developer.blender.org/D9919
Diffstat (limited to 'add_camera_rigs')
-rw-r--r-- | add_camera_rigs/build_rigs.py | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/add_camera_rigs/build_rigs.py b/add_camera_rigs/build_rigs.py index 6b47fef8..e3f61632 100644 --- a/add_camera_rigs/build_rigs.py +++ b/add_camera_rigs/build_rigs.py @@ -20,7 +20,6 @@ import bpy from bpy.types import Operator from bpy_extras import object_utils from mathutils import Vector -from rna_prop_ui import rna_idprop_ui_prop_get from math import pi from .create_widgets import (create_root_widget, @@ -158,11 +157,8 @@ def setup_3d_rig(rig, cam): # Lens property pb = pose_bones['Camera'] pb["lens"] = 50.0 - prop = rna_idprop_ui_prop_get(pb, "lens", create=True) - prop["default"] = 50.0 - prop["min"] = 1.0 - prop["max"] = 1000000.0 - prop["soft_max"] = 5000.0 + ui_data = pb.id_properties_ui("lens") + ui_data.update(min=1.0, max=1000000.0, soft_max = 5000.0, default=50.0) # Build the widgets root_widget = create_root_widget("Camera_Root") @@ -327,12 +323,8 @@ def create_2d_bones(context, rig, cam): # Property to switch between rotation and switch mode pose_bones["Camera"]['rotation_shift'] = 0.0 - prop = rna_idprop_ui_prop_get(pose_bones["Camera"], 'rotation_shift', create=True) - prop["min"] = 0.0 - prop["max"] = 1.0 - prop["soft_min"] = 0.0 - prop["soft_max"] = 1.0 - prop["description"] = 'rotation_shift' + ui_data = pose_bones["Camera"].id_properties_ui('rotation_shift') + ui_data.update(min=0.0, max=1.0, soft_max = 5000.0, description="rotation_shift") # Rotation / shift switch driver driver = con.driver_add('influence').driver @@ -526,18 +518,14 @@ def build_camera_rig(context, mode): # DOF Focus Distance property pb = pose_bones['Camera'] pb["focus_distance"] = 10.0 - prop = rna_idprop_ui_prop_get(pb, "focus_distance", create=True) - prop["default"] = 10.0 - prop["min"] = 0.0 + ui_data = pb.id_properties_ui('focus_distance') + ui_data.update(min=0.0, default=10.0) # DOF F-Stop property pb = pose_bones['Camera'] pb["aperture_fstop"] = 2.8 - prop = rna_idprop_ui_prop_get(pb, "aperture_fstop", create=True) - prop["default"] = 2.8 - prop["min"] = 0.0 - prop["soft_min"] = 0.1 - prop["soft_max"] = 128.0 + ui_data = pb.id_properties_ui('aperture_fstop') + ui_data.update(min=0.0, soft_min=0.1, soft_max=128.0, default=2.8) # Add drivers to link the camera properties to the custom props # on the armature |