diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-23 07:33:46 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-23 07:33:46 +0300 |
commit | 187d8ba36211f5cd9f2da8fc05f1d8acdc153e0c (patch) | |
tree | ad8566a6f594683bd5ab7ca9ceaf8db333fab1ce /release | |
parent | 998ace3463c73a172c62418e438bddc93f78a22e (diff) |
Cleanup: avoid unnecessary access to context.space_data
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 89d025814f2..cefa4bf7d1d 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -537,10 +537,12 @@ class IMAGE_MT_pivot_pie(Menu): layout = self.layout pie = layout.menu_pie() - pie.prop_enum(context.space_data, "pivot_point", value='CENTER') - pie.prop_enum(context.space_data, "pivot_point", value='CURSOR') - pie.prop_enum(context.space_data, "pivot_point", value='INDIVIDUAL_ORIGINS') - pie.prop_enum(context.space_data, "pivot_point", value='MEDIAN') + sima = context.space_data + + pie.prop_enum(sima, "pivot_point", value='CENTER') + pie.prop_enum(sima, "pivot_point", value='CURSOR') + pie.prop_enum(sima, "pivot_point", value='INDIVIDUAL_ORIGINS') + pie.prop_enum(sima, "pivot_point", value='MEDIAN') class IMAGE_MT_uvs_snap_pie(Menu): @@ -1537,7 +1539,7 @@ class IMAGE_PT_overlay_guides(Panel): row = col.row(align=True) sub = row.row(align=True) sub.prop(uvedit, "show_grid_over_image", text="") - sub.active = context.space_data.image is not None + sub.active = sima.image is not None col = layout.column(align=False, heading="Fixed Subdivisions") col.use_property_decorate = False |