From 769104016636b26be1b01726a1ea45c95b184a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 6 Jul 2018 12:40:09 +0200 Subject: Ocean Modifier: removed the MOD_OCEAN_REFRESH_ADD flag The flag was only used in readfile.c, and resulted in a delayed call to BKE_ocean_add(); this call is now immediately made instead as it's not very expensive. --- source/blender/blenloader/intern/readfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index c57817c275a..a03016c2536 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -138,6 +138,7 @@ #include "BKE_multires.h" #include "BKE_node.h" // for tree type defines #include "BKE_object.h" +#include "BKE_ocean.h" #include "BKE_paint.h" #include "BKE_particle.h" #include "BKE_pointcache.h" @@ -5362,8 +5363,8 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) else if (md->type == eModifierType_Ocean) { OceanModifierData *omd = (OceanModifierData *)md; omd->oceancache = NULL; - omd->ocean = NULL; - omd->refresh = (MOD_OCEAN_REFRESH_ADD|MOD_OCEAN_REFRESH_RESET|MOD_OCEAN_REFRESH_SIM); + omd->ocean = BKE_ocean_add(); + omd->refresh = MOD_OCEAN_REFRESH_RESET | MOD_OCEAN_REFRESH_SIM; } else if (md->type == eModifierType_Warp) { WarpModifierData *tmd = (WarpModifierData *)md; -- cgit v1.2.3 From 12ce0cfb21d83b70183a64de47ad05b5775b4937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 6 Jul 2018 12:42:58 +0200 Subject: Ocean Modifier: removed unused refresh flags The flags were set and cleared correctly, but nothing was actually reading them. --- source/blender/blenloader/intern/readfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a03016c2536..4e845b9a60d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5364,7 +5364,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) OceanModifierData *omd = (OceanModifierData *)md; omd->oceancache = NULL; omd->ocean = BKE_ocean_add(); - omd->refresh = MOD_OCEAN_REFRESH_RESET | MOD_OCEAN_REFRESH_SIM; + omd->refresh = MOD_OCEAN_REFRESH_RESET; } else if (md->type == eModifierType_Warp) { WarpModifierData *tmd = (WarpModifierData *)md; -- cgit v1.2.3