Fix: Silence deprecated warning

Introduced in d73b8dd4f3

Unfortunately, the `Sculpt` struct has an implicitly generated copy
constructor which accesses the deprecated field in `sculpt_ops.cc`,
instead of allowing access to potentially deprecated fields at runtime,
this commit silences the warning by appending `_deprecated` to the field
and removing `DNA_DEPRECATED` from it.

Additionally, to preserve forward compatibility, the field is added to
`dna_rename_defs.h`

Pull Request: https://projects.blender.org/blender/blender/pulls/141298
This commit is contained in:
Sean Kim
2025-07-02 05:27:00 +02:00
committed by Sean Kim
parent 1f92fd7577
commit 5bd6f41ff5
2 changed files with 2 additions and 1 deletions

View File

@@ -1340,7 +1340,7 @@ typedef struct Sculpt {
// /* Control tablet input. */
// char tablet_size, tablet_strength; XXX not used?
int radial_symm[3] DNA_DEPRECATED;
int radial_symm_legacy[3];
/** Maximum edge length for dynamic topology sculpting (in pixels). */
float detail_size;

View File

@@ -196,6 +196,7 @@ DNA_STRUCT_RENAME_MEMBER(SceneEEVEE, gtao_resolution, fast_gi_resolution)
DNA_STRUCT_RENAME_MEMBER(SceneEEVEE, motion_blur_position, motion_blur_position_deprecated)
DNA_STRUCT_RENAME_MEMBER(SceneEEVEE, motion_blur_shutter, motion_blur_shutter_deprecated)
DNA_STRUCT_RENAME_MEMBER(SceneEEVEE, shadow_cube_size, shadow_cube_size_deprecated)
DNA_STRUCT_RENAME_MEMBER(Sculpt, radial_symm, radial_symm_legacy)
DNA_STRUCT_RENAME_MEMBER(SpaceImage, pixel_snap_mode, pixel_round_mode)
DNA_STRUCT_RENAME_MEMBER(SpaceSeq, overlay_type, overlay_frame_type)
DNA_STRUCT_RENAME_MEMBER(Strip, machine, channel)