Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

don't replaces NaN's with zeros

Jon Matthisa00db7c15988
diff --git a/freemocap/fmc_blender.py b/freemocap/fmc_blender.py
index 93e88af5..2208c451 100644
--- a/freemocap/fmc_blender.py
+++ b/freemocap/fmc_blender.py
@@ -56,13 +56,8 @@ bpy.context.scene.unit_settings.length_unit = 'METERS'
for index, col in enumerate(markers_list):
# parse string float value into floats, create Vector, set position to Vector
- if math.isnan(col[0]):
- col[0] = 0.0
- if math.isnan(col[1]):
- col[1] = 0.0
- if math.isnan(col[2]):
- col[2] = 0.0
- coord = Vector(((float(col[0])*0.001), (float(col[2])*0.001), (float(col[1]))* -0.001))
+ if not math.isnan(col[0]):
+ coord = Vector(((float(col[0])*0.001), (float(col[2])*0.001), (float(col[1]))* -0.001))
#empties
bpy.ops.object.add(type='EMPTY', location=coord)