FBX IO: Use the new ShapeKey.points with faster foreach_get/set #105133
@ -2753,7 +2753,7 @@ def fbx_data_from_scene(scene, depsgraph, settings):
|
||||
_cos = MESH_ATTRIBUTE_POSITION.to_ndarray(me.attributes)
|
||||
else:
|
||||
_cos = np.empty(len(me.vertices) * 3, dtype=co_bl_dtype)
|
||||
shape_key.data.foreach_get("co", _cos)
|
||||
shape_key.points.foreach_get("co", _cos)
|
||||
return vcos_transformed(_cos, geom_mat_co, co_fbx_dtype)
|
||||
|
||||
for shape in me.shape_keys.key_blocks[1:]:
|
||||
|
@ -2002,7 +2002,7 @@ def blen_read_shapes(fbx_tmpl, fbx_data, objects, me, scene):
|
||||
if dvcos.any():
|
||||
shape_cos = me_vcos_vector_view.copy()
|
||||
shape_cos[indices] += dvcos
|
||||
kb.data.foreach_set("co", shape_cos.ravel())
|
||||
kb.points.foreach_set("co", shape_cos.ravel())
|
||||
|
||||
shape_key_values_in_range &= expand_shape_key_range(kb, weight)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user