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:
authorJulien Duroure <julien.duroure@gmail.com>2020-09-16 19:00:14 +0300
committerJulien Duroure <julien.duroure@gmail.com>2020-09-17 16:23:03 +0300
commitf3cf3a16e989eb2b407be466be8ecb2aa951275c (patch)
tree723d63bdb4df6152a20c81ca84b578ee5cdebece /io_scene_gltf2/blender/exp/gltf2_blender_get.py
parent59787f0f2f74fed8159554c105c6c01802070271 (diff)
glTF exporter: Manage emission strength in materials
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_get.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_get.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_get.py b/io_scene_gltf2/blender/exp/gltf2_blender_get.py
index 71eb4a2c..6a5152a6 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_get.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_get.py
@@ -227,7 +227,7 @@ def get_factor_from_socket(socket, kind):
from a MULTIPLY node just before the socket.
kind is either 'RGB' or 'VALUE'.
"""
- fac = __get_const_from_socket(socket, kind)
+ fac = get_const_from_socket(socket, kind)
if fac is not None:
return fac
@@ -237,19 +237,19 @@ def get_factor_from_socket(socket, kind):
if kind == 'RGB':
if node.type == 'MIX_RGB' and node.blend_type == 'MULTIPLY':
# TODO: handle factor in inputs[0]?
- x1 = __get_const_from_socket(node.inputs[1], kind)
- x2 = __get_const_from_socket(node.inputs[2], kind)
+ x1 = get_const_from_socket(node.inputs[1], kind)
+ x2 = get_const_from_socket(node.inputs[2], kind)
if kind == 'VALUE':
if node.type == 'MATH' and node.operation == 'MULTIPLY':
- x1 = __get_const_from_socket(node.inputs[0], kind)
- x2 = __get_const_from_socket(node.inputs[1], kind)
+ x1 = get_const_from_socket(node.inputs[0], kind)
+ x2 = get_const_from_socket(node.inputs[1], kind)
if x1 is not None and x2 is None: return x1
if x2 is not None and x1 is None: return x2
return None
-def __get_const_from_socket(socket, kind):
+def get_const_from_socket(socket, kind):
if not socket.is_linked:
if kind == 'RGB':
if socket.type != 'RGBA': return None