Cycles: support popup widget metadata for OSL shaders #106508
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#106508
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Ubuntu 20.04
Graphics card: Geforce MX230
Blender Version
Broken: 3.5
Short description of error
setting the widget parameter as "popup" in the shader metadata should create a drop-down list in the node UI. This works in Houdini, but in blender instead it's a regular slider
Worked:
Don`t Worked:
a place in the shader code that sets the widget to look like this:
Exact steps for others to reproduce the error
I'm not sure if something like this should work when we don't have an enum socket.
yes, but we have the usual drop-down lists. While there are no enum sockets, why not temporarily replace them with just a GUI element without a socket?
Because it would be a new feature, rather unusual. And it would cease to be a socket.
These enums are still (int) sockets which are not linkable (see usages of
SOCKET_ENUM
and friends).This all could be done I think, e.g.
OSLNode::add_input
would need to be extended to support passing enum values toNodeType::register_input
that it needs to get from the metadata "options".For now though, this is just not implemented and looks like a feature request (rather than a bug).
Would be nice to add this as limitation to the manual though:
https://docs.blender.org/manual/en/3.6/render/shader_nodes/osl.html
@brecht : totally unsure what kind of priority this has (as compared to e.g. adding AOV support to OSL), would raise my hand to volunteer looking into this further if this is to be kept as TODO.
Otherwise, we would have to close this as a feature request though due to the following policy:
@lichtwerk Enum sockets are not currently supported, this is a big topic for the node module and is not being developed yet. I'm not sure it would be easy to add this.
And if just make it a property of the node, which is much simpler, then it would not be a socket to which you can connect something.
Well, it might not be supported as-in exposed to geonodes, but internally
SOCKET_ENUM
is used to letNodeType::register_input
know about a dropdown (in Cycles), there is alsoNODE_SOCKET_API
to have a look at and see how this actually ends up in blender - if we decide to pursue this further. But since this is about Cycles, there is a good chance this could be supported after the script node was compiled and metadata is accessible. To really now, I'd have to spend more time on this though [which I wont do unless there is green light from the module]."popup" widget in OSL as ignoredto Cycles: support "popup" widget in OSLI've marked this as a To Do now. But this is indeed blocked by proper support for enum sockets on the Blender side.
Cycles: support "popup" widget in OSLto Cycles: support popup widget metadata for OSL shaders