From 08a8de739d8c7fa60f257ed171d292879edae013 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 13 Sep 2022 11:43:34 -0500 Subject: Fix: Resolve deprecation warning when copying polygon struct `MPoly` is used and copied in many places. To avoid the need to use a special function for copying MPoly, or the need to add a copy constructor, just rename the `mat_nr` field to include "legacy" in the name. This keeps the original purpose of notifying developers that the field shouldn't be used without any further complexity. Apply the same fix to `bweight`. Differential Revision: https://developer.blender.org/D15841 --- source/blender/makesdna/DNA_meshdata_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesdna/DNA_meshdata_types.h') diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index e621343b818..77cb27083ab 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -29,7 +29,7 @@ typedef struct MVert { /** * Deprecated bevel weight storage, now located in #CD_BWEIGHT, except for file read and write. */ - char bweight DNA_DEPRECATED; + char bweight_legacy; char _pad[2]; } MVert; @@ -55,7 +55,7 @@ typedef struct MEdge { /** * Deprecated bevel weight storage, now located in #CD_BWEIGHT, except for file read and write. */ - char bweight DNA_DEPRECATED; + char bweight_legacy; short flag; } MEdge; @@ -83,7 +83,7 @@ typedef struct MPoly { /** Keep signed since we need to subtract when getting the previous loop. */ int totloop; /** Deprecated material index. Now stored in the "material_index" attribute, but kept for IO. */ - short mat_nr DNA_DEPRECATED; + short mat_nr_legacy; char flag, _pad; } MPoly; -- cgit v1.2.3