Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_material.py
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | class MATERIAL_PT_preview(MaterialButtonsPanel, Panel): | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| self.layout.template_preview(context.material) | self.layout.template_preview(context.material) | ||||
| class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel): | class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel): | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| _context_path = "material" | _context_path = "material" | ||||
| _property_type = bpy.types.Material | _property_type = bpy.types.Material | ||||
| class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): | class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): | ||||
| bl_label = "" | bl_label = "" | ||||
| bl_context = "material" | bl_context = "material" | ||||
| bl_options = {'HIDE_HEADER'} | bl_options = {'HIDE_HEADER'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | ob = context.object | ||||
| mat = context.material | mat = context.material | ||||
| if (ob and ob.type == 'GPENCIL') or (mat and mat.grease_pencil): | if (ob and ob.type == 'GPENCIL') or (mat and mat.grease_pencil): | ||||
| return False | return False | ||||
| ▲ Show 20 Lines • Show All 262 Lines • Show Last 20 Lines | |||||