UI Button Placeholder not behaving as expected #124187
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
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 & 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
Asset System
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#124187
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: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 555.99
Blender Version
Broken: version: 4.2.0 Beta, branch: blender-v4.2-release, commit date: 2024-06-30 21:17, hash:
549024b1cc34
Worked: N/A
Short description of error
For
layout.prop
whenplaceholder=""
no placeholder is shown andNone
is not allowed to be passed.Use Case
I suppose this isn't a bug as maybe it is the expected behavior as coded, however, this does limit its use and is unlike some of the other keywords' behavior. Often times I want to show a node's inputs in the viewport. So instead of writing out the same code over and over I'll make a function:
Now for
placeholder
if I pass""
as the placeholder no placeholder shows up. And if I passNone
it throws an error:The text keyword works this way (
""
results in no label butNone
results in default behavior) and I would have assumed placeholder would too.Exact steps for others to reproduce the error
Open up the attached blend file.
Run the script. Look for the Test panel in the Debug tab in the 3D Viewport.
You'll notice only 3 of the 4 search inputs appear with the 4th throwing errors.
Hi, thanks for the report. Can confirm, checking
Quick workaround:
But passing none/null will draw id name in placeholder ("Object" in your case), see:
@Harley hi, do you think passing "None" should be supported here?
That was the intention with this. I just didn't realize that PROP_NEVER_NULL would be set and stop this from working from Python.
So yes, this is a bug and your workaround is the fix.
Thanks. Then I think I'll make PR tomorrow :)