From 3d1855ad8ebf5b4f4325b8b197bd913541c4053a Mon Sep 17 00:00:00 2001 From: Giovanni Di Grezia Date: Thu, 1 Sep 2016 19:20:57 +0200 Subject: [PATCH] Updated xg 2d curve filter editor to 1.1 --- xg_2d_curve_editor.py | 2 +- xg_2d_curve_editor_adj_script.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xg_2d_curve_editor.py b/xg_2d_curve_editor.py index ac7a2ec..0259dc2 100644 --- a/xg_2d_curve_editor.py +++ b/xg_2d_curve_editor.py @@ -2,7 +2,7 @@ # # 3DE4.script.name: Adjust 2D Curve Local Filter # -# 3DE4.script.version: v1.0 +# 3DE4.script.version: v1.1 # # 3DE4.script.comment: Adjustment of 2d Points positions using 1D Fourier filter on different frames ranges # diff --git a/xg_2d_curve_editor_adj_script.py b/xg_2d_curve_editor_adj_script.py index d03c326..1d080be 100644 --- a/xg_2d_curve_editor_adj_script.py +++ b/xg_2d_curve_editor_adj_script.py @@ -12,7 +12,6 @@ import math #init current_value = tde4.getParameterAdjustCurrentValue() -best_value = tde4.getParameterAdjustCurrentValue() get_custom_data = tde4.getParameterAdjustCustomParameters() running = tde4.getParameterAdjustPhaseRunningFlag() @@ -44,7 +43,10 @@ for frame in range (firstframe, lastframe + 1): else: points_to_filter.append(selected_point_position[1]) -points_filtered = tde4.filter1D(points_to_filter,current_value,"FOURIER_FILTER") +if len(points_to_filter) >= 3 : + points_filtered = tde4.filter1D(points_to_filter,current_value,"FOURIER_FILTER") +else: + points_filtered = points_to_filter if (running): #calculating