Python API: Geometry Nodes object and collection inputs appear disabled in custom panel #89876
Labels
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 project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#89876
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.89
Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-07-15 12:22, hash:
468d59e496
Worked: -
Short description of error
Geometry Nodes object and collection inputs appear disabled when they are shown in a custom panel. Other types of properties do work. The properties can be accessed as follows: layout.prop(modifier, '["Input_2"]').
Exact steps for others to reproduce the error
Based on the attached file:
geometry_nodes_object_and_collection_inputs_disabled_bug.blend
Added subscriber: @Symstract
Added subscriber: @Stefakapapy
This is really an annoying problem. Please fix it.
Thank you for reporting
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Confirmed'
Probably has the same roots as #88655 (PyAPI: template_modifiers doesn't work in the viewport)
Added subscriber: @HooglyBoogly
I'm not sure about that conclusion. Here's my guess:
uiItemPointerR
(prop_search
in Python) to avoid this problemI remember that last part from investigating this when writing the code to display them in the modifier before, but I didn't actually see it when stepping through the code this time. (It's easy to miss though).
I was hoping the IDProperty UI data refactor in D9697 might give us a better way to tell the UI what ID type to show in search lists. We'll see, not sure yet.
Added subscriber: @JacquesLucke
Just to make more explicit what Hans already said. This problem can be worked around in Python by using
prop_search
. More specificallylayout.prop_search(mod, f'["{prop_id}"]', bpy.data, "collections", text=name)
. Obviously"collections"
should be repaced with"objects"
for object sockets.@JacquesLucke Thanks for the workaround!
Normally I'd close this, since I think in this case there is no real bug, all of the involved code is working as expected. But keeping this around as a known issue might help in case someone else runs into this.
We were discussing changing the way geometry nodes inputs are stored. If we do that, there's a chance there could be an API for drawing the input.
If another developer would prefer to close this issue, that's okay for me.