Commit: d238b77bdb74ca2906ec2b72deb3c696be09a142 Author: Antonio Vazquez Date: Wed Oct 6 18:24:17 2021 +0200 Branches: temp-eevee-gpencil-rewrite https://developer.blender.org/rBd238b77bdb74ca2906ec2b72deb3c696be09a142
Small tweaks to panels =================================================================== M release/scripts/startup/bl_ui/properties_material_gpencil.py =================================================================== diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index 249acaffff2..489eeecfa78 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -130,9 +130,11 @@ class MATERIAL_PT_gpencil_surface(GPMaterialButtonsPanel, Panel): def draw(self, context): layout = self.layout + ob = context.active_object + is_scene_render = ob.use_grease_pencil_scene_engine mat = context.material - layout.prop(mat, "use_nodes", icon='NODETREE') - layout.separator() + if is_scene_render: + layout.prop(mat, "use_nodes", icon='NODETREE') class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel): @@ -276,26 +278,29 @@ class MATERIAL_PT_gpencil_custom_props(GPMaterialButtonsPanel, PropertyPanel, Pa def draw_material_settings(self, context): + ob = context.active_object + is_scene_render = ob.use_grease_pencil_scene_engine layout = self.layout layout.use_property_split = True layout.use_property_decorate = False - mat = context.material - layout.prop(mat, "use_backface_culling") - layout.prop(mat, "blend_method") - layout.prop(mat, "shadow_method") + if is_scene_render: + layout.prop(mat, "use_backface_culling") + layout.prop(mat, "blend_method") + layout.prop(mat, "shadow_method") + + row = layout.row() + row.active = ((mat.blend_method == 'CLIP') or (mat.shadow_method == 'CLIP')) + row.prop(mat, "alpha_threshold") - row = layout.row() - row.active = ((mat.blend_method == 'CLIP') or (mat.shadow_method == 'CLIP')) - row.prop(mat, "alpha_threshold") + if mat.blend_method not in {'OPAQUE', 'CLIP', 'HASHED'}: + layout.prop(mat, "show_transparent_back") - if mat.blend_method not in {'OPAQUE', 'CLIP', 'HASHED'}: - layout.prop(mat, "show_transparent_back") + layout.prop(mat, "use_screen_refraction") + layout.prop(mat, "refraction_depth") + layout.prop(mat, "use_sss_translucency") - layout.prop(mat, "use_screen_refraction") - layout.prop(mat, "refraction_depth") - layout.prop(mat, "use_sss_translucency") layout.prop(mat, "pass_index") _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs