diff options
author | Antonioya <blendergit@gmail.com> | 2018-08-08 17:56:56 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-08-08 17:56:56 +0300 |
commit | 5c4fd526124c348c8f324a2d0a384958c6e793b8 (patch) | |
tree | 4147a301d31e79e16a584769e61a506721a0ca6f /release | |
parent | 78a6fa1a7294d73a4f35b08d569d03f1afdd71ac (diff) |
Fix T56220: Adding Grease Object crashes if link Material is set to Object
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 349832cedf2..72296861ad9 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3545,9 +3545,10 @@ class VIEW3D_MT_assign_material(Menu): def draw(self, context): layout = self.layout - ob = context.active_object; + ob = context.active_object - for mat in ob.data.materials: + for slot in ob.material_slots: + mat = slot.material layout.operator("gpencil.stroke_change_color", text=mat.name).material = mat.name |