godotengine / godot

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

Allow drag and dropping audio effects on an audio bus #17066

Open isaacremnant opened 6 years ago

isaacremnant commented 6 years ago

Godot version: 3

It would be convenient to be able to drag and drop a saved AudioEffect file on top of an audio bus to add the effect to it, see: audioeffect

I haven't found a way to add a saved effect to the bus layout using the editor, so drag and dropping would be the most intuitive way to add this functionality.

akien-mga commented 4 years ago

Makes sense. This should be fairly easy to implement, refer to other editor plugins that support drag and drop to see how it's implemented.

Waranoi commented 3 years ago

I took a shot at this here #42288.

As mentioned in the PR, the effect name in the bus will be empty unless the user explicitly sets the name of the resource before drag and dropping it. I would have not realized that it's because the name of a newly created audio effect resource is empty by default unless I had my debugger available. The user will probably spend a lot of time before realizing why their effect doesn't have a name in their audio bus. Should there maybe be a separate PR to set the name of an audio effect resource to its filename when created? Also changing the name of an audio effect resource doesn't automatically update the bus layout, I don't know what the best solution for that would be.

image image

In hindsight I should have posted this comment before issuing a PR, apologies, it's my first time contributing to a group project. (I went ahead and changed the PR to a draft)