Assets: Implement viewport drag and drop for geometry nodes #104430

Merged
Hans Goudey merged 5 commits from HooglyBoogly/blender:drag-drop-geometry-nodes-asset into main 2023-02-09 16:04:16 +01:00
Member

Currently there's no way to assign a geometry node group from the asset
browser to an object as a modifier without first appending/linking it
manually. This patch adds a drag and drop operator that adds a new
modifier and assigns the dragged tree.

Currently there's no way to assign a geometry node group from the asset browser to an object as a modifier without first appending/linking it manually. This patch adds a drag and drop operator that adds a new modifier and assigns the dragged tree.
Hans Goudey added 1 commit 2023-02-07 20:00:03 +01:00
4411d3eeac Assets: Implement viewport drag and drop for geometry nodes
Currently there's no way to assign a geometry node group from the asset
browser to an object as a modifier without first appending/linking it
manually. This patch adds a drag and drop operator that adds a new
modifier and assigns the dragged tree.
Hans Goudey requested review from Julian Eisel 2023-02-07 20:00:46 +01:00
Hans Goudey added 1 commit 2023-02-09 03:53:43 +01:00
Julian Eisel approved these changes 2023-02-09 15:12:24 +01:00
Julian Eisel left a comment
Member

Just some smaller code cleanup and user messaging requests.

Just some smaller code cleanup and user messaging requests.
@ -2870,0 +2873,4 @@
/** \name Drop Geometry Nodes on Object Operator
* \{ */
char *ED_object_ot_drop_geometry_nodes_tooltip(bContext *C,
Member

This function could use a bunch of consts :) ED_object_ot_drop_named_material_tooltip() could too, but not the scope of this patch.

This function could use a bunch of `const`s :) `ED_object_ot_drop_named_material_tooltip()` could too, but not the scope of this patch.
HooglyBoogly marked this conversation as resolved
@ -2870,0 +2888,4 @@
return BLI_strdup("");
}
const char *tooltip = TIP_("Drop node tree %s on object %s");
Member

Would rather explain what effect dropping has (like adding a modifier to apply the dragged geometry node group), this isn't really helpful as a tooltip. Again, we better give ED_object_ot_drop_named_material_tooltip() an update here, but out of scope.

Would rather explain what effect dropping has (like adding a modifier to apply the dragged geometry node group), this isn't really helpful as a tooltip. Again, we better give `ED_object_ot_drop_named_material_tooltip()` an update here, but out of scope.
HooglyBoogly marked this conversation as resolved
@ -705,0 +729,4 @@
}
if (wmDropBox *drop_box = drag->drop_state.active_dropbox) {
const uint32_t uuid = RNA_int_get(drop_box->ptr, "session_uuid");
bNodeTree *node_tree = reinterpret_cast<bNodeTree *>(
Member

const

`const`
HooglyBoogly marked this conversation as resolved
Hans Goudey added 3 commits 2023-02-09 16:01:15 +01:00
Hans Goudey merged commit bfa7f9db0e into main 2023-02-09 16:04:16 +01:00
Hans Goudey deleted branch drag-drop-geometry-nodes-asset 2023-02-09 16:04:16 +01:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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#104430
No description provided.