Fix #114102: Node tool data-block inputs broken #114347

Merged
Hans Goudey merged 3 commits from HooglyBoogly/blender:fix-node-tool-id-inputs into blender-v4.0-release 2023-11-01 10:53:51 +01:00
Member

Also add data-blocks from the redo panel inputs to the temporary
dependency graph added by 2893dc8ab7. Then make a temporary
copy of the properties list to pass the updated "evaluated" pointers to
the geometry nodes evaluator.

Sharing code between the modifier and tools is starting to make things
more complicated than they should be. But for now it's still probably
worth it.

The remaining issue with data-block inputs is #113383. I'll look into
that next.

Also add data-blocks from the redo panel inputs to the temporary dependency graph added by 2893dc8ab7bbf9b2079. Then make a temporary copy of the properties list to pass the updated "evaluated" pointers to the geometry nodes evaluator. Sharing code between the modifier and tools is starting to make things more complicated than they should be. But for now it's still probably worth it. The remaining issue with data-block inputs is #113383. I'll look into that next.
Hans Goudey added 1 commit 2023-10-31 23:03:51 +01:00
7d399ba242 Fix #114102: Node tool data-block inputs broken
Also add data-blocks from the redo panel inputs to the temporary
dependency graph added by 2893dc8ab7. Then make a temporary
copy of the properties list to pass the updated "evaluated" pointers to
the geometry nodes evaluator.

Sharing code between the modifier and tools is starting to make things
more complicated than they should be. But for now it's still probably
worth it.

The remaining issue with data-block inputs is #113383. I'll look into
that next.
Hans Goudey requested review from Jacques Lucke 2023-10-31 23:08:06 +01:00
Hans Goudey added the
Module
Nodes & Physics
Interest
Geometry Nodes
labels 2023-10-31 23:08:18 +01:00
Hans Goudey added this to the 4.0 milestone 2023-10-31 23:08:22 +01:00
Jacques Lucke reviewed 2023-10-31 23:16:12 +01:00
@ -255,0 +266,4 @@
static IDProperty *replace_inputs_evaluated_data_blocks(const IDProperty &op_properties,
const Depsgraph &depsgraph)
{
IDProperty *properties = IDP_CopyProperty(&op_properties);
Member

Haven't tried it myself now, please double check and maybe add a comment for how user counting is handled here.

Haven't tried it myself now, please double check and maybe add a comment for how user counting is handled here.
HooglyBoogly marked this conversation as resolved
@ -255,0 +273,4 @@
[](IDProperty *property, void *user_data) {
if (ID *id = IDP_Id(property)) {
Depsgraph *depsgraph = static_cast<Depsgraph *>(user_data);
property->data.pointer = DEG_get_evaluated_id(depsgraph, id);
Member

Can this use IDP_Id as well?

Can this use `IDP_Id` as well?
Author
Member

Seemed like it should work to me too, but apparently not.

/home/hans/blender-git/blender/source/blender/blenkernel/BKE_idprop.h:268:25: error: lvalue required as left operand of assignment
  268 | #  define IDP_Id(prop) ((ID *)(prop)->data.pointer)
      |                        ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hans/blender-git/blender/source/blender/editors/geometry/node_group_operator.cc:277:11: note: in expansion of macro ‘IDP_Id’
  277 |           IDP_Id(property) = DEG_get_evaluated_id(depsgraph, id);
      |           ^~~~~~
Seemed like it should work to me too, but apparently not. ``` /home/hans/blender-git/blender/source/blender/blenkernel/BKE_idprop.h:268:25: error: lvalue required as left operand of assignment 268 | # define IDP_Id(prop) ((ID *)(prop)->data.pointer) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/hans/blender-git/blender/source/blender/editors/geometry/node_group_operator.cc:277:11: note: in expansion of macro ‘IDP_Id’ 277 | IDP_Id(property) = DEG_get_evaluated_id(depsgraph, id); | ^~~~~~ ```
Member

Should be possible to fix IDP_Id for this like so (note that it is defined in two places):
#define IDP_Id(prop) (*(ID **)&(prop)->data.pointer)

This can be cleaned up separately though.

Should be possible to fix `IDP_Id` for this like so (note that it is defined in two places): `#define IDP_Id(prop) (*(ID **)&(prop)->data.pointer)` This can be cleaned up separately though.
Hans Goudey added 2 commits 2023-11-01 09:44:39 +01:00
Jacques Lucke approved these changes 2023-11-01 10:47:04 +01:00
Hans Goudey merged commit 66c1ca7419 into blender-v4.0-release 2023-11-01 10:53:51 +01:00
Hans Goudey deleted branch fix-node-tool-id-inputs 2023-11-01 10:53:56 +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
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#114347
No description provided.