Changeset View
Changeset View
Standalone View
Standalone View
io_scene_fbx/import_fbx.py
| Context not available. | |||||
| ) | ) | ||||
| geom_mat = geom_loc * geom_rot * geom_scale | geom_mat = geom_loc * geom_rot * geom_scale | ||||
| # We return mat without 'geometric transforms' too, because it is to be used for children, sigh... | # We return mat without 'geometric transforms' too, because it is to be used for children, sigh... | ||||
| return (base_mat * geom_mat, base_mat, geom_mat) | return base_mat * geom_mat, base_mat, geom_mat | ||||
| # XXX This might be weak, now that we can add vgroups from both bones and shapes, name collisions become | # XXX This might be weak, now that we can add vgroups from both bones and shapes, name collisions become | ||||
| Context not available. | |||||
| for me, objects in meshes: | for me, objects in meshes: | ||||
| vcos = tuple((idx, me.vertices[idx].co + Vector(dvco)) for idx, dvco in zip(indices, dvcos)) | vcos = tuple((idx, me.vertices[idx].co + Vector(dvco)) for idx, dvco in zip(indices, dvcos)) | ||||
| objects = list({node.bl_obj for node in objects}) | objects = list({node.bl_obj for node in objects}) | ||||
| assert(objects) | assert objects | ||||
| if me.shape_keys is None: | if me.shape_keys is None: | ||||
| objects[0].shape_key_add(name="Basis", from_mix=False) | objects[0].shape_key_add(name="Basis", from_mix=False) | ||||
| Context not available. | |||||
| def pack_data_from_content(image, fbx_obj): | def pack_data_from_content(image, fbx_obj): | ||||
| data = elem_find_first_bytes(fbx_obj, b'Content') | data = elem_find_first_bytes(fbx_obj, b'Content') | ||||
| if (data): | if data: | ||||
| data_len = len(data) | data_len = len(data) | ||||
| if (data_len): | if data_len: | ||||
| image.pack(data=data, data_len=data_len) | image.pack(data=data, data_len=data_len) | ||||
| elem_name_utf8 = elem_name_ensure_classes(fbx_obj, {b'Texture', b'Video'}) | elem_name_utf8 = elem_name_ensure_classes(fbx_obj, {b'Texture', b'Video'}) | ||||
| Context not available. | |||||