Set object unglobal

When will we have set object unglobal?
I tried looking for it in json :stuck_out_tongue:

Old discussion about this here

Copy/paste from the discussion :

I was wondering why it is not possible to change a global object / global group to normal ?
Is it just too much of a missing function or a deeper problem?

Main reason is that moving an object from a classical scene object to a global object is easy and without risk: remove the object from the scene and add it to the project (global objects). The scene will still work as before (because if an object is not found in the list of scene objects, it is looked in the global objects).

Doing the reverse is a bit more complicated: what do you do, should you remove the global object and put it back in the scene objects? In this case, if another scene is using it, it is now “broken” (there are instances and events using a non existing object, not great). In this case, maybe we should put back a copy of the object into every scene (not as global, just as a normal object). But this is also a bit “extreme”, because now all scenes are having a this same object (if you did this by error, you now have to fix all your scenes to remove the object).

What do you think? Do you have an idea of what would be the proper behavior?

This would be a nice feature, but I have noticed that the program used to (I think it has since been changed?), leave a duplicate regular object whenever I set one to global. It was really time consuming to clean up because if I did not want the regular - I call it “local” - scene object and deleted it, all of my events would go with it even though a global object existed.

I had to first rename it to something different, make sure to fix the events so that it pointed to the global object, and then delete the local one in order to preserve my events.

But I can see the dilemma behind making it possible to reverse setting object global.

On a sort of related note, I would prefer to have control over whether events are deleted or not when objects are Vs. GDevelop assuming that they aren’t needed anymore.

Sometimes I just want to change the object type (i.e., sprite to tiled sprite or vice versa or now, text to bbtext), but the name.and related events are fine. To prevent the events being deleted, I have to create a new object of the desired type, name it something else, replace the object in my events, then delete the old object.

well at least we can have image file manager in the sidebar