diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-10-02 18:08:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-10-02 18:08:09 +0400 |
commit | a634d445106d351a247ddf6c97b07d002cfceaa4 (patch) | |
tree | f77954a2eed2f8b5761b823f3b28211dac4be279 /source/blender/editors/object/object_edit.c | |
parent | 8d309f8500528521078b5f7100d2ce486f1431a3 (diff) |
Fix #24103: copy logic bricks to objects with the same data didn't work.
Don't know why this check was here, it wasn't there in 2.49 and it's not
necessary.
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 78404959dff..b7f05a2e332 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -2196,29 +2196,28 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) { if(ob != ob_iter) { - if (ob->data != ob_iter->data){ - /* first: free all logic */ - free_sensors(&ob_iter->sensors); - unlink_controllers(&ob_iter->controllers); - free_controllers(&ob_iter->controllers); - unlink_actuators(&ob_iter->actuators); - free_actuators(&ob_iter->actuators); - - /* now copy it, this also works without logicbricks! */ - clear_sca_new_poins_ob(ob); - copy_sensors(&ob_iter->sensors, &ob->sensors); - copy_controllers(&ob_iter->controllers, &ob->controllers); - copy_actuators(&ob_iter->actuators, &ob->actuators); - set_sca_new_poins_ob(ob_iter); - - /* some menu settings */ - ob_iter->scavisflag= ob->scavisflag; - ob_iter->scaflag= ob->scaflag; - - /* set the initial state */ - ob_iter->state= ob->state; - ob_iter->init_state= ob->init_state; - } + /* first: free all logic */ + free_sensors(&ob_iter->sensors); + unlink_controllers(&ob_iter->controllers); + free_controllers(&ob_iter->controllers); + unlink_actuators(&ob_iter->actuators); + free_actuators(&ob_iter->actuators); + + /* now copy it, this also works without logicbricks! */ + clear_sca_new_poins_ob(ob); + copy_sensors(&ob_iter->sensors, &ob->sensors); + copy_controllers(&ob_iter->controllers, &ob->controllers); + copy_actuators(&ob_iter->actuators, &ob->actuators); + set_sca_new_poins_ob(ob_iter); + + /* some menu settings */ + ob_iter->scavisflag= ob->scavisflag; + ob_iter->scaflag= ob->scaflag; + + /* set the initial state */ + ob_iter->state= ob->state; + ob_iter->init_state= ob->init_state; + if(ob_iter->totcol==ob->totcol) { ob_iter->actcol= ob->actcol; WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter); |