Page MenuHome

Geometry Nodes: Support warnings from field inputs (WIP)
Changes PlannedPublic

Authored by Hans Goudey (HooglyBoogly) on Dec 19 2021, 6:59 AM.

Details

Summary

This is a prototype for supporting warnings from field input nodes.
The warnings are added to the nodes that actually evaluate the fields,
since a single field input can be evaluated in both a proper and invalid context.

Warnings from multi-functions aren't supported-- only field inputs.

This doesn't work currently. The method also has a few big downsides:

  1. Adding warnings isn't thread-safe
    • A static mutex might be a fine way to address this, since warnings aren't a case to optimize for.
  2. There might be duplicate messages from the modify_geometry_sets loops.
    • This is a much harder problem since it's also a goal to avoid adding too much boilerplate code to every node.
    • The warnings for each node could be stored in a set temporarily to avoid duplicates.

So, instead of using a callback, I suggest adding a temporary set container to GeoNodeExecParams and passing a reference to it.
When adding to the set, a static mutex could be locked.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Dec 19 2021, 6:59 AM
Hans Goudey (HooglyBoogly) created this revision.
Hans Goudey (HooglyBoogly) edited the summary of this revision. (Show Details)
Hans Goudey (HooglyBoogly) edited the summary of this revision. (Show Details)

Use callback, support all field inputs

source/blender/functions/FN_field.hh
259

Now that more parameters are added here, it might make sense to group them together in a struct. That would make adding parameters in the future easier and voids changing so many files every time.

Hans Goudey (HooglyBoogly) planned changes to this revision.Aug 2 2022, 8:39 PM