path_from_id does not work on subproperties of a custom node #51096
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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 project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#51096
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
Windows 10, 64 bit
Blender Version
Broken: 7cb2974
Short description of error
I want to create a subproperty (Pointer/Collection) in my custom node. Inside I want to declare a property with an update function that somehow knows the parent node.
I found that I could use the
path_from_id
function and do some string manipulation to access the node. Beside that being not a very nice solution, it even does not seem to work.I also tested registering subproperties in a Scene, there the
path_from_id
function works properly. In my custom node I get an error message with"found but does not support path creation"
. I can't really see if this is intended, a bug or just something that is not implemented yet.Exact steps for others to reproduce the error
Here is a little test script that raises the exception:
Changed status to: 'Open'
Added subscriber: @JacquesLucke
Added subscriber: @Sergey
Changed status from 'Open' to: 'Archived'
This is a design limitation: you can never go from current property to parent, it is just unknown. So what happens here is that
path_from_id()
can find property, but can not construct full path to it relative to ID because you don't know where it is coming from.In Blender side we are working this around by providing special path functions to properties, which are iterating over all possible parents and gives path to the parent which actually hold the property. This is crappy, but it is barely used. but because this is stupid,. it is not exposed to Python API.
So thanks for the report, but it's just known design limitation.