godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Create a `PanoramaSkyMaterial` automatically when dropping a texture on a `sky material` field of a `Sky` #7685

Open mieldepoche opened 1 year ago

mieldepoche commented 1 year ago

Describe the project you are working on

stuff

Describe the problem or limitation you are having in your project

dropping a texture on a Material slot dropping an hdri on the sky_material slot of a Sky

as you can see it's inconsistent: you can't quickly create a PanoramaSkyMaterial when dropping a texture in there.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

When dropping a texture in this particular slot, create a new PanoramaSkyMaterial with the texture assigned to it.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

drag a file on a field and a material is created automatically

If this enhancement will not be used often, can it be worked around with a few lines of script?

While used less often than its regular material variant, it's a matter of ux and consistency.

Is there a reason why this should be core and not an add-on in the asset library?

a very similar feature is core already, and it can't be an addon.

Calinou commented 1 year ago

This should be feasible using bespoke inspector code, like we already have for Font, Sprite2D and StandardMaterial3D (when you drag a texture onto a material property, and it creates a material with the albedo texture set).