diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-05-19 13:40:45 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-05-19 13:40:45 +0400 |
commit | a7a9862cc928049bee3cf10685759144b1cc67c2 (patch) | |
tree | 9de7e53bf006171383eb3dd0a88561191c11032e /source/blender/editors/space_logic/logic_ops.c | |
parent | 2d343d0774b2ff53894d17cb791ef7efc4332a93 (diff) |
Logic UI and Operators: adjusts on Layout + copy properties operator + fix on copy logic bricks operator (and moved to OBJECT_OT)
* adjusts on Layout:
- in order to avoid much changes when copying Logics, it's nice to have the logic s/c/a always displaying even though it's not valid (e.g. edit mesh used from a camera object).
Now a message shows in the s/c/a alerting to the problem.
* logic operators under OBJECT_OT - copy properties and logics
Matt, is it possible to have the object game properties listed as a submenu from "Copy Properties" ?
So from the "Copy Game Property" menu we would have three options:
"Copy a property" -> (submenu) prop1, prop2, prop3
"Replace all Properties"
"Merge all Properties"
For the current task list in Logic Editor:
http://www.pasteall.org/13245
Diffstat (limited to 'source/blender/editors/space_logic/logic_ops.c')
-rw-r--r-- | source/blender/editors/space_logic/logic_ops.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index 347b586f49c..632331459cb 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -533,48 +533,6 @@ void LOGIC_OT_actuator_add(wmOperatorType *ot) prop= RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Actuator to add"); } -/* Copy Routines */ - -static int logicbricks_copy_exec(bContext *C, wmOperator *op) -{ - Object *ob=ED_object_active_context(C); - - CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) { - if(ob != ob_iter) { - if (ob->data != ob_iter->data){ - copy_sensors(&ob_iter->sensors, &ob->sensors); - copy_controllers(&ob_iter->controllers, &ob->controllers); - copy_actuators(&ob_iter->actuators, &ob->actuators); - } - - if(ob_iter->totcol==ob->totcol) { - ob_iter->actcol= ob->actcol; - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter); - } - } - } - CTX_DATA_END; - - WM_event_add_notifier(C, NC_LOGIC, NULL); - - return OPERATOR_FINISHED; -} - -void LOGIC_OT_bricks_copy(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Copy Logic Bricks to Selected"; - ot->description = "Copy logic bricks to other selected objects."; - ot->idname= "LOGIC_OT_bricks_copy"; - - /* api callbacks */ - ot->exec= logicbricks_copy_exec; - ot->poll= ED_operator_object_active_editable; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - void ED_operatortypes_logic(void) { WM_operatortype_append(LOGIC_OT_sensor_remove); @@ -583,5 +541,4 @@ void ED_operatortypes_logic(void) WM_operatortype_append(LOGIC_OT_controller_add); WM_operatortype_append(LOGIC_OT_actuator_remove); WM_operatortype_append(LOGIC_OT_actuator_add); - WM_operatortype_append(LOGIC_OT_bricks_copy); } |