Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-08-04 10:18:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-04 11:29:43 +0300
commit218df9941097bf973485ac343c070bdc6641a539 (patch)
treef831265bc737b30a811385b46911eef01b40b4c4 /source/blender/blenkernel/BKE_ocean.h
parent3b0fab6dfaa00a6fd476d28c160fcd9219f9a973 (diff)
Modifier: warn if the ocean simulation fails to allocate memory
While most modifies don't handle out of memory cases, ocean simulation could attempt huge allocations: 2048 gb at the maximum resolution. Resolves T83952.
Diffstat (limited to 'source/blender/blenkernel/BKE_ocean.h')
-rw-r--r--source/blender/blenkernel/BKE_ocean.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_ocean.h b/source/blender/blenkernel/BKE_ocean.h
index 2c0c6989acf..380f9045520 100644
--- a/source/blender/blenkernel/BKE_ocean.h
+++ b/source/blender/blenkernel/BKE_ocean.h
@@ -74,11 +74,13 @@ struct Ocean *BKE_ocean_add(void);
void BKE_ocean_free_data(struct Ocean *oc);
void BKE_ocean_free(struct Ocean *oc);
bool BKE_ocean_ensure(struct OceanModifierData *omd, const int resolution);
-void BKE_ocean_init_from_modifier(struct Ocean *ocean,
+bool BKE_ocean_init_from_modifier(struct Ocean *ocean,
struct OceanModifierData const *omd,
const int resolution);
-void BKE_ocean_init(struct Ocean *o,
+bool BKE_ocean_is_valid(const struct Ocean *o);
+
+bool BKE_ocean_init(struct Ocean *o,
int M,
int N,
float Lx,