-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Create an AudioStreamRandomizer
when dropping several files on an AudioStream
field
#7798
Comments
I doubt we have support for dragging multiple files onto a property in general (even for Array properties), so this will require the inspector to be able to react to multiple files being dragged first. PS: This would also make sense for creating StandardMaterial3D based on the names of textures dragged (albedo, normal, etc). See #2316. |
Trying it in 4.1.1.stable, an export Array[AudioStream] can in fact already have multiple sound files dragged onto it and creates an element for each as expected? The AudioStreamPlayer Stream property and AudioStreamRandomizer however don't support that |
The AudioStreamRandomizer array is a custom one (for the weight slider I assume), bus as @Trotim noted, the regular Array exports already support drag and droping multiple files or nodes already. I think the problem with the custom array is that it lacks the slot/button where you click to open an exported array: The AudioStreamRandomizer only has the "add element" button: I would prefer this proposal solution but if it really can't be accomplished yet, could a simple or temporary one be to add the "multiple drop" code from the regular arrays to the custom "add element" button? Edit: I don't know c++ or much of how the engine source works but I read the audio_stream.cpp file, I thought the "Add element" button was some kind of special _get_property_list button or a custom inspector thing, but it seems it's actually the same exact button from the exported array (I think, not really sure tbh), so my solution would require to modify it, I don't know if that would fall unto another proposal. Maybe there could be a way to export the streams as a regular array and add the weight slider on the AudioStream PropertyList itself? But since it's read only it may not be possible... |
I just stumbled upon this idea today, while making a randomizer with 15 ambient sounds. It was painful, especially with default layout (inspector and filesystem are at the at the opposing corners of the editor). I think it might be doable within |
Describe the project you are working on
stuff
Describe the problem or limitation you are having in your project
AudioStreamRandomisers
's individual streams have to be set one by one:this is hell
Describe the feature / enhancement and how it helps to overcome the problem or limitation
when selecting a bunch of say, wav files, and dragging those on a
AudioStream
field anywhere, it should create anAudioStreamRandomiser
with the streams set automatically.(note: a more general solution to this hellish problem would be allowing dropping several files on any Array field, but this is still valid as creating a resource each time is painful (even more so considering it's basically the only AudioStream you'll create manually more than once or twice in the list))
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
AudioStreamRandomiser
is created and setupIf this enhancement will not be used often, can it be worked around with a few lines of script?
used very often
Is there a reason why this should be core and not an add-on in the asset library?
it's about relieving pain
The text was updated successfully, but these errors were encountered: