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 /curve_tools | |
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 'curve_tools')
-rw-r--r-- | curve_tools/auto_loft.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/curve_tools/auto_loft.py b/curve_tools/auto_loft.py index c0711196..17705cc9 100644 --- a/curve_tools/auto_loft.py +++ b/curve_tools/auto_loft.py @@ -30,13 +30,10 @@ class OperatorAutoLoftCurves(Operator): context.collection.objects.link(loftobj) loftobj["autoloft"] = True - if loftobj.get('_RNA_UI') is None: - loftobj['_RNA_UI'] = {} - loftobj['_RNA_UI']["autoloft"] = { - "name": "Auto Loft", - "description": "Auto loft from %s to %s" % (curve0.name, curve1.name), - "curve0": curve0.name, - "curve1": curve1.name} + ui_data = loftobj.id_properties_ui("autoloft") + ui_data.update(description="Auto loft from %s to %s" % (curve0.name, curve1.name)) + loftobj["autoloft_curve0"] = curve0.name + loftobj["autoloft_curve1"] = curve1.name return {'FINISHED'} @@ -59,9 +56,8 @@ class AutoLoftModalOperator(Operator): #print("TIMER", lofters) for loftmesh in lofters: - rna = loftmesh['_RNA_UI']["autoloft"].to_dict() - curve0 = scene.objects.get(rna["curve0"]) - curve1 = scene.objects.get(rna["curve1"]) + curve0 = scene.objects.get(loftmesh['autoloft_curve0']) + curve1 = scene.objects.get(loftmesh['autoloft_curve1']) if curve0 and curve1: ls = surfaces.LoftedSurface(curves.Curve(curve0), curves.Curve(curve1), loftmesh.name) ls.bMesh.to_mesh(loftmesh.data) |