GPencil: Fix showing wrong material in brush panel with pinning

The options of the material are from object material not pinned material.

If the brush is pinned, the material must be the brush material and not the object material.
This commit is contained in:
Antonio Vazquez 2019-07-18 19:52:52 +02:00
parent d5c0a02f86
commit 23ea4b56ad
1 changed files with 1 additions and 1 deletions

View File

@ -1781,7 +1781,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
col.prop(gp_settings, "angle_factor", text="Factor", slider=True)
ob = context.object
if ob:
if ob and brush.gpencil_settings.use_material_pin is False:
ma = ob.active_material
elif brush.gpencil_settings.material:
ma = brush.gpencil_settings.material