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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-10-16 17:35:49 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-10-16 18:02:24 +0300
commitb3257c11365e38436a86a73cf42a300a305c33aa (patch)
tree38493e14e12d3aeacace252e52017f22ba743b31 /io_scene_fbx/fbx_utils.py
parent0f84063c580811e14241bda234508a2622f0fcae (diff)
FBX IO: add support for exporting nodal shaders.
Getting textures to work was a bit tricky, since we basically have no more texture IDs in modern shaders (they are mere nodes). Modified specular conversion to be quadratic (between FBX Phong exponent to Pricipled specular factor). Also fixed several issues in both importers and exporters. And cleaned up ugly usage of 'mat' short name for materials in exporter (mat is reserved for matrix in Blneder code in general, 'ma' is short for material).
Diffstat (limited to 'io_scene_fbx/fbx_utils.py')
-rw-r--r--io_scene_fbx/fbx_utils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/io_scene_fbx/fbx_utils.py b/io_scene_fbx/fbx_utils.py
index 8c738089..75f6c499 100644
--- a/io_scene_fbx/fbx_utils.py
+++ b/io_scene_fbx/fbx_utils.py
@@ -324,7 +324,7 @@ def _key_to_uuid(uuids, key):
def get_fbx_uuid_from_key(key):
"""
- Return an UUID for given key, which is assumed hasable.
+ Return an UUID for given key, which is assumed to be hashable.
"""
uuid = _keys_to_uuids.get(key, None)
if uuid is None:
@@ -431,6 +431,10 @@ def get_blender_anim_curve_key(scene, ref_id, obj_key, fbx_prop_name, fbx_prop_i
fbx_prop_item_name, "AnimCurve"))
+def get_blender_nodetexture_key(ma, socket_names):
+ return "|".join((get_blenderID_key(ma), *socket_names))
+
+
# ##### Element generators. #####
# Note: elem may be None, in this case the element is not added to any parent.
@@ -1232,7 +1236,7 @@ FBXExportSettings = namedtuple("FBXExportSettings", (
FBXExportData = namedtuple("FBXExportData", (
"templates", "templates_users", "connections",
"settings", "scene", "depsgraph", "objects", "animations", "animated", "frame_start", "frame_end",
- "data_empties", "data_lights", "data_cameras", "data_meshes", "mesh_mat_indices",
+ "data_empties", "data_lights", "data_cameras", "data_meshes", "mesh_material_indices",
"data_bones", "data_leaf_bones", "data_deformers_skin", "data_deformers_shape",
"data_world", "data_materials", "data_textures", "data_videos",
))