diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2011-07-23 22:03:01 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2011-07-23 22:03:01 +0400 |
commit | 742225d9b4c3888c1cfd155b575420abf0cf7869 (patch) | |
tree | d21d4d8d46e1e35120370628b768c0a2d3b05a21 /source/blender/editors/object/object_edit.c | |
parent | f4a30e473b23425c13a755854cf7b22c22cca259 (diff) |
bugfix: [#28026] Copy Game Property broken
not exactly a bug, but the option to copy individual properties was not working from the SPACE menu.
I believe this was happening because we are using dynamic enums.
This commit makes the "merge" option to be the default one. So if you call it from the SPACE menu it will be the one used.
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 29a740affc5..395705dc029 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -2162,16 +2162,20 @@ static int game_property_copy_exec(bContext *C, wmOperator *op) } CTX_DATA_END; } } - else if (ELEM(type, COPY_PROPERTIES_REPLACE, COPY_PROPERTIES_MERGE)) { + + else { CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) { if (ob != ob_iter) { if (ob->data != ob_iter->data){ - if (type == 2) {/* merge */ + if (type == COPY_PROPERTIES_REPLACE) + copy_properties( &ob_iter->prop, &ob->prop ); + + /* merge - the default when calling with no argument */ + else { for(prop = ob->prop.first; prop; prop= prop->next ) { set_ob_property(ob_iter, prop); } - } else /* replace */ - copy_properties( &ob_iter->prop, &ob->prop ); + } } } } |