mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
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!!
This commit is contained in:
@@ -1698,6 +1698,20 @@ Array Node::_get_children() const {
|
||||
return arr;
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
void Node::set_import_path(const NodePath& p_import_path) {
|
||||
|
||||
|
||||
data.import_path=p_import_path;
|
||||
}
|
||||
|
||||
NodePath Node::get_import_path() const {
|
||||
|
||||
return data.import_path;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void Node::_bind_methods() {
|
||||
|
||||
@@ -1760,6 +1774,12 @@ void Node::_bind_methods() {
|
||||
ObjectTypeDB::bind_method(_MD("get_viewport"),&Node::get_viewport);
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("queue_free"),&Node::queue_delete);
|
||||
#ifdef TOOLS_ENABLED
|
||||
ObjectTypeDB::bind_method(_MD("_set_import_path","import_path"),&Node::set_import_path);
|
||||
ObjectTypeDB::bind_method(_MD("_get_import_path"),&Node::get_import_path);
|
||||
ADD_PROPERTY( PropertyInfo(Variant::NODE_PATH,"_import_path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_import_path"),_SCS("_get_import_path"));
|
||||
|
||||
#endif
|
||||
|
||||
BIND_CONSTANT( NOTIFICATION_ENTER_SCENE );
|
||||
BIND_CONSTANT( NOTIFICATION_EXIT_SCENE );
|
||||
|
||||
Reference in New Issue
Block a user