Skip to content
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

Expose Options-Drop-Down in Visual Shader CustomNodes #5075

Closed
paddy-exe opened this issue Aug 4, 2022 · 2 comments · Fixed by godotengine/godot#81688
Closed

Expose Options-Drop-Down in Visual Shader CustomNodes #5075

paddy-exe opened this issue Aug 4, 2022 · 2 comments · Fixed by godotengine/godot#81688

Comments

@paddy-exe
Copy link

Describe the project you are working on

Visual Shader Library add-on

Describe the problem or limitation you are having in your project

When writing several noise functions that all have the same inputs but where there could be several options for a single input it's extremely cumbersome to write a new CustomNode for every possible combination.

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

What I invision is that it makes it way easier to use different variations of ShaderFunctions that have the same input and are topic-bundled anyway. These could then be bundled in one Shader CustomNode.

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

The API to get this to work could look similar to the one in visual_shader_nodes.cpp.
The visuals would work like this as well:
image

Blender version:
image
image
image

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

No, since it's a proposal to actually expose this to GDScript and to make it available for add-ons

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

See above

@Chaosus
Copy link
Member

Chaosus commented Sep 14, 2023

Yes, this sounds like a not bad idea. I would propose the new functions like add_drop_down_list_property(name, options, caption_visible)/get_drop_down_list_property(name). I may try to implement them if you wish...

@paddy-exe
Copy link
Author

Yes, this sounds like a not bad idea. I would propose the new functions like add_drop_down_list_property(name, options, caption_visible)/get_drop_down_list_property(name). I may try to implement them if you wish...

That would be awesome if you could give it a go. I would be happy to review/test the PR then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants