Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice Raybaud <mauriceraybaud@hotmail.fr>2019-12-24 10:07:33 +0300
committerMaurice Raybaud <mauriceraybaud@hotmail.fr>2019-12-24 10:07:33 +0300
commit2e7e07389f3ec9c0f74044e5d25950b20fb08e69 (patch)
tree25ea4766acf9ac2e034953b9343e3dce01fe1bb7 /render_povray
parent2f4c557df001572041f90d36931abbd1fead8b4a (diff)
POV: fix colored specular
pre 2.8 property was still used. Now in the .pov. wrapper.
Diffstat (limited to 'render_povray')
-rw-r--r--render_povray/__init__.py10
-rw-r--r--render_povray/shading.py6
-rw-r--r--render_povray/ui.py3
3 files changed, 13 insertions, 6 deletions
diff --git a/render_povray/__init__.py b/render_povray/__init__.py
index 8f67892e..99c854a4 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 825cdd70..ac1f923f 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 09f77cf2..49bcda3a 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='')