diff options
author | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2019-05-08 22:30:06 +0300 |
---|---|---|
committer | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2019-05-08 22:30:06 +0300 |
commit | 063caacf6e5d069cd7dc77db23ecf5e9c6d50522 (patch) | |
tree | d2912df1b7f672f7cd9b1592b308caa7fdfda71f | |
parent | d37e28f9bf03fc9b46ee0419bed6ea85c53a5d12 (diff) |
pre 2.8 API changes Pass 6
-rw-r--r-- | render_povray/__init__.py | 36 | ||||
-rw-r--r-- | render_povray/render.py | 6 | ||||
-rw-r--r-- | render_povray/shading.py | 102 | ||||
-rw-r--r-- | render_povray/ui.py | 181 |
4 files changed, 234 insertions, 91 deletions
diff --git a/render_povray/__init__.py b/render_povray/__init__.py index b7ceb5ef..d3b95b34 100644 --- a/render_povray/__init__.py +++ b/render_povray/__init__.py @@ -68,8 +68,6 @@ else: def string_strip_hyphen(name): return name.replace("-", "") - - ############################################################################### # Scene POV properties. ############################################################################### @@ -296,6 +294,18 @@ class RenderPovSettingsScene(PropertyGroup): "comparison", min=0.0, max=5.0, soft_min=0.01, soft_max=2.5, default=2.5) + alpha_mode: EnumProperty( + name="Alpha", + description="Representation of alpha information in the RGBA pixels", + items=(("SKY", "Sky", "Transparent pixels are filled with sky color"), + ("TRANSPARENT", "Transparent", "Transparent, World background is transparent with premultiplied alpha")), + default="SKY") + + use_shadows: BoolProperty( + name="Shadows", + description="Calculate shadows while rendering", + default=True) + max_trace_level: IntProperty( name="Max Trace Level", description="Number of reflections/refractions allowed on ray " @@ -705,10 +715,10 @@ class RenderPovSettingsMaterial(PropertyGroup): description="How intense (bright) the specular reflection is", min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, default=0.5, precision=3) - # specular_ior: FloatProperty( - # name="IOR", - # description="Specular index of refraction", - # min=-10.0, max=10.0, soft_min=0.0, soft_max=10.0, default=1.0, precision=3) + specular_ior: FloatProperty( + name="IOR", + description="Specular index of refraction", + min=-10.0, max=10.0, soft_min=0.0, soft_max=10.0, default=1.0, precision=3) # ior: FloatProperty( # name="IOR", @@ -3559,7 +3569,16 @@ class RenderPovSettingsCamera(PropertyGroup): description="Type the declared name in custom POV code or an external .inc " "it points at. camera {} expected", default="") - +############################################################################### +# Light POV properties. +############################################################################### +class RenderPovSettingsLight(PropertyGroup): + shadow_method: EnumProperty( + name="Shadow", + description="", + items=(("NOSHADOW", "No Shadow", "No Shadow"), + ("RAY_SHADOW", "Ray Shadow", "Ray Shadow, Use ray tracing for shadow")), + default="RAY_SHADOW") ############################################################################### # World POV properties. ############################################################################### @@ -3714,6 +3733,7 @@ class PovrayPreferences(AddonPreferences): classes = ( PovrayPreferences, RenderPovSettingsCamera, + RenderPovSettingsLight, RenderPovSettingsWorld, WorldTextureSlot, RenderPovSettingsMaterial, @@ -3761,6 +3781,7 @@ def register(): bpy.types.Texture.pov = PointerProperty(type=RenderPovSettingsTexture) bpy.types.Object.pov = PointerProperty(type=RenderPovSettingsObject) bpy.types.Camera.pov = PointerProperty(type=RenderPovSettingsCamera) + bpy.types.Light.pov = PointerProperty(type=RenderPovSettingsLight) bpy.types.World.pov = PointerProperty(type=RenderPovSettingsWorld) bpy.types.World.texture_slots = CollectionProperty(type = WorldTextureSlot) bpy.types.Text.pov = PointerProperty(type=RenderPovSettingsText) @@ -3776,6 +3797,7 @@ def unregister(): del bpy.types.Texture.pov del bpy.types.Object.pov del bpy.types.Camera.pov + del bpy.types.Light.pov del bpy.types.World.pov del bpy.types.Text.pov nodeitems_utils.unregister_node_categories("POVRAYNODES") diff --git a/render_povray/render.py b/render_povray/render.py index 033013b8..fb80f2a2 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -654,8 +654,8 @@ def write_pov(filename, scene=None, info_callback=None): tabWrite("jitter\n") # No shadow checked either at global or light level: - if(not scene.render.use_shadows or - (lamp.shadow_method == 'NOSHADOW')): + if(not scene.pov.use_shadows or + (lamp.pov.shadow_method == 'NOSHADOW')): tabWrite("shadowless\n") # Sun shouldn't be attenuated. Area lights have no falloff attribute so they @@ -3278,7 +3278,7 @@ def write_pov(filename, scene=None, info_callback=None): tabWrite("}\n") def exportWorld(world): - render = scene.render + render = scene.pov camera = scene.camera matrix = global_matrix @ camera.matrix_world if not world: diff --git a/render_povray/shading.py b/render_povray/shading.py index 03a63a9d..65fcaab1 100644 --- a/render_povray/shading.py +++ b/render_povray/shading.py @@ -12,7 +12,7 @@ def writeMaterial(using_uberpov, DEF_MAT_NAME, scene, tabWrite, safety, comments if material: # If saturation(.s) is not zero, then color is not grey, and has a tint - colored_specular_found = ((material.specular_color.s > 0.0) and (material.diffuse_shader != 'MINNAERT')) + colored_specular_found = ((material.pov.specular_color.s > 0.0) and (material.pov.diffuse_shader != 'MINNAERT')) ################## # Several versions of the finish: Level conditions are variations for specular/Mirror @@ -46,8 +46,8 @@ def writeMaterial(using_uberpov, DEF_MAT_NAME, scene, tabWrite, safety, comments if material: # POV-Ray 3.7 now uses two diffuse values respectively for front and back shading # (the back diffuse is like blender translucency) - frontDiffuse = material.diffuse_intensity - backDiffuse = material.translucency + frontDiffuse = material.pov.diffuse_intensity + backDiffuse = material.pov.translucency if material.pov.conserve_energy: @@ -66,7 +66,7 @@ def writeMaterial(using_uberpov, DEF_MAT_NAME, scene, tabWrite, safety, comments frontDiffuse = min(frontDiffuse, (1.0 - backDiffuse)) # map hardness between 0.0 and 1.0 - roughness = ((1.0 - ((material.specular_hardness - 1.0) / 510.0))) + roughness = ((1.0 - ((material.pov.specular_hardness - 1.0) / 510.0))) ## scale from 0.0 to 0.1 roughness *= 0.1 # add a small value because 0.0 is invalid. @@ -74,101 +74,101 @@ def writeMaterial(using_uberpov, DEF_MAT_NAME, scene, tabWrite, safety, comments ################################Diffuse Shader###################################### # Not used for Full spec (Level=3) of the shader. - if material.diffuse_shader == 'OREN_NAYAR' and Level != 3: + if material.pov.diffuse_shader == 'OREN_NAYAR' and Level != 3: # Blender roughness is what is generally called oren nayar Sigma, # and brilliance in POV-Ray. tabWrite("brilliance %.3g\n" % (0.9 + material.roughness)) - if material.diffuse_shader == 'TOON' and Level != 3: + if material.pov.diffuse_shader == 'TOON' and Level != 3: tabWrite("brilliance %.3g\n" % (0.01 + material.diffuse_toon_smooth * 0.25)) # Lower diffuse and increase specular for toon effect seems to look better # in POV-Ray. frontDiffuse *= 0.5 - if material.diffuse_shader == 'MINNAERT' and Level != 3: + if material.pov.diffuse_shader == 'MINNAERT' and Level != 3: #tabWrite("aoi %.3g\n" % material.darkness) pass # let's keep things simple for now - if material.diffuse_shader == 'FRESNEL' and Level != 3: + if material.pov.diffuse_shader == 'FRESNEL' and Level != 3: #tabWrite("aoi %.3g\n" % material.diffuse_fresnel_factor) pass # let's keep things simple for now - if material.diffuse_shader == 'LAMBERT' and Level != 3: + if material.pov.diffuse_shader == 'LAMBERT' and Level != 3: # trying to best match lambert attenuation by that constant brilliance value tabWrite("brilliance 1\n") if Level == 2: ###########################Specular Shader###################################### # No difference between phong and cook torrence in blender HaHa! - if (material.specular_shader == 'COOKTORR' or - material.specular_shader == 'PHONG'): - tabWrite("phong %.3g\n" % (material.specular_intensity)) - tabWrite("phong_size %.3g\n" % (material.specular_hardness /3.14)) + if (material.pov.specular_shader == 'COOKTORR' or + material.pov.specular_shader == 'PHONG'): + tabWrite("phong %.3g\n" % (material.pov.specular_intensity)) + tabWrite("phong_size %.3g\n" % (material.pov.specular_hardness /3.14)) # POV-Ray 'specular' keyword corresponds to a Blinn model, without the ior. - elif material.specular_shader == 'BLINN': + elif material.pov.specular_shader == 'BLINN': # Use blender Blinn's IOR just as some factor for spec intensity - tabWrite("specular %.3g\n" % (material.specular_intensity * - (material.specular_ior / 4.0))) + tabWrite("specular %.3g\n" % (material.pov.specular_intensity * + (material.pov.specular_ior / 4.0))) tabWrite("roughness %.3g\n" % roughness) #Could use brilliance 2(or varying around 2 depending on ior or factor) too. - elif material.specular_shader == 'TOON': - tabWrite("phong %.3g\n" % (material.specular_intensity * 2.0)) + elif material.pov.specular_shader == 'TOON': + tabWrite("phong %.3g\n" % (material.pov.specular_intensity * 2.0)) # use extreme phong_size - tabWrite("phong_size %.3g\n" % (0.1 + material.specular_toon_smooth / 2.0)) + tabWrite("phong_size %.3g\n" % (0.1 + material.pov.specular_toon_smooth / 2.0)) - elif material.specular_shader == 'WARDISO': + elif material.pov.specular_shader == 'WARDISO': # find best suited default constant for brilliance Use both phong and # specular for some values. - tabWrite("specular %.3g\n" % (material.specular_intensity / - (material.specular_slope + 0.0005))) + tabWrite("specular %.3g\n" % (material.pov.specular_intensity / + (material.pov.specular_slope + 0.0005))) # find best suited default constant for brilliance Use both phong and # specular for some values. - tabWrite("roughness %.4g\n" % (0.0005 + material.specular_slope / 10.0)) + tabWrite("roughness %.4g\n" % (0.0005 + material.pov.specular_slope / 10.0)) # find best suited default constant for brilliance Use both phong and # specular for some values. - tabWrite("brilliance %.4g\n" % (1.8 - material.specular_slope * 1.8)) + tabWrite("brilliance %.4g\n" % (1.8 - material.pov.specular_slope * 1.8)) #################################################################################### elif Level == 1: - if (material.specular_shader == 'COOKTORR' or - material.specular_shader == 'PHONG'): - tabWrite("phong %.3g\n" % (material.specular_intensity/5)) - tabWrite("phong_size %.3g\n" % (material.specular_hardness /3.14)) + if (material.pov.specular_shader == 'COOKTORR' or + material.pov.specular_shader == 'PHONG'): + tabWrite("phong %.3g\n" % (material.pov.specular_intensity/5)) + tabWrite("phong_size %.3g\n" % (material.pov.specular_hardness /3.14)) # POV-Ray 'specular' keyword corresponds to a Blinn model, without the ior. - elif material.specular_shader == 'BLINN': + elif material.pov.specular_shader == 'BLINN': # Use blender Blinn's IOR just as some factor for spec intensity - tabWrite("specular %.3g\n" % (material.specular_intensity * - (material.specular_ior / 4.0))) + tabWrite("specular %.3g\n" % (material.pov.specular_intensity * + (material.pov.specular_ior / 4.0))) tabWrite("roughness %.3g\n" % roughness) #Could use brilliance 2(or varying around 2 depending on ior or factor) too. - elif material.specular_shader == 'TOON': - tabWrite("phong %.3g\n" % (material.specular_intensity * 2.0)) + elif material.pov.specular_shader == 'TOON': + tabWrite("phong %.3g\n" % (material.pov.specular_intensity * 2.0)) # use extreme phong_size - tabWrite("phong_size %.3g\n" % (0.1 + material.specular_toon_smooth / 2.0)) + tabWrite("phong_size %.3g\n" % (0.1 + material.pov.specular_toon_smooth / 2.0)) - elif material.specular_shader == 'WARDISO': + elif material.pov.specular_shader == 'WARDISO': # find best suited default constant for brilliance Use both phong and # specular for some values. - tabWrite("specular %.3g\n" % (material.specular_intensity / - (material.specular_slope + 0.0005))) + tabWrite("specular %.3g\n" % (material.pov.specular_intensity / + (material.pov.specular_slope + 0.0005))) # find best suited default constant for brilliance Use both phong and # specular for some values. - tabWrite("roughness %.4g\n" % (0.0005 + material.specular_slope / 10.0)) + tabWrite("roughness %.4g\n" % (0.0005 + material.pov.specular_slope / 10.0)) # find best suited default constant for brilliance Use both phong and # specular for some values. - tabWrite("brilliance %.4g\n" % (1.8 - material.specular_slope * 1.8)) + tabWrite("brilliance %.4g\n" % (1.8 - material.pov.specular_slope * 1.8)) elif Level == 3: - tabWrite("specular %.3g\n" % ((material.specular_intensity*material.specular_color.v)*5)) - tabWrite("roughness %.3g\n" % (1.1/material.specular_hardness)) + tabWrite("specular %.3g\n" % ((material.pov.specular_intensity*material.pov.specular_color.v)*5)) + tabWrite("roughness %.3g\n" % (1.1/material.pov.specular_hardness)) tabWrite("diffuse %.3g %.3g\n" % (frontDiffuse, backDiffuse)) - tabWrite("ambient %.3g\n" % material.ambient) + tabWrite("ambient %.3g\n" % material.pov.ambient) # POV-Ray blends the global value #tabWrite("ambient rgb <%.3g, %.3g, %.3g>\n" % \ - # tuple([c*material.ambient for c in world.ambient_color])) - tabWrite("emission %.3g\n" % material.emit) # New in POV-Ray 3.7 + # tuple([c*material.pov.ambient for c in world.ambient_color])) + tabWrite("emission %.3g\n" % material.pov.emit) # New in POV-Ray 3.7 #POV-Ray just ignores roughness if there's no specular keyword #tabWrite("roughness %.3g\n" % roughness) @@ -183,11 +183,11 @@ def writeMaterial(using_uberpov, DEF_MAT_NAME, scene, tabWrite, safety, comments # 'phong 70.0 ' if Level != 1: - if material.raytrace_mirror.use: - raytrace_mirror = material.raytrace_mirror + if material.pov_raytrace_mirror.use: + raytrace_mirror = material.pov_raytrace_mirror if raytrace_mirror.reflect_factor: tabWrite("reflection {\n") - tabWrite("rgb <%.3g, %.3g, %.3g>\n" % material.mirror_color[:]) + tabWrite("rgb <%.3g, %.3g, %.3g>\n" % material.pov.mirror_color[:]) if material.pov.mirror_metallic: tabWrite("metallic %.3g\n" % (raytrace_mirror.reflect_factor)) # Blurry reflections for UberPOV @@ -203,8 +203,8 @@ def writeMaterial(using_uberpov, DEF_MAT_NAME, scene, tabWrite, safety, comments tabWrite("falloff %.3g exponent %.3g} " % \ (raytrace_mirror.fresnel, raytrace_mirror.fresnel_factor)) - if material.subsurface_scattering.use: - subsurface_scattering = material.subsurface_scattering + if material.pov_subsurface_scattering.use: + subsurface_scattering = material.pov_subsurface_scattering tabWrite("subsurface { translucency <%.3g, %.3g, %.3g> }\n" % ( (subsurface_scattering.radius[0]), (subsurface_scattering.radius[1]), @@ -225,7 +225,7 @@ def writeMaterial(using_uberpov, DEF_MAT_NAME, scene, tabWrite, safety, comments # This is written into the object ''' - if material and material.transparency_method=='RAYTRACE': + if material and material.pov.transparency_method=='RAYTRACE': 'interior { ior %.3g} ' % material.raytrace_transparency.ior ''' @@ -233,7 +233,7 @@ def writeMaterial(using_uberpov, DEF_MAT_NAME, scene, tabWrite, safety, comments #tabWrite("metallic %.6f\n" % material.spec) #tabWrite("phong %.6f\n" % material.spec) #tabWrite("phong_size %.6f\n" % material.spec) - #tabWrite("brilliance %.6f " % (material.specular_hardness/256.0) # Like hardness + #tabWrite("brilliance %.6f " % (material.pov.specular_hardness/256.0) # Like hardness tabWrite("}\n\n") diff --git a/render_povray/ui.py b/render_povray/ui.py index a86d0c3e..44e83681 100644 --- a/render_povray/ui.py +++ b/render_povray/ui.py @@ -576,13 +576,122 @@ class LIGHT_PT_POV_sunsky(PovLampButtonsPanel, bpy.types.Panel): draw = properties_data_light.DATA_PT_sunsky.draw - +''' class LIGHT_PT_POV_shadow(PovLampButtonsPanel, bpy.types.Panel): - bl_label = properties_data_light.DATA_PT_shadow.bl_label + bl_label = "Shadow" + COMPAT_ENGINES = {'POVRAY_RENDER'} + + @classmethod + def poll(cls, context): + lamp = context.lamp + engine = context.scene.render.engine + return lamp and (engine in cls.COMPAT_ENGINES) - draw = properties_data_light.DATA_PT_shadow.draw + def draw(self, context): + layout = self.layout + + lamp = context.lamp + layout.row().prop(lamp, "shadow_method", expand=True) ''' + if lamp.shadow_method == 'NOSHADOW' and lamp.type == 'AREA': + split = layout.split() + + col = split.column() + col.label(text="Form factor sampling:") + + sub = col.row(align=True) + + if lamp.shape == 'SQUARE': + sub.prop(lamp, "shadow_ray_samples_x", text="Samples") + elif lamp.shape == 'RECTANGLE': + sub.prop(lamp, "shadow_ray_samples_x", text="Samples X") + sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y") + + if lamp.shadow_method != 'NOSHADOW': + split = layout.split() + + col = split.column() + col.prop(lamp, "shadow_color", text="") + + col = split.column() + col.prop(lamp, "use_shadow_layer", text="This Layer Only") + col.prop(lamp, "use_only_shadow") + + if lamp.shadow_method == 'RAY_SHADOW': + split = layout.split() + + col = split.column() + col.label(text="Sampling:") + + if lamp.type in {'POINT', 'SUN', 'SPOT'}: + sub = col.row() + + sub.prop(lamp, "shadow_ray_samples", text="Samples") + sub.prop(lamp, "shadow_soft_size", text="Soft Size") + + elif lamp.type == 'AREA': + sub = col.row(align=True) + + if lamp.shape == 'SQUARE': + sub.prop(lamp, "shadow_ray_samples_x", text="Samples") + elif lamp.shape == 'RECTANGLE': + sub.prop(lamp, "shadow_ray_samples_x", text="Samples X") + sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y") + + col.row().prop(lamp, "shadow_ray_sample_method", expand=True) + + if lamp.shadow_ray_sample_method == 'ADAPTIVE_QMC': + layout.prop(lamp, "shadow_adaptive_threshold", text="Threshold") + + if lamp.type == 'AREA' and lamp.shadow_ray_sample_method == 'CONSTANT_JITTERED': + row = layout.row() + row.prop(lamp, "use_umbra") + row.prop(lamp, "use_dither") + row.prop(lamp, "use_jitter") + + elif lamp.shadow_method == 'BUFFER_SHADOW': + col = layout.column() + col.label(text="Buffer Type:") + col.row().prop(lamp, "shadow_buffer_type", expand=True) + + if lamp.shadow_buffer_type in {'REGULAR', 'HALFWAY', 'DEEP'}: + split = layout.split() + + col = split.column() + col.label(text="Filter Type:") + col.prop(lamp, "shadow_filter_type", text="") + sub = col.column(align=True) + sub.prop(lamp, "shadow_buffer_soft", text="Soft") + sub.prop(lamp, "shadow_buffer_bias", text="Bias") + + col = split.column() + col.label(text="Sample Buffers:") + col.prop(lamp, "shadow_sample_buffers", text="") + sub = col.column(align=True) + sub.prop(lamp, "shadow_buffer_size", text="Size") + sub.prop(lamp, "shadow_buffer_samples", text="Samples") + if lamp.shadow_buffer_type == 'DEEP': + col.prop(lamp, "compression_threshold") + + elif lamp.shadow_buffer_type == 'IRREGULAR': + layout.prop(lamp, "shadow_buffer_bias", text="Bias") + + split = layout.split() + + col = split.column() + col.prop(lamp, "use_auto_clip_start", text="Autoclip Start") + sub = col.column() + sub.active = not lamp.use_auto_clip_start + sub.prop(lamp, "shadow_buffer_clip_start", text="Clip Start") + + col = split.column() + col.prop(lamp, "use_auto_clip_end", text="Autoclip End") + sub = col.column() + sub.active = not lamp.use_auto_clip_end + sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End") +''' + class LIGHT_PT_POV_area(PovLampButtonsPanel, bpy.types.Panel): bl_label = properties_data_light.DATA_PT_area.bl_label @@ -752,19 +861,18 @@ class RENDER_PT_povray_render_settings(RenderButtonsPanel, bpy.types.Panel): layout = self.layout scene = context.scene + rd = context.scene.render #layout.active = (scene.pov.max_trace_level != 0) if sys.platform[:3] != "win": layout.prop(scene.pov, "sdl_window_enable", text="POV-Ray SDL Window") - + col = layout.column() - col.label(text="Global Settings:") col.prop(scene.pov, "max_trace_level", text="Ray Depth") - + align = True layout.active = scene.pov.global_settings_advanced layout.prop(scene.pov,"charset") - align = True row = layout.row(align = align) row.prop(scene.pov,"adc_bailout") row = layout.row(align = align) @@ -777,7 +885,15 @@ class RENDER_PT_povray_render_settings(RenderButtonsPanel, bpy.types.Panel): row.prop(scene.pov,"number_of_waves") row = layout.row(align = align) row.prop(scene.pov,"noise_generator") - + + split = layout.split() + split.label(text="Shading:") + split = layout.split() + + row = split.row(align = align) + row.prop(scene.pov, "use_shadows") + row.prop(scene.pov, "alpha_mode") + class RENDER_PT_povray_photons(RenderButtonsPanel, bpy.types.Panel): bl_label = "Photons" bl_options = {'DEFAULT_CLOSED'} @@ -1401,6 +1517,28 @@ class MATERIAL_PT_povray_replacement_text(MaterialButtonsPanel, bpy.types.Panel) col.label(text="Replace properties with:") col.prop(mat.pov, "replacement_text", text="") +class WORLD_TEXTURE_SLOTS_UL_List(UIList): + """Texture Slots UIList.""" + + + def draw_item(self, context, layout, world, item, icon, active_data, + world_texture_list_index, index): + world = context.world#.pov + active_data = world.pov + #tex = context.texture #may be needed later? + + + # We could write some code to decide which icon to use here... + custom_icon = 'TEXTURE' + + # Make sure your code supports all 3 layout types + if self.layout_type in {'DEFAULT', 'COMPACT'}: + layout.label(item.name, icon = custom_icon) + + elif self.layout_type in {'GRID'}: + layout.alignment = 'CENTER' + layout.label("", icon = custom_icon) + class TEXTURE_PT_povray_type(TextureButtonsPanel, bpy.types.Panel): bl_label = "POV-ray Textures" COMPAT_ENGINES = {'POVRAY_RENDER'} @@ -1415,6 +1553,11 @@ class TEXTURE_PT_povray_type(TextureButtonsPanel, bpy.types.Panel): split.label(text="POV:") split.prop(tex.pov, "tex_pattern_type", text="") + row = layout.row() + row.template_list("WORLD_TEXTURE_SLOTS_UL_List", "The_List", world, + "texture_slots", world, "world_texture_list_index") + + class TEXTURE_PT_povray_preview(TextureButtonsPanel, bpy.types.Panel): bl_label = "Preview" COMPAT_ENGINES = {'POVRAY_RENDER'} @@ -2342,28 +2485,6 @@ def menu_func_templates(self, context): # Do not depend on POV-Ray being active renderer here... self.layout.menu("TEXT_MT_templates_pov") -class WORLD_TEXTURE_SLOTS_UL_List(UIList): - """Texture Slots UIList.""" - - - def draw_item(self, context, layout, world, item, icon, active_data, - world_texture_list_index, index): - world = context.world#.pov - active_data = world.pov - #tex = context.texture #may be needed later? - - - # We could write some code to decide which icon to use here... - custom_icon = 'TEXTURE' - - # Make sure your code supports all 3 layout types - if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(item.name, icon = custom_icon) - - elif self.layout_type in {'GRID'}: - layout.alignment = 'CENTER' - layout.label("", icon = custom_icon) - classes = ( WORLD_PT_POV_world, POV_WORLD_MT_presets, |