Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_data_mesh.py
| Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | |||||
| class MeshButtonsPanel: | class MeshButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "data" | bl_context = "data" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.engine | ||||
| return context.mesh and (engine in cls.COMPAT_ENGINES) | return context.mesh and (engine in cls.COMPAT_ENGINES) | ||||
| class DATA_PT_context_mesh(MeshButtonsPanel, Panel): | class DATA_PT_context_mesh(MeshButtonsPanel, Panel): | ||||
| bl_label = "" | bl_label = "" | ||||
| bl_options = {'HIDE_HEADER'} | bl_options = {'HIDE_HEADER'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
| class DATA_PT_vertex_groups(MeshButtonsPanel, Panel): | class DATA_PT_vertex_groups(MeshButtonsPanel, Panel): | ||||
| bl_label = "Vertex Groups" | bl_label = "Vertex Groups" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.type in {'MESH', 'LATTICE'} and (engine in cls.COMPAT_ENGINES)) | return (obj and obj.type in {'MESH', 'LATTICE'} and (engine in cls.COMPAT_ENGINES)) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ob = context.object | ob = context.object | ||||
| group = ob.vertex_groups.active | group = ob.vertex_groups.active | ||||
| ▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| sub.operator("object.face_map_deselect", text="Deselect") | sub.operator("object.face_map_deselect", text="Deselect") | ||||
| class DATA_PT_shape_keys(MeshButtonsPanel, Panel): | class DATA_PT_shape_keys(MeshButtonsPanel, Panel): | ||||
| bl_label = "Shape Keys" | bl_label = "Shape Keys" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.type in {'MESH', 'LATTICE', 'CURVE', 'SURFACE'} and (engine in cls.COMPAT_ENGINES)) | return (obj and obj.type in {'MESH', 'LATTICE', 'CURVE', 'SURFACE'} and (engine in cls.COMPAT_ENGINES)) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ob = context.object | ob = context.object | ||||
| key = ob.data.shape_keys | key = ob.data.shape_keys | ||||
| ▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines | |||||