diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2010-04-19 03:52:37 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2010-04-19 03:52:37 +0400 |
commit | 6cdf29e1c920f0d8a86656fe5522ffd89ab32f25 (patch) | |
tree | 8013bccb01557596a25250b2e120f1d469cb1e8e | |
parent | 30bf23d22d033cd43da7aa957cb387a0ac789a2e (diff) |
Python API: Make properties_data_mesh compatible with COMPAT_ENGINES. (supervised by Matt ;)
-rw-r--r-- | release/scripts/io/engine_render_pov.py | 8 | ||||
-rw-r--r-- | release/scripts/io/netrender/client.py | 1 | ||||
-rw-r--r-- | release/scripts/ui/properties_data_mesh.py | 21 |
3 files changed, 27 insertions, 3 deletions
diff --git a/release/scripts/io/engine_render_pov.py b/release/scripts/io/engine_render_pov.py index 146708bd69c..04d1ee8befa 100644 --- a/release/scripts/io/engine_render_pov.py +++ b/release/scripts/io/engine_render_pov.py @@ -880,6 +880,14 @@ for member in dir(properties_material): except: pass del properties_material +import properties_data_mesh +for member in dir(properties_data_mesh): + subclass = getattr(properties_data_mesh, member) + try: + subclass.COMPAT_ENGINES.add('POVRAY_RENDER') + except: + pass +del properties_data_mesh class RenderButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/io/netrender/client.py b/release/scripts/io/netrender/client.py index 3acc0e1c2e1..ac5825039be 100644 --- a/release/scripts/io/netrender/client.py +++ b/release/scripts/io/netrender/client.py @@ -284,3 +284,4 @@ def compatible(module): #compatible("properties_render") compatible("properties_world") compatible("properties_material") +compatible("properties_data_mesh") diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py index 86aec2655b9..12d8258245d 100644 --- a/release/scripts/ui/properties_data_mesh.py +++ b/release/scripts/ui/properties_data_mesh.py @@ -25,6 +25,7 @@ narrowui = 180 class MESH_MT_vertex_group_specials(bpy.types.Menu): bl_label = "Vertex Group Specials" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): layout = self.layout @@ -38,6 +39,7 @@ class MESH_MT_vertex_group_specials(bpy.types.Menu): class MESH_MT_shape_key_specials(bpy.types.Menu): bl_label = "Shape Key Specials" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): layout = self.layout @@ -51,14 +53,17 @@ class DataButtonsPanel(bpy.types.Panel): bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "data" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def poll(self, context): - return context.mesh + engine = context.scene.render.engine + return context.mesh and (engine in self.COMPAT_ENGINES) class DATA_PT_context_mesh(DataButtonsPanel): bl_label = "" bl_show_header = False + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): layout = self.layout @@ -85,10 +90,12 @@ class DATA_PT_context_mesh(DataButtonsPanel): class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel): _context_path = "object.data" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} class DATA_PT_normals(DataButtonsPanel): bl_label = "Normals" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): layout = self.layout @@ -114,6 +121,7 @@ class DATA_PT_normals(DataButtonsPanel): class DATA_PT_settings(DataButtonsPanel): bl_label = "Settings" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): layout = self.layout @@ -125,9 +133,11 @@ class DATA_PT_settings(DataButtonsPanel): class DATA_PT_vertex_groups(DataButtonsPanel): bl_label = "Vertex Groups" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def poll(self, context): - return (context.object and context.object.type in ('MESH', 'LATTICE')) + engine = context.scene.render.engine + return (context.object and context.object.type in ('MESH', 'LATTICE') and (engine in self.COMPAT_ENGINES)) def draw(self, context): layout = self.layout @@ -167,9 +177,11 @@ class DATA_PT_vertex_groups(DataButtonsPanel): class DATA_PT_shape_keys(DataButtonsPanel): bl_label = "Shape Keys" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def poll(self, context): - return (context.object and context.object.type in ('MESH', 'LATTICE', 'CURVE', 'SURFACE')) + engine = context.scene.render.engine + return (context.object and context.object.type in ('MESH', 'LATTICE', 'CURVE', 'SURFACE') and (engine in self.COMPAT_ENGINES)) def draw(self, context): layout = self.layout @@ -263,6 +275,7 @@ class DATA_PT_shape_keys(DataButtonsPanel): class DATA_PT_uv_texture(DataButtonsPanel): bl_label = "UV Texture" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): layout = self.layout @@ -285,6 +298,7 @@ class DATA_PT_uv_texture(DataButtonsPanel): class DATA_PT_texface(DataButtonsPanel): bl_label = "Texture Face" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def poll(self, context): ob = context.active_object @@ -331,6 +345,7 @@ class DATA_PT_texface(DataButtonsPanel): class DATA_PT_vertex_colors(DataButtonsPanel): bl_label = "Vertex Colors" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): layout = self.layout |