NDOF: add navigation modes to user preferences
authorCampbell Barton <ideasman42@gmail.com>
Sat, 1 Mar 2014 10:47:46 +0000 (21:47 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 1 Mar 2014 10:47:46 +0000 (21:47 +1100)
also comment debug prints for raytracing

release/scripts/startup/bl_ui/space_userpref.py
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform_ops.c
source/blender/render/intern/raytrace/svbvh.h

index b44b45e118d70254bc41e0d7cde0250654f1d4f0..e959c84b7b9fadfbe00d2653083e03d19387831e 100644 (file)
@@ -1100,6 +1100,7 @@ class USERPREF_PT_input(Panel):
         sub.label(text="NDOF Device:")
         sub.prop(inputs, "ndof_sensitivity", text="NDOF Sensitivity")
         sub.prop(inputs, "ndof_orbit_sensitivity", text="NDOF Orbit Sensitivity")
+        sub.row().prop(inputs, "ndof_view_navigate_method", expand=True)
         sub.row().prop(inputs, "ndof_view_rotate_method", expand=True)
 
         row.separator()
index f2f4f0f97aa6fac785704508c50dfe04118a3c9d..ca5c7ab739f56e6c8bd9f2a11f4d052e7a8e6c33 100644 (file)
@@ -3003,7 +3003,7 @@ static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was
        rv3d->camzoom = BKE_screen_view3d_zoom_from_fac(min_ff(xfac, yfac));
        CLAMP(rv3d->camzoom, RV3D_CAMZOOM_MIN, RV3D_CAMZOOM_MAX);
 
-       WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+       WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
 
        return OPERATOR_FINISHED;
 }
index f20fda27d37012d5c1f18c99ec2d5e6938947341..81a7aba4bfa1bd657979d3618da2ba6d9f0261f8 100644 (file)
@@ -206,7 +206,7 @@ static int delete_orientation_exec(bContext *C, wmOperator *UNUSED(op))
 
        BIF_removeTransformOrientationIndex(C, selected_index);
        
-       WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+       WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
        WM_event_add_notifier(C, NC_SCENE | NA_EDITED, CTX_data_scene(C));
 
        return OPERATOR_FINISHED;
@@ -253,17 +253,18 @@ static int create_orientation_exec(bContext *C, wmOperator *op)
        const bool use = RNA_boolean_get(op->ptr, "use");
        const bool overwrite = RNA_boolean_get(op->ptr, "overwrite");
        const bool use_view = RNA_boolean_get(op->ptr, "use_view");
+       View3D *v3d = CTX_wm_view3d(C);
 
        RNA_string_get(op->ptr, "name", name);
 
-       if (use && !CTX_wm_view3d(C)) {
+       if (use && !v3d) {
                BKE_report(op->reports, RPT_ERROR, "Create Orientation's 'use' parameter only valid in a 3DView context");
                return OPERATOR_CANCELLED;
        }
 
        BIF_createTransformOrientation(C, op->reports, name, use_view, use, overwrite);
 
-       WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+       WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
        WM_event_add_notifier(C, NC_SCENE | NA_EDITED, CTX_data_scene(C));
        
        return OPERATOR_FINISHED;
index a3ef166e6b25694d7a4e315fba8cc97d4b3bcb37..292b93c445f2dedb493d0e99028a20e8a730d942 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "bvh.h"
 #include "BLI_memarena.h"
-#include <stdio.h>
 #include <algorithm>
 
 struct SVBVHNode {
@@ -214,7 +213,7 @@ struct Reorganize_SVBVH {
        
        ~Reorganize_SVBVH()
        {
-#ifdef DEBUG
+#if 0
                {
                        printf("%f childs per node\n", childs_per_node / nodes);
                        printf("%d childs BB are useless\n", useless_bb);