From ce99355030e11f5bf8b74b7252990f589dc9c71e Mon Sep 17 00:00:00 2001 From: Maurice Raybaud <mauriceraybaud@hotmail.fr> Date: Wed, 27 Oct 2010 20:41:14 +0000 Subject: [PATCH] And my first minor commit ever: I had forgotten to change some names I hope it does work now; This is an adaptation of Povray exporter to render with povray 3.7 if you want more info, there are pdfs in the zip files here on the tracker: https://projects.blender.org/tracker/index.php?func=detail&aid=22717&group_id=153&atid=468 --- render_povray/__init__.py | 4 ++-- render_povray/render.py | 2 +- render_povray/ui.py | 38 +++++++++++++++++++------------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/render_povray/__init__.py b/render_povray/__init__.py index 155ea07d4..4dcbd76f4 100644 --- a/render_povray/__init__.py +++ b/render_povray/__init__.py @@ -39,8 +39,8 @@ if "bpy" in locals(): else: import bpy from bpy.props import * - from render_povray_37 import ui - from render_povray_37 import render + from render_povray import ui + from render_povray import render def register(): Scene = bpy.types.Scene diff --git a/render_povray/render.py b/render_povray/render.py index 5daef60bd..2c5133580 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -1331,7 +1331,7 @@ def write_pov_ini(filename_ini, filename_pov, filename_image): class PovrayRender(bpy.types.RenderEngine): - bl_idname = 'POVRAY_37_RENDER' + bl_idname = 'povray_RENDER' bl_label = "Povray 3.7" DELAY = 0.02 diff --git a/render_povray/ui.py b/render_povray/ui.py index e48c038ee..390a5e2ba 100644 --- a/render_povray/ui.py +++ b/render_povray/ui.py @@ -20,18 +20,18 @@ import bpy # Use some of the existing buttons. import properties_render -properties_render.RENDER_PT_render.COMPAT_ENGINES.add('POVRAY_37_RENDER') -properties_render.RENDER_PT_dimensions.COMPAT_ENGINES.add('POVRAY_37_RENDER') -properties_render.RENDER_PT_antialiasing.COMPAT_ENGINES.add('POVRAY_37_RENDER') -properties_render.RENDER_PT_output.COMPAT_ENGINES.add('POVRAY_37_RENDER') +properties_render.RENDER_PT_render.COMPAT_ENGINES.add('POVRAY_RENDER') +properties_render.RENDER_PT_dimensions.COMPAT_ENGINES.add('POVRAY_RENDER') +properties_render.RENDER_PT_antialiasing.COMPAT_ENGINES.add('POVRAY_RENDER') +properties_render.RENDER_PT_output.COMPAT_ENGINES.add('POVRAY_RENDER') del properties_render # Use only a subset of the world panels import properties_world -properties_world.WORLD_PT_preview.COMPAT_ENGINES.add('POVRAY_37_RENDER') -properties_world.WORLD_PT_context_world.COMPAT_ENGINES.add('POVRAY_37_RENDER') -properties_world.WORLD_PT_world.COMPAT_ENGINES.add('POVRAY_37_RENDER') -properties_world.WORLD_PT_mist.COMPAT_ENGINES.add('POVRAY_37_RENDER') +properties_world.WORLD_PT_preview.COMPAT_ENGINES.add('POVRAY_RENDER') +properties_world.WORLD_PT_context_world.COMPAT_ENGINES.add('POVRAY_RENDER') +properties_world.WORLD_PT_world.COMPAT_ENGINES.add('POVRAY_RENDER') +properties_world.WORLD_PT_mist.COMPAT_ENGINES.add('POVRAY_RENDER') del properties_world # Example of wrapping every class 'as is' @@ -39,7 +39,7 @@ import properties_material for member in dir(properties_material): subclass = getattr(properties_material, member) try: - subclass.COMPAT_ENGINES.add('POVRAY_37_RENDER') + subclass.COMPAT_ENGINES.add('POVRAY_RENDER') except: pass del properties_material @@ -48,7 +48,7 @@ import properties_data_mesh for member in dir(properties_data_mesh): subclass = getattr(properties_data_mesh, member) try: - subclass.COMPAT_ENGINES.add('POVRAY_37_RENDER') + subclass.COMPAT_ENGINES.add('POVRAY_RENDER') except: pass del properties_data_mesh @@ -57,7 +57,7 @@ import properties_texture for member in dir(properties_texture): subclass = getattr(properties_texture, member) try: - subclass.COMPAT_ENGINES.add('POVRAY_37_RENDER') + subclass.COMPAT_ENGINES.add('POVRAY_RENDER') except: pass del properties_texture @@ -66,7 +66,7 @@ import properties_data_camera for member in dir(properties_data_camera): subclass = getattr(properties_data_camera, member) try: - subclass.COMPAT_ENGINES.add('POVRAY_37_RENDER') + subclass.COMPAT_ENGINES.add('POVRAY_RENDER') except: pass del properties_data_camera @@ -75,7 +75,7 @@ import properties_data_lamp for member in dir(properties_data_lamp): subclass = getattr(properties_data_lamp, member) try: - subclass.COMPAT_ENGINES.add('POVRAY_37_RENDER') + subclass.COMPAT_ENGINES.add('POVRAY_RENDER') except: pass del properties_data_lamp @@ -108,7 +108,7 @@ class MaterialButtonsPanel(): ########################################MR###################################### class MATERIAL_PT_povray_mirrorIOR(MaterialButtonsPanel, bpy.types.Panel): bl_label = "IOR Mirror" - COMPAT_ENGINES = {'POVRAY_37_RENDER'} + COMPAT_ENGINES = {'POVRAY_RENDER'} def draw_header(self, context): scene = context.material @@ -134,7 +134,7 @@ class MATERIAL_PT_povray_mirrorIOR(MaterialButtonsPanel, bpy.types.Panel): class MATERIAL_PT_povray_metallic(MaterialButtonsPanel, bpy.types.Panel): bl_label = "metallic Mirror" - COMPAT_ENGINES = {'POVRAY_37_RENDER'} + COMPAT_ENGINES = {'POVRAY_RENDER'} def draw_header(self, context): scene = context.material @@ -149,7 +149,7 @@ class MATERIAL_PT_povray_metallic(MaterialButtonsPanel, bpy.types.Panel): class MATERIAL_PT_povray_conserve_energy(MaterialButtonsPanel, bpy.types.Panel): bl_label = "conserve energy" - COMPAT_ENGINES = {'POVRAY_37_RENDER'} + COMPAT_ENGINES = {'POVRAY_RENDER'} def draw_header(self, context): mat = context.material @@ -164,7 +164,7 @@ class MATERIAL_PT_povray_conserve_energy(MaterialButtonsPanel, bpy.types.Panel): class MATERIAL_PT_povray_iridescence(MaterialButtonsPanel, bpy.types.Panel): bl_label = "iridescence" - COMPAT_ENGINES = {'POVRAY_37_RENDER'} + COMPAT_ENGINES = {'POVRAY_RENDER'} def draw_header(self, context): mat = context.material @@ -188,7 +188,7 @@ class MATERIAL_PT_povray_iridescence(MaterialButtonsPanel, bpy.types.Panel): class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel): bl_label = "Caustics" - COMPAT_ENGINES = {'POVRAY_37_RENDER'} + COMPAT_ENGINES = {'POVRAY_RENDER'} def draw_header(self, context): @@ -240,7 +240,7 @@ class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel): class RENDER_PT_povray_radiosity(RenderButtonsPanel, bpy.types.Panel): bl_label = "Radiosity" - COMPAT_ENGINES = {'POVRAY_37_RENDER'} + COMPAT_ENGINES = {'POVRAY_RENDER'} def draw_header(self, context): scene = context.scene -- GitLab