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>2013-01-28 10:06:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-28 10:06:55 +0400
commit388a364bc90480d32a04968f4a2d09d99840a131 (patch)
tree7a24abc764afb056bab032ae3bed33c25688c91c /source/blender/editors/space_logic
parentc37bc8fa76d29f68008c1c299e026a59450b3c26 (diff)
fix annoyance noticed at the global-game-jam, adding controllers would remember previous name. Would add 'And' controllers and name them 'Python1' for eg.
Diffstat (limited to 'source/blender/editors/space_logic')
-rw-r--r--source/blender/editors/space_logic/logic_ops.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index f28757bb431..47029d800c0 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -330,8 +330,10 @@ static void LOGIC_OT_sensor_add(wmOperatorType *ot)
/* properties */
ot->prop = prop = RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add");
RNA_def_enum_funcs(prop, rna_Sensor_type_itemf);
- RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Sensor to add");
- RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Sensor to");
+ prop = RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Sensor to add");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Sensor to");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/* ************* Add/Remove Controller Operator ************* */
@@ -433,6 +435,8 @@ static int controller_add_exec(bContext *C, wmOperator *op)
static void LOGIC_OT_controller_add(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Add Controller";
ot->description = "Add a controller to the active object";
@@ -448,8 +452,10 @@ static void LOGIC_OT_controller_add(wmOperatorType *ot)
/* properties */
ot->prop = RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add");
- RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Controller to add");
- RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Controller to");
+ prop = RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Controller to add");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Controller to");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/* ************* Add/Remove Actuator Operator ************* */
@@ -551,8 +557,10 @@ static void LOGIC_OT_actuator_add(wmOperatorType *ot)
/* properties */
ot->prop = prop = RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add");
RNA_def_enum_funcs(prop, rna_Actuator_type_itemf);
- RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Actuator to add");
- RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Actuator to");
+ prop = RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Actuator to add");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Actuator to");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/* ************* Move Logic Bricks Operator ************* */