Page MenuHome

Geometry Nodes: Component type warning system.
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Oct 17 2021, 4:40 PM.

Details

Summary

This adds a few new methods to the geometry socket declaration which are used to generate warnings automatically.

  • .supported_type(...): Specify which geometry types are supported by this geometry input (e.g. only curves in Fill Curve node).
  • .only_realized_data(): Specify that this input only supports realized data (e.g. in Transfer Attribute node).
  • .only_instances(): Specify that only instances are supported and realized data is ignored (e.g. in Translate Instances node).

Diff Detail

Repository
rB Blender
Branch
geometry-type-warning-system (branched from master)
Build Status
Buildable 18247
Build 18247: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Oct 17 2021, 4:40 PM
Jacques Lucke (JacquesLucke) created this revision.
  • Merge branch 'master' into geometry-type-warning-system
  • Add warnings to all the nodes.
Jacques Lucke (JacquesLucke) retitled this revision from Geometry Nodes: Component type warning system (WIP). to Geometry Nodes: Component type warning system..Oct 26 2021, 5:16 PM
Jacques Lucke (JacquesLucke) edited the summary of this revision. (Show Details)
Hans Goudey (HooglyBoogly) requested changes to this revision.Oct 26 2021, 7:27 PM

This is a great improvement, and I like the implementation. Just a few comments inline.

source/blender/blenkernel/intern/geometry_set.cc
531–532

const

source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc
31

Looks like the brackets aren't necessary elsewhere.

source/blender/nodes/intern/node_geometry_exec.cc
55–62

I think it would make sense to continue, so that the has unsupported type warnings are also displayed.

Also, I think these two might fit better as "Info" message, so that they don't show up in the modifier or the terminal. They're not really "errors" since the node can still work fine, it just ignores the instances.

81–98

I think these should be capitalized, it looks out of place otherwise I think.

This revision now requires changes to proceed.Oct 26 2021, 7:27 PM
  • Merge branch 'master' into geometry-type-warning-system
  • cleanup
This revision is now accepted and ready to land.Oct 26 2021, 7:54 PM