浏览代码

Forgot about keeping value tracks.

Theo Hallenius 11 年之前
父节点
当前提交
0dd29d0512
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      tools/editor/io_plugins/editor_scene_import_plugin.cpp

+ 4 - 5
tools/editor/io_plugins/editor_scene_import_plugin.cpp

@@ -1571,14 +1571,13 @@ void EditorSceneImportPlugin::_merge_existing_node(Node *p_node,Node *p_imported
 							}
 						}
 
-						// Append function callbacks
+						// Append function callbacks and values
 						for (int x = 0; x < found->get_track_count(); x++) {
-							if (found->track_get_type(x) == Animation::TYPE_METHOD)
-								candidate->add_track(Animation::TYPE_METHOD, candidate->get_track_count());
+							if (found->track_get_type(x) == Animation::TYPE_METHOD || found->track_get_type(x) == Animation::TYPE_VALUE)
+								candidate->add_track(found->track_get_type(x), candidate->get_track_count());
 
-							for (int k = 0; k < found->track_get_key_count(x); k++) {
+							for (int k = 0; k < found->track_get_key_count(x); k++)
 								candidate->track_insert_key(x, found->track_get_key_time(x, k), found->track_get_key_value(x, k), found->track_get_key_transition(x, k));
-							}
 						}
 					}