Revert "3D Cursor: Add option to lock it in place to prevent accidental modification"
authorCampbell Barton <ideasman42@gmail.com>
Thu, 17 Dec 2015 03:54:06 +0000 (14:54 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 17 Dec 2015 03:58:21 +0000 (14:58 +1100)
This reverts commit a791153ca5e6f87d50396e188a3664b579884161.

Rather users get feedback on changing cursor-depth,
instead of preventing 3d-cursor placement entirely.

release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/space_view3d/view3d_edit.c
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesrna/intern/rna_space.c

index da4fb04cb5d782ed94b98a2e2db61e9e10648a6a..4dc4b667a63b41f4803d429ddb03aad7e0bba5db 100644 (file)
@@ -3005,12 +3005,7 @@ class VIEW3D_PT_view3d_cursor(Panel):
         layout = self.layout
 
         view = context.space_data
-
-        layout.prop(view, "lock_cursor_location")
-
-        col = layout.column()
-        col.active = not view.lock_cursor_location
-        col.prop(view, "cursor_location", text="Location")
+        layout.column().prop(view, "cursor_location", text="Location")
 
 
 class VIEW3D_PT_view3d_name(Panel):
index 1d988e9bcfbe5038da2782b78e9566d36ad5b46c..b09cbedb6fa6c55060f50bbc773a50f863be855e 100644 (file)
@@ -4679,21 +4679,9 @@ static int view3d_cursor3d_invoke(bContext *C, wmOperator *UNUSED(op), const wmE
        return OPERATOR_FINISHED;
 }
 
-static int view3d_cursor3d_poll(bContext *C)
-{
-       if (ED_operator_region_view3d_active(C)) {
-               View3D *v3d = CTX_wm_view3d(C);
-               
-               /* only if not locked */
-               if ((v3d->flag & V3D_LOCK_CURSOR) == 0)
-                       return true;
-       }
-       
-       return false;
-}
-
 void VIEW3D_OT_cursor3d(wmOperatorType *ot)
 {
+
        /* identifiers */
        ot->name = "Set 3D Cursor";
        ot->description = "Set the location of the 3D cursor";
@@ -4701,7 +4689,8 @@ void VIEW3D_OT_cursor3d(wmOperatorType *ot)
 
        /* api callbacks */
        ot->invoke = view3d_cursor3d_invoke;
-       ot->poll = view3d_cursor3d_poll;
+
+       ot->poll = ED_operator_region_view3d_active;
 
        /* flags */
 //     ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
index 176edd5a5847c10a26236b3b5417a93eb64113b9..0ef8f2616c4a00966a6e518b0e2b22a3fd539a0a 100644 (file)
@@ -250,7 +250,6 @@ typedef struct View3D {
 #define V3D_DISPBGPICS         2
 #define V3D_HIDE_HELPLINES     4
 #define V3D_INVALID_BACKBUF    8
-#define V3D_LOCK_CURSOR                16
 
 #define V3D_ALIGN                      1024
 #define V3D_SELECT_OUTLINE     2048
index 53b89336bb509a13b4e31793a9a266bd808784c3..ad26891c96ae263c48edec7f4ee07d3e722a02a3 100644 (file)
@@ -2392,11 +2392,6 @@ static void rna_def_space_view3d(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "ob_centre_cursor", 1);
        RNA_def_property_ui_text(prop, "Lock to Cursor", "3D View center is locked to the cursor's position");
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
-       
-       prop = RNA_def_property(srna, "lock_cursor_location", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_LOCK_CURSOR);
-       RNA_def_property_ui_text(prop, "Lock Cursor Location", "3D Cursor location is locked to prevent it from being accidentally moved");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 
        prop = RNA_def_property(srna, "viewport_shade", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "drawtype");