WIP: Animation: operators to update the pose library #104673
@ -3,7 +3,7 @@
|
|||||||
bl_info = {
|
bl_info = {
|
||||||
"name": "FBX format",
|
"name": "FBX format",
|
||||||
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem",
|
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem",
|
||||||
"version": (5, 3, 0),
|
"version": (5, 3, 1),
|
||||||
"blender": (3, 6, 0),
|
"blender": (3, 6, 0),
|
||||||
"location": "File > Import-Export",
|
"location": "File > Import-Export",
|
||||||
"description": "FBX IO meshes, UVs, vertex colors, materials, textures, cameras, lamps and actions",
|
"description": "FBX IO meshes, UVs, vertex colors, materials, textures, cameras, lamps and actions",
|
||||||
|
@ -2899,20 +2899,23 @@ def fbx_data_from_scene(scene, depsgraph, settings):
|
|||||||
_objs_indices = {}
|
_objs_indices = {}
|
||||||
for ma, (ma_key, ob_objs) in data_materials.items():
|
for ma, (ma_key, ob_objs) in data_materials.items():
|
||||||
for ob_obj in ob_objs:
|
for ob_obj in ob_objs:
|
||||||
connections.append((b"OO", get_fbx_uuid_from_key(ma_key), ob_obj.fbx_uuid, None))
|
|
||||||
# Get index of this material for this object (or dupliobject).
|
# Get index of this material for this object (or dupliobject).
|
||||||
# Material indices for mesh faces are determined by their order in 'ma to ob' connections.
|
# Material indices for mesh faces are determined by their order in 'ma to ob' connections.
|
||||||
# Only materials for meshes currently...
|
# Only materials for meshes currently...
|
||||||
# Note in case of dupliobjects a same me/ma idx will be generated several times...
|
# Note in case of dupliobjects a same me/ma idx will be generated several times...
|
||||||
# Should not be an issue in practice, and it's needed in case we export duplis but not the original!
|
# Should not be an issue in practice, and it's needed in case we export duplis but not the original!
|
||||||
if ob_obj.type not in BLENDER_OBJECT_TYPES_MESHLIKE:
|
if ob_obj.type not in BLENDER_OBJECT_TYPES_MESHLIKE:
|
||||||
|
connections.append((b"OO", get_fbx_uuid_from_key(ma_key), ob_obj.fbx_uuid, None))
|
||||||
continue
|
continue
|
||||||
_mesh_key, me, _free = data_meshes[ob_obj]
|
_mesh_key, me, _free = data_meshes[ob_obj]
|
||||||
material_indices = mesh_material_indices.setdefault(me, {})
|
material_indices = mesh_material_indices.setdefault(me, {})
|
||||||
if ma in material_indices:
|
if ma in material_indices:
|
||||||
# Material has already been found for this mesh.
|
# Material has already been found for this mesh.
|
||||||
# XXX If a mesh has multiple material slots with the same material, they are combined into one slot.
|
# XXX If a mesh has multiple material slots with the same material, they are combined into one slot.
|
||||||
|
# Even if duplicate materials were exported without combining them into one slot, keeping duplicate
|
||||||
|
# materials separated does not appear to be common behaviour of external software when importing FBX.
|
||||||
continue
|
continue
|
||||||
|
connections.append((b"OO", get_fbx_uuid_from_key(ma_key), ob_obj.fbx_uuid, None))
|
||||||
idx = _objs_indices[ob_obj] = _objs_indices.get(ob_obj, -1) + 1
|
idx = _objs_indices[ob_obj] = _objs_indices.get(ob_obj, -1) + 1
|
||||||
material_indices[ma] = idx
|
material_indices[ma] = idx
|
||||||
del _objs_indices
|
del _objs_indices
|
||||||
|
Loading…
Reference in New Issue
Block a user