diff options
author | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2022-01-26 03:02:18 +0300 |
---|---|---|
committer | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2022-01-26 03:02:18 +0300 |
commit | 692611358a9189c2f54f916c42a08e1ddf54bb84 (patch) | |
tree | 68ee4016d4be897fd53d5c51419c43443cd9dbe9 /render_povray/shading_properties.py | |
parent | fd5697ebcf879894d84875b593fe00ede14e79a4 (diff) |
POV: Add primitives workspace tools icons, blurry reflections, equation based isourface ; various fixes
* fix tiny formatting of quotes, docstrings, parenthesis
* fix pov centered worspaces
* fix (revert) bad default for text block insertion
* fix primitive exports sorted by most frequent for (slight) speed up
* fix some uninitialized hairstrand root diameter variable
* fix extracted function for CSG inside vector
* fix too big size of proxy mesh for ininite plane caused it to blink
* fix end of render speach error handling
* fix max specular value to better map out under a texture influence
* fix emit, ambient, translucency shading properties UI broken post 2.8
* add workspace tools icons for pov primitives
* add a user input equation based isosurface primitive
* add micro normals based blurry reflections (glossy UI slider)
Diffstat (limited to 'render_povray/shading_properties.py')
-rwxr-xr-x | render_povray/shading_properties.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/render_povray/shading_properties.py b/render_povray/shading_properties.py index 3a3c944d..9add125e 100755 --- a/render_povray/shading_properties.py +++ b/render_povray/shading_properties.py @@ -36,9 +36,8 @@ def check_material(mat): """Check that material node tree is not empty if use node button is on""" if mat is not None: if mat.use_nodes: - if not mat.node_tree: # FORMERLY : #mat.active_node_material is not None: - return True - return False + # No active node material + return not mat.node_tree return True return False @@ -66,12 +65,13 @@ def pov_context_tex_datablock(context): if context.particle_system and context.scene.texture_context == 'PARTICLES': idblock = context.particle_system.settings - return idblock idblock = context.line_style if idblock and context.scene.texture_context == 'LINESTYLE': return idblock + return idblock + def active_texture_name_from_uilist(self, context): """Name created texture slots the same as created texture""" @@ -105,7 +105,6 @@ def active_texture_name_from_search(self, context): except BaseException as e: print(e.__doc__) print('An exception occurred: {}'.format(e)) - pass def brush_texture_update(self, context): @@ -220,7 +219,7 @@ class RenderPovSettingsMaterial(PropertyGroup): diffuse_color: FloatVectorProperty( name="Diffuse color", - description=("Diffuse color of the material"), + description="Diffuse color of the material", precision=4, step=0.01, min=0, # max=inf, soft_max=1, @@ -367,7 +366,7 @@ class RenderPovSettingsMaterial(PropertyGroup): mirror_color: FloatVectorProperty( name="Mirror color", - description=("Mirror color of the material"), + description="Mirror color of the material", precision=4, step=0.01, min=0, # max=inf, soft_max=1, @@ -392,7 +391,7 @@ class RenderPovSettingsMaterial(PropertyGroup): line_color: FloatVectorProperty( name="Line color", - description=("Line color used for Freestyle line rendering"), + description="Line color used for Freestyle line rendering", precision=4, step=0.01, min=0, # max=inf, soft_max=1, @@ -422,10 +421,11 @@ class RenderPovSettingsMaterial(PropertyGroup): specular_color: FloatVectorProperty( name="Specular color", - description=("Specular color of the material "), + description="Specular color of the material ", precision=4, step=0.01, - min=0, # max=inf, soft_max=1, + min=0.0, + soft_max=1.0, default=(1.0, 1.0, 1.0), options={"ANIMATABLE"}, subtype="COLOR", @@ -1196,7 +1196,7 @@ class MaterialRaytraceMirror(PropertyGroup): mirror_color: FloatVectorProperty( name="Mirror color", - description=("Mirror color of the material"), + description="Mirror color of the material", precision=4, step=0.01, default=(1.0, 1.0, 1.0), @@ -1240,7 +1240,7 @@ class MaterialSubsurfaceScattering(PropertyGroup): color: FloatVectorProperty( name="Scattering color", - description=("Scattering color"), + description="Scattering color", precision=4, step=0.01, default=(0.604, 0.604, 0.604), @@ -1289,7 +1289,7 @@ class MaterialSubsurfaceScattering(PropertyGroup): radius: FloatVectorProperty( name="RGB Radius", - description=("Mean red/green/blue scattering path length"), + description="Mean red/green/blue scattering path length", precision=4, step=0.01, min=0.001, |