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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2019-09-06 23:06:25 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-07 00:39:19 +0300
commit87d0033ea9feb4ff85ef1249ae3b57aaa3c3d540 (patch)
treec583497cc5ff432add936465c9d0d39cb3e7ec09 /release/scripts/modules/bpy_extras/node_shader_utils.py
parentbbcb4be04fd468b8a93d919b4fc50767817ef701 (diff)
Fix node_shader_utils problems with new mapping node
Since rBbaaa89a0bc54 we have to access the mapping node differently. This doesnt take actual linkage of the new sockets into account (but this wasnt done for most sockets on the Principled BSDF node either) Also the min/max of the mapping node was removed entirely. It was decided upon removing this from node_shader_utils as well (and replace this by existing access to the Extension parameter of the Texture node). Part of solving T69526. Differential Revision: https://developer.blender.org/D5693
Diffstat (limited to 'release/scripts/modules/bpy_extras/node_shader_utils.py')
-rw-r--r--release/scripts/modules/bpy_extras/node_shader_utils.py62
1 files changed, 12 insertions, 50 deletions
diff --git a/release/scripts/modules/bpy_extras/node_shader_utils.py b/release/scripts/modules/bpy_extras/node_shader_utils.py
index 0eac9794930..4ca3e675c37 100644
--- a/release/scripts/modules/bpy_extras/node_shader_utils.py
+++ b/release/scripts/modules/bpy_extras/node_shader_utils.py
@@ -619,10 +619,6 @@ class ShaderImageTextureWrapper():
self.translation = tex.translation
self.rotation = tex.rotation
self.scale = tex.scale
- self.use_min = tex.use_min
- self.use_max = tex.use_max
- self.min = tex.min
- self.max = tex.max
tex.is_readonly = is_readonly_back
@@ -750,70 +746,36 @@ class ShaderImageTextureWrapper():
def translation_get(self):
- return self.node_mapping.translation if self.node_mapping is not None else Vector((0.0, 0.0, 0.0))
+ if self.node_mapping is None:
+ return Vector((0.0, 0.0, 0.0))
+ return self.node_mapping.inputs['Location'].default_value
@_set_check
def translation_set(self, translation):
- self.node_mapping.translation = translation
+ self.node_mapping.inputs['Location'].default_value = translation
translation = property(translation_get, translation_set)
def rotation_get(self):
- return self.node_mapping.rotation if self.node_mapping is not None else Vector((0.0, 0.0, 0.0))
+ if self.node_mapping is None:
+ return Vector((0.0, 0.0, 0.0))
+ return self.node_mapping.inputs['Rotation'].default_value
@_set_check
def rotation_set(self, rotation):
- self.node_mapping.rotation = rotation
+ self.node_mapping.inputs['Rotation'].default_value = rotation
rotation = property(rotation_get, rotation_set)
def scale_get(self):
- return self.node_mapping.scale if self.node_mapping is not None else Vector((1.0, 1.0, 1.0))
+ if self.node_mapping is None:
+ return Vector((0.0, 0.0, 0.0))
+ return self.node_mapping.inputs['Scale'].default_value
@_set_check
def scale_set(self, scale):
- self.node_mapping.scale = scale
+ self.node_mapping.inputs['Scale'].default_value = scale
scale = property(scale_get, scale_set)
-
-
- def use_min_get(self):
- return self.node_mapping.use_min if self.node_mapping is not None else False
-
- @_set_check
- def use_min_set(self, use_min):
- self.node_mapping.use_min = use_min
-
- use_min = property(use_min_get, use_min_set)
-
-
- def use_max_get(self):
- return self.node_mapping.use_max if self.node_mapping is not None else False
-
- @_set_check
- def use_max_set(self, use_max):
- self.node_mapping.use_max = use_max
-
- use_max = property(use_max_get, use_max_set)
-
-
- def min_get(self):
- return self.node_mapping.min if self.node_mapping is not None else Vector((0.0, 0.0, 0.0))
-
- @_set_check
- def min_set(self, min):
- self.node_mapping.min = min
-
- min = property(min_get, min_set)
-
-
- def max_get(self):
- return self.node_mapping.max if self.node_mapping is not None else Vector((0.0, 0.0, 0.0))
-
- @_set_check
- def max_set(self, max):
- self.node_mapping.max = max
-
- max = property(max_get, max_set)