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:
authorHans Goudey <h.goudey@me.com>2020-11-06 01:08:00 +0300
committerHans Goudey <h.goudey@me.com>2020-11-06 01:08:00 +0300
commit00374fbde2bd717f3fe7b8ee5eb79be0145de37b (patch)
tree90b746916c59f1cdf8e7b5440ef618fbb885995a /source/blender/makesrna
parentad481bdd354bc82ac32866240bf816d2abdbb608 (diff)
Move "Camera Parent Lock" from preferences to Object Relations
"Camera Parent Lock" can be useful when rigging cameras, but it is not intuitive, and has also generated a lot of confusion (bug reports). This is because it breaks the fundamental parent <-> child relationship conventions in Blender, and there is no indication that it's intended without diving into the preferences. This commit moves the setting to the object level, and exposes it in the relations panel in the property editor. It is exposed for every object type because any object type can be "View Locked" in the 3D view. The property description is also updated to reflect this change and be more specific without getting too long. In the future this could become a more general feature of the transform system, but for now it is limited to "Lock Camera to View". Differential Revision: https://developer.blender.org/D9239
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_object.c9
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c7
2 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 8b227774d66..6f7116bfe22 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2699,6 +2699,15 @@ static void rna_def_object(BlenderRNA *brna)
prop, "Parent Bone", "Name of parent bone in case of a bone parenting relation");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update");
+ prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(
+ prop, NULL, "transflag", OB_TRANSFORM_ADJUST_ROOT_PARENT_FOR_VIEW_LOCK);
+ RNA_def_property_ui_text(prop,
+ "Camera Parent Lock",
+ "View Lock 3D viewport camera transformation affects the object's "
+ "parent instead");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update");
+
/* Track and Up flags */
/* XXX: these have been saved here for a bit longer (after old track was removed),
* since some other tools still refer to this */
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index e6821d6e4a7..f0106c3729b 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -5659,13 +5659,6 @@ static void rna_def_userdef_input(BlenderRNA *brna)
"Auto Depth",
"Use the depth under the mouse to improve view pan/rotate/zoom functionality");
- prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT);
- RNA_def_property_ui_text(prop,
- "Camera Parent Lock",
- "When the camera is locked to the view and in fly mode, "
- "transform the parent rather than the camera");
-
/* view zoom */
prop = RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS);