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:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-07-06 14:53:35 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-07-06 14:53:35 +0300
commit843d5d707deec1c58534c879dca23c03bd64f249 (patch)
tree19976afafde93b0284a1d1ae39f94c0231f25abe
parent81a93df6d22c2f148667b9a6e8308e083a4cec39 (diff)
parent12ce0cfb21d83b70183a64de47ad05b5775b4937 (diff)
Merge remote-tracking branch 'origin/master' into blender2.8
-rw-r--r--source/blender/blenloader/intern/readfile.c5
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h6
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c32
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c3
4 files changed, 13 insertions, 33 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b3a2d2f0b0b..effaa592080 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -145,6 +145,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"
@@ -5224,8 +5225,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;
}
else if (md->type == eModifierType_Warp) {
WarpModifierData *tmd = (WarpModifierData *)md;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 42b22e45495..ed25727b740 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -1019,10 +1019,10 @@ enum {
enum {
MOD_OCEAN_REFRESH_RESET = (1 << 0),
- MOD_OCEAN_REFRESH_SIM = (1 << 1),
- MOD_OCEAN_REFRESH_ADD = (1 << 2),
+ /* MOD_OCEAN_REFRESH_SIM = (1 << 1), */
+ /* MOD_OCEAN_REFRESH_ADD = (1 << 2), */
MOD_OCEAN_REFRESH_CLEAR_CACHE = (1 << 3),
- MOD_OCEAN_REFRESH_TOPOLOGY = (1 << 4),
+ /* MOD_OCEAN_REFRESH_TOPOLOGY = (1 << 4), */
};
enum {
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index cb4c9a1fc06..46022511f8e 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -739,25 +739,7 @@ static void rna_OceanModifier_init_update(Main *bmain, Scene *scene, PointerRNA
{
OceanModifierData *omd = (OceanModifierData *)ptr->data;
- omd->refresh |= (MOD_OCEAN_REFRESH_RESET | MOD_OCEAN_REFRESH_SIM | MOD_OCEAN_REFRESH_CLEAR_CACHE);
-
- rna_Modifier_update(bmain, scene, ptr);
-}
-
-static void rna_OceanModifier_sim_update(Main *bmain, Scene *scene, PointerRNA *ptr)
-{
- OceanModifierData *omd = (OceanModifierData *)ptr->data;
-
- omd->refresh |= MOD_OCEAN_REFRESH_SIM;
-
- rna_Modifier_update(bmain, scene, ptr);
-}
-
-static void rna_OceanModifier_topology_update(Main *bmain, Scene *scene, PointerRNA *ptr)
-{
- OceanModifierData *omd = (OceanModifierData *)ptr->data;
-
- omd->refresh |= MOD_OCEAN_REFRESH_TOPOLOGY;
+ omd->refresh |= MOD_OCEAN_REFRESH_RESET | MOD_OCEAN_REFRESH_CLEAR_CACHE;
rna_Modifier_update(bmain, scene, ptr);
}
@@ -4058,7 +4040,7 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "Surface scale factor (does not affect the height of the waves)");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, -1);
- RNA_def_property_update(prop, 0, "rna_OceanModifier_topology_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "repeat_x", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "repeat_x");
@@ -4066,7 +4048,7 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_range(prop, 1, 100, 1, -1);
RNA_def_property_ui_text(prop, "Repeat X", "Repetitions of the generated surface in X");
- RNA_def_property_update(prop, 0, "rna_OceanModifier_topology_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "repeat_y", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "repeat_y");
@@ -4074,7 +4056,7 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_range(prop, 1, 100, 1, -1);
RNA_def_property_ui_text(prop, "Repeat Y", "Repetitions of the generated surface in Y");
- RNA_def_property_update(prop, 0, "rna_OceanModifier_topology_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "use_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_GENERATE_NORMALS);
@@ -4138,7 +4120,7 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
prop = RNA_def_property(srna, "wave_scale", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "wave_scale");
RNA_def_property_ui_text(prop, "Wave Scale", "Scale of the displacement effect");
- RNA_def_property_update(prop, 0, "rna_OceanModifier_sim_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "depth");
@@ -4170,13 +4152,13 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
"Choppiness of the wave's crest (adds some horizontal component to the displacement)");
RNA_def_property_ui_range(prop, 0.0, 4.0, 3, -1);
RNA_def_property_float_funcs(prop, NULL, "rna_OceanModifier_ocean_chop_set", NULL);
- RNA_def_property_update(prop, 0, "rna_OceanModifier_sim_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_ui_text(prop, "Time", "Current time of the simulation");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, -1);
- RNA_def_property_update(prop, 0, "rna_OceanModifier_sim_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "random_seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "seed");
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c
index e9dc7e068ca..52bd3e874b6 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -437,9 +437,6 @@ static DerivedMesh *doOcean(
}
/* update modifier */
- if (omd->refresh & MOD_OCEAN_REFRESH_ADD) {
- omd->ocean = BKE_ocean_add();
- }
if (omd->refresh & MOD_OCEAN_REFRESH_RESET) {
init_ocean_modifier(omd);
}