Cleanup: fix compiler warnings related to deprecated members

For Freestyle, it helps to move the struct copy from C++ to C, where the
compiler knows that copying deprecated members is ok.
This commit is contained in:
Brecht Van Lommel 2020-01-28 18:19:44 +01:00
parent 12865caf4f
commit ca572e9970
5 changed files with 11 additions and 7 deletions

View File

@ -108,7 +108,6 @@ const UserDef U_default = {
.keyconfigstr = "blender",
.undosteps = 32,
.undomemory = 0,
.gpu_viewport_quality = 0.6,
.gp_manhattendist = 1,
.gp_euclideandist = 2,
.gp_eraser = 25,

View File

@ -173,6 +173,8 @@ bool BKE_scene_uses_blender_eevee(const struct Scene *scene);
bool BKE_scene_uses_blender_workbench(const struct Scene *scene);
bool BKE_scene_uses_cycles(const struct Scene *scene);
void BKE_scene_copy_data_eevee(struct Scene *sce_dst, const struct Scene *sce_src);
void BKE_scene_disable_color_management(struct Scene *scene);
bool BKE_scene_check_color_management_enabled(const struct Scene *scene);
bool BKE_scene_check_rigidbody_active(const struct Scene *scene);

View File

@ -351,6 +351,13 @@ void BKE_scene_copy_data(Main *bmain, Scene *sce_dst, const Scene *sce_src, cons
sce_dst->preview = NULL;
}
BKE_scene_copy_data_eevee(sce_dst, sce_src);
}
void BKE_scene_copy_data_eevee(Scene *sce_dst, const Scene *sce_src)
{
/* Copy eevee data between scenes. */
sce_dst->eevee = sce_src->eevee;
sce_dst->eevee.light_cache = NULL;
sce_dst->eevee.light_cache_info[0] = '\0';
/* TODO Copy the cache. */
@ -374,9 +381,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
sce_copy->unit = sce->unit;
sce_copy->physics_settings = sce->physics_settings;
sce_copy->audio = sce->audio;
sce_copy->eevee = sce->eevee;
sce_copy->eevee.light_cache = NULL;
sce_copy->eevee.light_cache_info[0] = '\0';
BKE_scene_copy_data_eevee(sce_copy, sce);
if (sce->id.properties) {
sce_copy->id.properties = IDP_CopyProperty(sce->id.properties);

View File

@ -118,8 +118,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str
freestyle_scene->id.properties = IDP_CopyProperty_ex(old_scene->id.properties, 0);
}
// Copy eevee render settings.
freestyle_scene->eevee = old_scene->eevee;
freestyle_scene->eevee.light_cache = NULL;
BKE_scene_copy_data_eevee(freestyle_scene, old_scene);
/* Render with transparent background. */
freestyle_scene->r.alphamode = R_ALPHAPREMUL;

View File

@ -66,7 +66,6 @@
.col_mask = 0xffff, \
.preview = NULL, \
.duplicator_visibility_flag = OB_DUPLI_FLAG_VIEWPORT | OB_DUPLI_FLAG_RENDER, \
.fluidsimSettings = NULL, \
.pc_ids = {NULL, NULL}, \
}