diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-06-19 02:23:03 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-06-19 02:23:03 -0300 |
commit | e086bccd63e64b8d3bd2b6b5ce000ef8abd71584 (patch) | |
tree | d2923624c8d79c1ff27dce9da26d6e9c6f0bc906 /tools/editor/editor_node.cpp | |
parent | ddc0e7fd3bc00afa33432ed594038dbb80c7fea3 (diff) |
Import 3D Scene Improvements
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-If re-importing from the "dependency changed" dialog, edited scene will keep the local changes.
-Imported scene will keep track of changes in the source asset
-Geometry changes in source geometry or nodes with a different transform will be updated.
-Materials will be kept if changed locally.
-New nodes added will be kept
-If nodes were reparented or renamed, they will still keep track
-Deleted notes will be restored, use the -noimp option to avoid this.
-In general, you can trust that if you do local modifications to the imported scene, they will not be erased after re-import.
-Erasing your changes is done by re-importing from the "Re-Import" menu, re-opening the "Import 3D Scene" dialog. This wil re-import fresh.
Overall, This should allow you to work on a scene and see changes made to 3D assets in real-time.
So Please test!!
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r-- | tools/editor/editor_node.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 27a5ddbeaf..afd5ee66c5 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -3046,6 +3046,33 @@ void EditorNode::_load_error_notify(void* p_ud,const String& p_text) { } + +bool EditorNode::_find_scene_in_use(Node* p_node,const String& p_path) const { + + if (p_node->get_filename()==p_path) { + return true; + } + + for(int i=0;i<p_node->get_child_count();i++) { + + if (_find_scene_in_use(p_node->get_child(i),p_path)) { + return true; + } + } + + return false; +} + + +bool EditorNode::is_scene_in_use(const String& p_path) { + + Node *es = get_edited_scene(); + if (es) + return _find_scene_in_use(es,p_path); + return false; + +} + void EditorNode::register_editor_types() { ObjectTypeDB::register_type<EditorPlugin>(); @@ -3212,6 +3239,7 @@ Error EditorNode::export_platform(const String& p_platform, const String& p_path } + EditorNode::EditorNode() { EditorHelp::generate_doc(); //before any editor classes are crated |