-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to create a new inherited scene from code #90057
base: master
Are you sure you want to change the base?
Conversation
0f2da51
to
21a4264
Compare
To fix the compilation error, you need to add compatibility method bindings in a new editor_interface.compat.inc file. |
21a4264
to
2097788
Compare
c5f7f93
to
52c716a
Compare
52c716a
to
f387a74
Compare
open_scene_from_path
472b636
to
58007d6
Compare
58007d6
to
124e31d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, it works. I managed to make a button that creates an inherited scene from gltf at the same path like so:
var path = EditorInterface.get_selected_paths()[0]
var new_path = path.get_basename() + ".tscn"
var main_scene_path = EditorInterface.get_edited_scene_root().scene_file_path
EditorInterface.open_scene_from_path(path, true)
EditorInterface.save_scene_as.call_deferred(new_path, false)
EditorInterface.open_scene_from_path.call_deferred(main_scene_path)
fd87766
to
77a57cb
Compare
77a57cb
to
00275ca
Compare
00275ca
to
0f8ccef
Compare
0f8ccef
to
8535a0f
Compare
8535a0f
to
bc395fa
Compare
Implements: #3907
Supersedes: #64217
This is done by adding an inherit parameter to
open_scene_from_path()
This will allow plugins to be able to create new inherited scenes, which can enhance user workflows.