Page MenuHome

Fix T103663: Fill single selected material not by false
ClosedPublic

Authored by Iliya Katueshenock (Moder) on Jan 5 2023, 5:19 PM.

Details

Summary

Fix T103663: Fill single selected material not by false.
Caused by D15675: Mesh: Move material indices to a generic attribute, where checking on single-value make wrong fill-call.

I have noticed several problems:

  • Using a full array as single result.
  • Checking single material index for 0. If we have a list of all slots, then we must check this in the list.
  • The result was filled false. Simple fix.
  • Fixed the problem with incorrect recording by mask indices, not polygons.
    • Added domain specifics to names to avoid confusion.

Diff Detail

Event Timeline

Iliya Katueshenock (Moder) requested review of this revision.Jan 5 2023, 5:19 PM
Iliya Katueshenock (Moder) created this revision.
Iliya Katueshenock (Moder) planned changes to this revision.Jan 5 2023, 9:33 PM
Iliya Katueshenock (Moder) set the repository for this revision to rB Blender.
Iliya Katueshenock (Moder) edited the summary of this revision. (Show Details)
  • Back min_array_size.
  • Change naming.
  • Fix bug in r_selection[i] = slots.contains(material_indices_span[face_index]); (array values were written at wrong indexes)

Thanks for the patch!

source/blender/nodes/geometry/nodes/node_geo_material_selection.cc
28

I removed slots.reserve(mesh.totcol);, since there may be many materials but only few uses of the chosen material.

This revision is now accepted and ready to land.Jan 6 2023, 3:34 PM
Iliya Katueshenock (Moder) marked an inline comment as done.Jan 6 2023, 3:39 PM