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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-12 00:14:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-12 00:14:15 +0400
commita2a8cc87985ebbae73e8ed94dcfc2b650c4e746d (patch)
treee0f937c064e3652dbb491a2df20f244ba21e4f68 /source/blender/editors
parent45e3b0c44e29dd15093dc1d4f738e8b2e7850a0e (diff)
use skip-save for ED_object_add_generic_props(), not essential - but it was annoying to have 'Reset' move objects to 0,0,0
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_add.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index a5faccd12f9..196362d9fcd 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -189,19 +189,24 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
PropertyRNA *prop;
/* note: this property gets hidden for add-camera operator */
- prop= RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view");
+ prop = RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view");
RNA_def_property_update_runtime(prop, view_align_update);
if(do_editmode) {
- prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode", "Enter editmode when adding this object");
- RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop = RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode",
+ "Enter editmode when adding this object");
+ RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE);
}
- RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location for the newly added object", -FLT_MAX, FLT_MAX);
- RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f);
+ prop = RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location",
+ "Location for the newly added object", -FLT_MAX, FLT_MAX);
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation",
+ "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f);
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", "");
- RNA_def_property_flag(prop, PROP_HIDDEN);
+ RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE);
}
static void object_add_generic_invoke_options(bContext *C, wmOperator *op)