godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.44k stars 20.25k forks source link

Ability to change node type of inherited scene #6215

Closed kubecz3k closed 6 years ago

kubecz3k commented 8 years ago

Operating system or device - Godot version:

Issue description (what happened, and what was expected): I think it would make sense if we could change node type of base scene, just like we can with regular nodes. For example I quite often have base scene which is a Spatial and I often need to inherit it and make it a Body. Currently this is not possible and every workaround for this problem have it's own disadvantages.
I think it would be great if instanced scenes could also benefit from this change and also have the ability to change it's base node type

Steps to reproduce:

Link to minimal example project (optional but very welcome):

leonkrause commented 8 years ago

This would be great for imported scenes

kubecz3k commented 8 years ago

@eska014 yeah, inherited scenes and instanced ones in edit mode, they already behaves quite similar so I think it would be good idea to allow change base node type of instanced scenes as well

leonkrause commented 8 years ago

Instanced scenes may be interesting as well, but I'm thinking of scenes imported from e.g. Collada files or an AssetLib import-plugin.

The Collada importer currently offers setting the scene root node type during import. It would be easier to always use Spatial, then let users just override the scene root type when inheriting the imported scene (for other import plugins too, with Node2D root or whatever works)

Piet-G commented 6 years ago

This is currently possible in master for both inhereted and instanced scenes.

akien-mga commented 6 years ago

Closing as fixed.

jabcross commented 5 years ago

Still happening to me in commit 1253b9c038277aebfb5a4cc11685823f2331a26b.

You can ChangeType an inherited node, it does change in the interface and allow you to save. However, after closing and opening the scene again, the old version of the node comes back.

In a related issue, in the context menu Rename Node does not create an error popup like Delete Node does.

akien-mga commented 5 years ago

Please open another bug report, this 2 year old issue has been fixed. If something doesn't work in the new feature, it's highly unlikely to be related to the 2 year old request for it.