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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2011-04-01 17:56:01 +0400
committerTon Roosendaal <ton@blender.org>2011-04-01 17:56:01 +0400
commit00fe87c84bf2d029e006205f078bfe5bf1e3d03e (patch)
tree0696621956c997407e789b94771de7e5daa6ea7a /source
parente725f1cf95763e14e052862c992ec25fa1d0cf3a (diff)
Bugfix #26672
Minor glitch: Add Camera operator showed option "view aligned", but that doesn't work for camera. Is now hidden.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/object/object_add.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index c5fbc41902f..144c80465df 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -172,6 +172,8 @@ float ED_object_new_primitive_matrix(bContext *C, Object *obedit, float *loc, fl
void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
{
PropertyRNA *prop;
+
+ /* note: this property gets hidden for add-camera operator */
RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view.");
if(do_editmode) {
@@ -478,6 +480,8 @@ static int object_camera_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_camera_add(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name= "Add Camera";
ot->description = "Add a camera object to the scene";
@@ -491,6 +495,11 @@ void OBJECT_OT_camera_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
+
+ /* hide this for cameras, default */
+ prop= RNA_struct_type_find_property(ot->srna, "view_align");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+
}