Geometry Nodes: Operators: Support more object types and modes #109526

Merged
Hans Goudey merged 21 commits from HooglyBoogly/blender:node-group-operators-more-types into main 2023-08-04 18:22:52 +02:00
Member

Add support in the UI for the edit mode of curves, mesh, and point
cloud objects. It's possible to control for which mode sand object
types the asset is available with a dropdown in the node header.
To make this per-mode filtering possible, the static asset tree
cache is now unique per context mode.

See #101778


image

image

Add support in the UI for the edit mode of curves, mesh, and point cloud objects. It's possible to control for which mode sand object types the asset is available with a dropdown in the node header. To make this per-mode filtering possible, the static asset tree cache is now unique per context mode. See #101778 --- ![image](/attachments/5c8404dd-fbc0-4ee7-88ed-23d113efdcc3) ![image](/attachments/a133c472-27d0-4b35-9d74-ba023551d121)
Hans Goudey added 1 commit 2023-06-29 19:09:16 +02:00
Add support in the UI for the edit mode of curves, mesh, and point
cloud objects. Asset tags must reflect the object types and modes they
support. For example, a mesh edit mode node group asset should have the
tags `Operator`, `Edit`, and `Mesh`. The full list of tags is:
- `Operator`
- `Edit`
- `Sculpt`
- `Mesh`
- `Curve`
- `Point Cloud`

To make this per-mode filtering possible, the static
asset tree cache is now unique per context mode.
Hans Goudey added 1 commit 2023-06-29 19:13:10 +02:00
Hans Goudey requested review from Dalai Felinto 2023-06-29 19:13:49 +02:00
Hans Goudey requested review from Jacques Lucke 2023-06-29 19:13:49 +02:00
Hans Goudey added this to the 4.0 milestone 2023-06-29 19:13:50 +02:00
Hans Goudey added the
Interest
Geometry Nodes
label 2023-06-29 19:14:49 +02:00
Hans Goudey added this to the Nodes & Physics project 2023-06-29 19:14:56 +02:00
Hans Goudey added 1 commit 2023-07-02 17:31:54 +02:00
Hans Goudey added 2 commits 2023-07-02 19:07:00 +02:00
Hans Goudey changed title from Geometry Nodes: Operators: Support more object types and modes to WIP: Geometry Nodes: Operators: Support more object types and modes 2023-07-04 16:10:59 +02:00
Hans Goudey added 2 commits 2023-07-06 16:47:01 +02:00

I talked to Hans, but for the records:

This is the current state of the patch:

image

However traits is not a concept that should be exposed to the users. Instead we came up with this:

Asset ⌄
⠀⠀Type: (operator, modifier, ...)
⠀⠀Mode: (Edit, Sculpt)
⠀⠀Geometry Type: (Mesh, Curves, ...)

Also, the "Operator" mode should show only Geometry Node groups that have "Operator" type.

I talked to Hans, but for the records: This is the current state of the patch: ![image](/attachments/9c4f70ca-70b1-4739-923d-7ebc0b86cfff) However `traits` is not a concept that should be exposed to the users. Instead we came up with this: ``` Asset ⌄ ⠀⠀Type: (operator, modifier, ...) ⠀⠀Mode: (Edit, Sculpt) ⠀⠀Geometry Type: (Mesh, Curves, ...) ``` ----- Also, the "Operator" mode should show only Geometry Node groups that have "Operator" type.
Author
Member

Also, the "Operator" mode should show only Geometry Node groups that have "Operator" type.

This makes sense to me, in the code it doesn't look simple though. template_ID doesn't have the ability to filter data-blocks with an arbitrary check. So I'd prefer to leave that to a separate PR.

>Also, the "Operator" mode should show only Geometry Node groups that have "Operator" type. This makes sense to me, in the code it doesn't look simple though. `template_ID` doesn't have the ability to filter data-blocks with an arbitrary check. So I'd prefer to leave that to a separate PR.
Hans Goudey added 5 commits 2023-08-02 19:11:50 +02:00
Hans Goudey changed title from WIP: Geometry Nodes: Operators: Support more object types and modes to Geometry Nodes: Operators: Support more object types and modes 2023-08-02 19:14:03 +02:00
Hans Goudey added 2 commits 2023-08-03 16:59:23 +02:00
Hans Goudey added 2 commits 2023-08-03 17:55:35 +02:00
Hans Goudey added 1 commit 2023-08-03 18:12:55 +02:00
Jacques Lucke requested changes 2023-08-03 19:04:19 +02:00
Jacques Lucke left a comment
Member

There is an exception when pressing the new button when Tool is selected.

There is an exception when pressing the new button when `Tool` is selected.
Hans Goudey requested review from Jacques Lucke 2023-08-03 19:09:01 +02:00
Hans Goudey added 1 commit 2023-08-03 19:09:05 +02:00
Member

I get a crash in LazyFunctionForGeometryNode::execute_impl when accessing self_object. Better also check other usages of self_object.

Would be so nice if we could use the operator already before it's in a catalog, but I guess that's out of scope right now?

I get a crash in `LazyFunctionForGeometryNode::execute_impl` when accessing `self_object`. Better also check other usages of `self_object`. Would be so nice if we could use the operator already before it's in a catalog, but I guess that's out of scope right now?
Author
Member

I get a crash in LazyFunctionForGeometryNode::execute_impl when accessing self_object. Better also check other usages of self_object.

Thanks, will do!

Would be so nice if we could use the operator already before it's in a catalog, but I guess that's out of scope right now?

Yeah, last we talked we decided not to do that yet since it's not clear where the operator would be accessed. A "play" button like the text editor has for Python scripts might work in some cases.

> I get a crash in `LazyFunctionForGeometryNode::execute_impl` when accessing `self_object`. Better also check other usages of `self_object`. Thanks, will do! > Would be so nice if we could use the operator already before it's in a catalog, but I guess that's out of scope right now? Yeah, last we talked we decided not to do that yet since it's not clear where the operator would be accessed. A "play" button like the text editor has for Python scripts might work in some cases.
Hans Goudey added 1 commit 2023-08-03 19:57:21 +02:00
Member

Still crashing in the Object Info node. Search for params.self_object()

Still crashing in the `Object Info` node. Search for `params.self_object()`
Hans Goudey added 2 commits 2023-08-04 17:04:36 +02:00
Author
Member

Still crashing in the Object Info node. Search for params.self_object()

Ah, fixed that in main now. Thanks.

> Still crashing in the `Object Info` node. Search for `params.self_object()` Ah, fixed that in main now. Thanks.
Jacques Lucke approved these changes 2023-08-04 17:21:14 +02:00
Dalai Felinto approved these changes 2023-08-04 18:07:47 +02:00
Dalai Felinto left a comment
Owner

Approving as it is. Suggestion of future improvements:

  • Show warning in header if data-block is not an asset (with button to Mark as Asset, or clear instructions).
  • (unrelated) option for Group sockets to be only Value (not field) - just expose the option we use already?
  • Fix need to restart Blender to populate menu (meanwhile document it).
  • Maybe warning on header as well when asset is in no Catalog (thus in no menu?).
  • Tools specific Input options (on its own subpanel?)
    • Hide in Tools (if you brought them in as a modifier, it may make sense to still have it
      there, but hide as tool?)
    • {'REGISTERED'} (so the previous value used is stored).
Approving as it is. Suggestion of future improvements: * Show warning in header if data-block is not an asset (with button to Mark as Asset, or clear instructions). * (unrelated) option for Group sockets to be only Value (not field) - just expose the option we use already? * Fix need to restart Blender to populate menu (meanwhile document it). * Maybe warning on header as well when asset is in no Catalog (thus in no menu?). * Tools specific Input options (on its own subpanel?) * Hide in Tools (if you brought them in as a modifier, it may make sense to still have it there, but hide as tool?) * {'REGISTERED'} (so the previous value used is stored).
Hans Goudey merged commit fd9d22ba57 into main 2023-08-04 18:22:52 +02:00
Hans Goudey deleted branch node-group-operators-more-types 2023-08-04 18:22:54 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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, 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
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
Core
Module
Development Management
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
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 Assignees
3 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#109526
No description provided.