Geometry Nodes: support panels in geometry nodes modifier #116472

Merged
Jacques Lucke merged 10 commits from JacquesLucke/blender:nodes-modifier-panels into main 2023-12-23 16:33:25 +01:00
Member

This builds on top of f824476bd5 to show panels in the geometry nodes modifier. It also changes the two existing panels to use the new layout panels.

The open-close state of the panels is stored in the modifier itself. It contains a mapping from panel id to the corresponding state flag.

image

This builds on top of f824476bd5f81f98f9b969661e8e9ac4d50a5521 to show panels in the geometry nodes modifier. It also changes the two existing panels to use the new layout panels. The open-close state of the panels is stored in the modifier itself. It contains a mapping from panel id to the corresponding state flag. ![image](/attachments/80527de4-aa88-4eda-9c7b-771a0b9ff98d)
103 KiB
Jacques Lucke added 3 commits 2023-12-22 18:53:32 +01:00
Jacques Lucke added 2 commits 2023-12-22 22:15:55 +01:00
Jacques Lucke added 1 commit 2023-12-22 22:18:40 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
20b685b700
inverted closed by default flag
Jacques Lucke changed title from WIP: Geometry Nodes: support panels in geometry nodes modifier to Geometry Nodes: support panels in geometry nodes modifier 2023-12-22 22:21:26 +01:00
Jacques Lucke requested review from Hans Goudey 2023-12-22 22:21:36 +01:00
Author
Member

@blender-bot build

@blender-bot build
Hans Goudey approved these changes 2023-12-23 15:38:23 +01:00
Hans Goudey left a comment
Member

Guess the interface doesn't allow nested panels now, and doesn't allow sockets after panels. Nice that the code supports it though. Also noticed that adding a panel causes a reevaluation. All out of scope of this PR though.

Things look pretty straightforward here, and works great in my tests.

Guess the interface doesn't allow nested panels now, and doesn't allow sockets after panels. Nice that the code supports it though. Also noticed that adding a panel causes a reevaluation. All out of scope of this PR though. Things look pretty straightforward here, and works great in my tests.
@ -123,0 +123,4 @@
/**
* Bits that can be used for open-states of layout panels in the modifier. This can replace
* `ui_expand_flag` once all modifiers use layout panels. Currently, trying to reuse the same
* flags easily leads to issues because of the way `ui_expand_flag` is used.
Member

This reads a bit like "because of the way it is" :P Would be nice to rephrase the last sentence to be a bit more specific

This reads a bit like "because of the way it is" :P Would be nice to rephrase the last sentence to be a bit more specific
JacquesLucke marked this conversation as resolved
@ -1835,3 +1879,3 @@
}
static void panel_draw(const bContext *C, Panel *panel)
static NodesModifierPanel *find_panel_by_id(const NodesModifierData &nmd, const int id)
Member

Return a const pointer or make the nmd argument non-const

Return a const pointer or make the `nmd` argument non-const
JacquesLucke marked this conversation as resolved
@ -1899,1 +1901,3 @@
uiLayoutSetPropDecorate(layout, true);
for (const bNodeTreeInterfaceItem *item : interface_panel.items()) {
if (item->item_type == NODE_INTERFACE_PANEL) {
const bNodeTreeInterfacePanel &sub_interface_panel =
Member

Using const auto & after these reinterpret casts looks a bit nicer

Using `const auto &` after these reinterpret casts looks a bit nicer
JacquesLucke marked this conversation as resolved
Jacques Lucke added 4 commits 2023-12-23 16:32:19 +01:00
Jacques Lucke merged commit ad7a5abb2d into main 2023-12-23 16:33:25 +01:00
Jacques Lucke deleted branch nodes-modifier-panels 2023-12-23 16:33:27 +01:00
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 project
No Assignees
2 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#116472
No description provided.