Page MenuHome

Validation message split from nurb_check_valid
ClosedPublic

Authored by Laurynas Duburas (laurynas) on Mar 11 2022, 7:48 PM.

Diff Detail

Repository
rB Blender

Event Timeline

Laurynas Duburas (laurynas) requested review of this revision.Mar 11 2022, 7:48 PM
Laurynas Duburas (laurynas) created this revision.
Hans Goudey (HooglyBoogly) requested changes to this revision.Mar 11 2022, 8:53 PM

Thanks for making the patch. I'll move my comments here too.
I like the idea of separating the error message from finding an error.

  • Use an enum class for the error values. It would be cleaner to add an explicit "None" value to the enum instead of using zero.
  • Indeed, TIP_ needs to run at runtime. A function with a switch case instead of the VALID_MESSAGES should be used to retrieve the messages. This also doesn't rely on indices being the same.
source/blender/blenkernel/intern/curve.cc
4787–4790

Unless there's a specific reason to use a 16 bit unsigned integer, the style guide prefers sticking with int.

This revision now requires changes to proceed.Mar 11 2022, 8:53 PM
  • NURBSValidationStatus enum added
  • Exception added in BKE_nurb_valid_message for pntsv == 1. Now BKE_nurb_valid_message is not equivalent to nurb_check_valid

Accepting, noting minor changes.

source/blender/blenkernel/intern/curve.cc
4716

Return args should use r_ prefix.

4757–4778

This can be NULL.

This revision is now accepted and ready to land.Mar 14 2022, 11:30 AM