diff --git a/render_povray/__init__.py b/render_povray/__init__.py index 8f67892e5a7975153a2c8b985e5d6fb1d4abf6a8..99c854a4f649fc92bef84744abc7c765c68855f5 100644 --- a/render_povray/__init__.py +++ b/render_povray/__init__.py @@ -3682,10 +3682,12 @@ node_categories = [ class RenderPovSettingsTexture(PropertyGroup): """Declare texture level properties controllable in UI and translated to POV.""" - # former Space properties from removed Blender Internal + # former Space properties from removed Blender Internal active_texture_index: IntProperty( name = "Index for texture_slots", - default = 0, + min=0, + max=17, + default=0, ) use_limited_texture_context: BoolProperty( @@ -3787,7 +3789,9 @@ class RenderPovSettingsTexture(PropertyGroup): magnet_type: IntProperty( name="Magnet_type", description="1 or 2", - min=1, max=2, default=2 + min=1, + max=2, + default=2, ) warp_types: EnumProperty( diff --git a/render_povray/shading.py b/render_povray/shading.py index 825cdd700df77afd5e43ddd5df63cd17b994fd1a..ac1f923f6703ddf205c493ed3e3c68903163e093 100644 --- a/render_povray/shading.py +++ b/render_povray/shading.py @@ -787,7 +787,7 @@ def writeTextureInfluence(mater, materialNames, LocalMaterialNames, path_image, trans = 1.0 - mater.pov.alpha else: trans = 0.0 - if ((mater.specular_color.s == 0.0) or (mater.pov.diffuse_shader == 'MINNAERT')): + if ((mater.pov.specular_color.s == 0.0) or (mater.pov.diffuse_shader == 'MINNAERT')): # No layered texture because of aoi pattern used for minnaert and pov can't layer patterned colored_specular_found = False else: @@ -1192,7 +1192,7 @@ def writeTextureInfluence(mater, materialNames, LocalMaterialNames, path_image, # Close first layer of POV "texture" (Blender material) tabWrite("}\n") - if ((mater.specular_color.s > 0.0) and (mater.pov.diffuse_shader != 'MINNAERT')): + if ((mater.pov.specular_color.s > 0.0) and (mater.pov.diffuse_shader != 'MINNAERT')): colored_specular_found = True else: @@ -1222,7 +1222,7 @@ def writeTextureInfluence(mater, materialNames, LocalMaterialNames, path_image, tabWrite("texture {\n") tabWrite("pigment {rgbft<%.3g, %.3g, %.3g, 0, 1>}\n" % \ - (mater.specular_color[0], mater.specular_color[1], mater.specular_color[2])) + (mater.pov.specular_color[0], mater.pov.specular_color[1], mater.pov.specular_color[2])) tabWrite("finish {%s}\n" % (safety(material_finish, Level=2))) # Level 2 is translated spec texturesNorm = "" diff --git a/render_povray/ui.py b/render_povray/ui.py index 09f77cf20501996943fdc08828de6687cfe5540b..49bcda3aca5c4d1e5f1524fd9b8dcccf1e0265eb 100644 --- a/render_povray/ui.py +++ b/render_povray/ui.py @@ -2345,6 +2345,9 @@ class TEXTURE_PT_POV_context_texture(TextureButtonsPanel, Panel): "pov_texture_slots", mat.pov, "active_texture_index", + rows=2, + maxrows=16, + type="DEFAULT" ) col = row.column(align=True) col.operator("pov.textureslotadd", icon='ADD', text='')