Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/src/editscreen.c')
-rw-r--r--source/blender/src/editscreen.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c
index 6069ca16312..15c3d8c6fec 100644
--- a/source/blender/src/editscreen.c
+++ b/source/blender/src/editscreen.c
@@ -2163,10 +2163,23 @@ short get_activedevice(void)
return window_get_activedevice(mainwin);
}
-short getndof(short *sbval)
+void getndof(float *sbval)
{
winlay_process_events(0);
- return window_get_ndof(mainwin, sbval);
+ window_get_ndof(mainwin, sbval);
+}
+
+void filterNDOFvalues(float *sbval)
+{
+ int i=0;
+ float max = 0.0;
+
+ for (i =0; i<5;i++)
+ if (fabs(sbval[i]) > max)
+ max = fabs(sbval[i]);
+ for (i =0; i<5;i++)
+ if (fabs(sbval[i]) != max )
+ sbval[i]=0.0;
}
void add_to_mainqueue(Window *win, void *user_data, short evt, short val, char ascii)