Text objects: make CharInfo mat_nr zero-based #112954

Merged
Philipp Oeser merged 2 commits from lichtwerk/blender:109491_b into blender-v4.0-release 2023-09-28 11:46:59 +02:00

2 Commits

Author SHA1 Message Date
Philipp Oeser f1a7b7054e remove outdated comment
buildbot/vexp-code-patch-coordinator Build done. Details
2023-09-28 09:51:15 +02:00
Philipp Oeser 12b45b3d1c Text objects: make CharInfo mat_nr zero-based
For text objects, the CharInfo mat_nr material index used to start at 1
(not at zero like for meshes or nurbs).
Code was mostly considering this (but not in all places, so material
index handling (removing/moving) could still go wrong.

As an alternative to !109746 (where it was made sure all places would
make the right assumption about mat_nr starting at 1), this PR now
changes the mat_nr to be zero-based.

This is more in line with other places handling material indices.

Versioning code is in place to properly convert old files.

Fixes #109491
2023-09-28 09:47:52 +02:00