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:
-rw-r--r--release/scripts/ui/space_view3d.py8
-rw-r--r--source/blender/makesrna/intern/rna_space.c6
2 files changed, 13 insertions, 1 deletions
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index 5cd73e8607b..d0b80ddcbfd 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -116,7 +116,7 @@ class VIEW3D_MT_mirror(bpy.types.Menu):
layout.separator()
- layout.operator_context = 'EXEC_AREA'
+ layout.operator_context = 'INVOKE_REGION_WIN'
props = layout.operator("tfm.mirror", text="X Global")
props.constraint_axis = (True, False, False)
@@ -1529,6 +1529,12 @@ class VIEW3D_PT_3dview_properties(bpy.types.Panel):
col.prop(view, "grid_subdivisions", text="Subdivisions")
layout.column().prop(scene, "cursor_location", text="3D Cursor:")
+
+ col = layout.column()
+ col.label(text="Lock to Object:")
+ col.prop(view, "lock_object", text="")
+ if view.lock_object and view.lock_object.type == 'ARMATURE':
+ col.prop_object(view, "lock_bone", view.lock_object.data, "bones", text="")
class VIEW3D_PT_3dview_name(bpy.types.Panel):
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index ac93f75156f..9307d56c1cb 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -656,10 +656,16 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_centre");
RNA_def_property_ui_text(prop, "Lock Object", "3D View center is locked to this object's position");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ prop= RNA_def_property(srna, "lock_bone", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "ob_centre_bone");
+ RNA_def_property_ui_text(prop, "Lock Bone", "3D View center is locked to this bone's position");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
prop= RNA_def_property(srna, "background_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bgpic");
RNA_def_property_ui_text(prop, "Background Image", "Image and settings to display in the 3D View background");