[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43310] trunk/blender/source/blender/ editors/object/object_add.c: use skip-save for ED_object_add_generic_props( ), not essential - but it was annoying to have 'Reset' move objects to 0, 0,
Campbell Barton
ideasman42 at gmail.com
Wed Jan 11 21:14:19 CET 2012
Revision: 43310
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43310
Author: campbellbarton
Date: 2012-01-11 20:14:15 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
use skip-save for ED_object_add_generic_props(), not essential - but it was annoying to have 'Reset' move objects to 0,0,0
Modified Paths:
--------------
trunk/blender/source/blender/editors/object/object_add.c
Modified: trunk/blender/source/blender/editors/object/object_add.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_add.c 2012-01-11 20:03:41 UTC (rev 43309)
+++ trunk/blender/source/blender/editors/object/object_add.c 2012-01-11 20:14:15 UTC (rev 43310)
@@ -189,19 +189,24 @@
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)
More information about the Bf-blender-cvs
mailing list