diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-05 05:54:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-05 05:54:43 +0300 |
commit | 8fcc04edce53c5b3b01bf392e1667878ebcce0ef (patch) | |
tree | 91db385411a52a26e866618203f0d29618aa1160 | |
parent | 25a9816c3029e835db838388e0d3f6f4febce947 (diff) |
Cleanup: avoid using instance to get enum
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 48284f89d59..c494aae03cd 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -95,11 +95,11 @@ def generate_from_brushes_tool_slots_ex( def generate_from_enum_ex( context, *, icon_prefix, - data, + type, attr, ): tool_defs = [] - for enum in data.rna_type.properties[attr].enum_items_static: + for enum in type.bl_rna.properties[attr].enum_items_static: name = enum.name identifier = enum.identifier tool_defs.append( @@ -1006,7 +1006,7 @@ class _defs_particle: return generate_from_enum_ex( context, icon_prefix="brush.particle.", - data=context.tool_settings.particle_edit, + type=bpy.types.ParticleEdit, attr="tool", ) |