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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-31 16:37:15 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-31 16:37:15 +0300
commitb809340960693a3e9808e59de4d1e029226fb492 (patch)
treea2f75c291b8ac4d3ffa4abdb3b9fe013f1506dc4 /source/blender/blenkernel/intern
parent3248ac5e83307d623b18ccaed4c0b496121802e5 (diff)
parentb53d358261a26652d510d62565f1b43035a55e67 (diff)
Merge branch 'master' into blender2.8
Conflicts: intern/cycles/blender/blender_curves.cpp source/blender/blenkernel/BKE_particle.h source/blender/blenkernel/intern/modifier.c source/blender/blenkernel/intern/object_update.c source/blender/blenkernel/intern/particle_system.c source/blender/editors/object/object_modifier.c source/blender/editors/physics/physics_fluid.c source/blender/makesrna/intern/rna_particle.c source/blender/modifiers/intern/MOD_particlesystem.c
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/modifier.c6
-rw-r--r--source/blender/blenkernel/intern/particle_system.c8
2 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 86563ab797d..1358951e240 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -61,6 +61,7 @@
#include "BKE_appdir.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_editmesh.h"
+#include "BKE_global.h"
#include "BKE_idcode.h"
#include "BKE_key.h"
#include "BKE_library.h"
@@ -71,7 +72,6 @@
#include "BKE_DerivedMesh.h"
/* may move these, only for modifier_path_relbase */
-#include "BKE_global.h" /* ugh, G.main->name only */
#include "BKE_main.h"
/* end */
@@ -797,10 +797,10 @@ void test_object_modifiers(Object *ob)
* - else if the file has been saved return the blend file path.
* - else if the file isn't saved and the ID isn't from a library, return the temp dir.
*/
-const char *modifier_path_relbase(Object *ob)
+const char *modifier_path_relbase(Main *bmain, Object *ob)
{
if (G.relbase_valid || ID_IS_LINKED(ob)) {
- return ID_BLEND_PATH(G.main, &ob->id);
+ return ID_BLEND_PATH(bmain, &ob->id);
}
else {
/* last resort, better then using "" which resolves to the current
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 94abfe72b34..88dd3de7fc4 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -74,8 +74,10 @@
#include "BKE_collision.h"
#include "BKE_colortools.h"
#include "BKE_effect.h"
+#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_library_query.h"
+#include "BKE_main.h"
#include "BKE_particle.h"
#include "BKE_collection.h"
@@ -3805,7 +3807,7 @@ static void cached_step(ParticleSimulationData *sim, float cfra, const bool use_
}
}
-static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra), const bool use_render_params)
+static void particles_fluid_step(Main *bmain, ParticleSimulationData *sim, int UNUSED(cfra), const bool use_render_params)
{
ParticleSystem *psys = sim->psys;
if (psys->particles) {
@@ -3836,7 +3838,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra),
// ok, start loading
BLI_join_dirfile(filename, sizeof(filename), fss->surfdataPath, OB_FLUIDSIM_SURF_PARTICLES_FNAME);
- BLI_path_abs(filename, modifier_path_relbase(sim->ob));
+ BLI_path_abs(filename, modifier_path_relbase(bmain, sim->ob));
BLI_path_frame(filename, curFrame, 0); // fixed #frame-no
@@ -4308,7 +4310,7 @@ void particle_system_update(struct Depsgraph *depsgraph, Scene *scene, Object *o
}
case PART_FLUID:
{
- particles_fluid_step(&sim, (int)cfra, use_render_params);
+ particles_fluid_step(G.main /* Yuck :/ */, &sim, (int)cfra, use_render_params);
break;
}
default: