WIP: Geometry Nodes Rna Input Node #106989

Closed
DorianB wants to merge 1 commits from dodododorian/blender:rna_input_node into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
First-time contributor

The purpose of this node is to provide users with a straightforward and versatile method for accessing any blender property from a geometry node input, utilizing a user-friendly interface similar to the "single property" option available in the driver editor. ( It's worth noting that this functionality can be achieved through the use of drivers, but this approach is generally considered to be much less intuitive for users, especially for a mundane task such as as fetching any properties value.)

Status: On Halt, Awaiting Design Approval

Currently, the development team has expressed a preference for implementing more specialized input properties instead of the "universal/flexible" method proposed in this patch. At present, the project remains incomplete, with only the interface having been roughly implemented. In the event that the developers reconsider their stance on the matter, I would be pleased to continue my efforts on this project.

Remaining Work:

  • Finish interface
    • Define our new id_ptr id_type properties update functions in rna_nodetree.c in order to match the driver implementation of rna_fcurve.c.
    • Fix uiTemplateAnyID left spacing issue ( this UI template text behavior does not behave properly ).
    • Define the uiLayoutSetRedAlert conditions if the rna_path or id_ptr is incorrect.
    • Explore alternative interface? Altho i believe it is best to match with existing driver drawing template.
  • Value Fetch Implementation
    • Implement value fetch behavior based on existing DriverVar implementation
    • Ensure depsgraph behavior ( developers expressed their concern over receiving the proper update signals ).
  • Code Cleanup
The purpose of this node is to provide users with a straightforward and versatile method for accessing any blender property from a geometry node input, utilizing a user-friendly interface similar to the "_single property_" option available in the driver editor. ( It's worth noting that this functionality can be achieved through the use of drivers, but this approach is generally considered to be much less intuitive for users, especially for a mundane task such as as fetching any properties value.) ### <u>Status</u>: On Halt, Awaiting Design Approval Currently, the development team has expressed a preference for implementing more specialized input properties instead of the "universal/flexible" method proposed in this patch. **At present, the project remains incomplete**, with only the interface having been *roughly* implemented. In the event that the developers reconsider their stance on the matter, I would be pleased to continue my efforts on this project. ### Remaining Work: - [ ] Finish interface - [ ] Define our new `id_ptr` `id_type` properties update functions in `rna_nodetree.c` in order to match the driver implementation of `rna_fcurve.c`. - [ ] Fix `uiTemplateAnyID` left spacing issue ( this UI template text behavior does not behave properly ). - [ ] Define the `uiLayoutSetRedAlert` conditions if the `rna_path` or `id_ptr` is incorrect. - [ ] Explore alternative interface? Altho i believe it is best to match with existing driver drawing template. - [ ] Value Fetch Implementation - [ ] Implement value fetch behavior based on existing `DriverVar` implementation - [ ] Ensure depsgraph behavior ( developers expressed their concern over receiving the proper update signals ). - [ ] Code Cleanup
DorianB added 1 commit 2023-04-15 20:04:19 +02:00
DorianB reviewed 2023-04-15 20:17:32 +02:00
@ -4543,1 +4543,4 @@
//functions related to NodeinputRna id property
static int rna_NodeInputRna_id_editable(PointerRNA *ptr, const char **UNUSED(r_info))
Author
First-time contributor

TODO: Get these functions working properly like the DriverVar properties from rna_fcurve.c

TODO: Get these functions working properly like the `DriverVar` properties from `rna_fcurve.c`
DorianB requested review from Hans Goudey 2023-04-15 20:20:19 +02:00
Author
First-time contributor

Dear Hans, Developers, I'm available to continue working on this patch if the development team changes their minds on the subject, this idea seems to be well received by the users.

Alternatively:

  • I could implement my python API node as an official addon shipped with blender
  • I could work on designs for a series of more "specific" input nodes as expressed. Nodes such as:
    • "custom props input node" for Object and Scene type
    • "scene information input node" Containing information such as gravity vector, & else..
    • "camera information input node" Such as proposed here
    • Ect.. (they might be a lot of other needs we do not know about)
Dear Hans, Developers, I'm available to continue working on this patch if the development team changes their minds on the subject, this idea seems to be well received by the users. Alternatively: - I could implement my [python API node](https://devtalk.blender.org/t/extra-nodes-for-geometrynodes/20942) as an official addon shipped with blender - I could work on designs for a series of more "specific" input nodes as expressed. Nodes such as: - "_custom props input node_" for Object and Scene type - "_scene information input node_" Containing information such as gravity vector, & else.. - "camera information input node" Such as proposed [here](https://devtalk.blender.org/t/extra-nodes-for-geometrynodes/20942) - Ect.. (they might be a lot of other needs we do not know about)
Iliya Katushenock added this to the Nodes & Physics project 2023-04-15 20:36:08 +02:00
Iliya Katushenock added the
Interest
Geometry Nodes
label 2023-04-15 20:36:13 +02:00
First-time contributor

As an artist who uses geometry nodes quite heavily, both professionally and for my own personal projects, this is something that has come up repeatedly for me. For example, one of my projects at work currently relies on a driver to read the name of an object's mesh, extract an integer value from it because a driver can't return a string, and store it as an attribute, just so I can reference that value from another object, a hacky workaround necessitated by the particular constraints of my application. This node would simplify that process dramatically.
While drivers technically allow access to many such properties, there are significant limitations on what types of data they can return. Further, they often require scripts to be enabled, something that the user must do every time the file is opened unless they want to take the security risks of enabling all scripts across the entirety of Blender.
Frankly, while more specialized input nodes would be quite useful, and I certainly would not say anything to discourage their development, the idea of there needing to be (and us having to wait for) a dedicated node for every obscure property an artist might want to reference seems impractical. This node provides an excellent tool for advance users to access practically any property they might desire, and in no way precludes the development of more specialized nodes in the future.

As an artist who uses geometry nodes quite heavily, both professionally and for my own personal projects, this is something that has come up repeatedly for me. For example, one of my projects at work currently relies on a driver to read the name of an object's mesh, extract an integer value from it because a driver can't return a string, and store it as an attribute, just so I can reference that value from another object, a hacky workaround necessitated by the particular constraints of my application. This node would simplify that process dramatically. While drivers technically allow access to many such properties, there are significant limitations on what types of data they can return. Further, they often require scripts to be enabled, something that the user must do every time the file is opened unless they want to take the security risks of enabling all scripts across the entirety of Blender. Frankly, while more specialized input nodes would be quite useful, and I certainly would not say anything to discourage their development, the idea of there needing to be (and us having to wait for) a dedicated node for every obscure property an artist might want to reference seems impractical. This node provides an excellent tool for advance users to access practically any property they might desire, and in no way precludes the development of more specialized nodes in the future.
Author
First-time contributor

For example, one of my projects at work currently relies on a driver to read the name of an object's mesh, extract an integer value from it because a driver can't return a string

@AgentA1cr This patch goal is to return float values, as it's imitating the existing DriverVarbehavior. Perfect solution for your is this plugin-node python API node that i would be happy to rework in order to be integreated in blender builtin plugins

> For example, one of my projects at work currently relies on a driver to read the name of an object's mesh, extract an integer value from it because a driver can't return a string @AgentA1cr This patch goal is to return float values, as it's imitating the existing DriverVarbehavior. Perfect solution for your is this [plugin-node python API node ](https://devtalk.blender.org/t/extra-nodes-for-geometrynodes/20942) that i would be happy to rework in order to be integreated in blender builtin plugins
Member

I'm going to close this PR, since the topic needs more design before we start working on the code. Thanks for the contribution.

I'm going to close this PR, since the topic needs more design before we start working on the code. Thanks for the contribution.
Hans Goudey closed this pull request 2023-10-31 10:51:54 +01:00
Member
@Erindale

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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 Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#106989
No description provided.