POV: fix colored specular
pre 2.8 property was still used. Now in the .pov. wrapper.
This commit is contained in:
parent
2f4c557df0
commit
2e7e07389f
|
@ -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(
|
||||
|
|
|
@ -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 = ""
|
||||
|
|
|
@ -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='')
|
||||
|
|
Loading…
Reference in New Issue