GPencil: Use default material when slot material is empty
When a material slot is empty, the default material is used. The default color used is Gray to get a good contrast in dense scenes with dark and white background. Reviewers: brecht, dfelinto, mendio, pepeland Differential Revision: https://developer.blender.org/D5625
This commit is contained in:
@@ -892,7 +892,8 @@ class GreasePencilMaterialsPanel:
|
||||
if is_view3d and brush is not None:
|
||||
gp_settings = brush.gpencil_settings
|
||||
if gp_settings.use_material_pin is False:
|
||||
ma = ob.material_slots[ob.active_material_index].material
|
||||
if ob.active_material_index > 0:
|
||||
ma = ob.material_slots[ob.active_material_index].material
|
||||
else:
|
||||
ma = gp_settings.material
|
||||
|
||||
|
||||
Reference in New Issue
Block a user