[Bf-blender-cvs] [d8aaed1] object_nodes: Merge branch 'master' into object_nodes
Lukas Tönne
noreply at git.blender.org
Fri May 27 16:01:58 CEST 2016
Commit: d8aaed17eb889c7acab08c89a8efd42fb5f9716d
Author: Lukas Tönne
Date: Fri May 27 16:01:49 2016 +0200
Branches: object_nodes
https://developer.blender.org/rBd8aaed17eb889c7acab08c89a8efd42fb5f9716d
Merge branch 'master' into object_nodes
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/dynamicpaint.c
index ff03682,2d531e3..1df4eff
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@@ -4114,10 -4532,81 +4532,80 @@@ static void dynamicPaint_doSmudge(Dynam
}
}
+ typedef struct DynamicPaintEffectData {
+ const DynamicPaintSurface *surface;
+ Scene *scene;
+
+ float *force;
- ListBase *effectors;
++ EffectorContext *effectors;
+ const void *prevPoint;
+ const float eff_scale;
+
+ uint8_t *point_locks;
+
+ const float wave_speed;
+ const float wave_scale;
+ const float wave_max_slope;
+
+ const float dt;
+ const float min_dist;
+ const float damp_factor;
+ const bool reset_wave;
+ } DynamicPaintEffectData;
+
/*
* Prepare data required by effects for current frame.
* Returns number of steps required
*/
+ static void dynamic_paint_prepare_effect_cb(void *userdata, const int index)
+ {
+ const DynamicPaintEffectData *data = userdata;
+
+ const DynamicPaintSurface *surface = data->surface;
+ const PaintSurfaceData *sData = surface->data;
+ const PaintBakeData *bData = sData->bData;
+ Vec3f *realCoord = bData->realCoord;
+
+ Scene *scene = data->scene;
-
++ EffectorContext *effectors = data->effectors;
+ float *force = data->force;
- ListBase *effectors = data->effectors;
+
+ float forc[3] = {0};
+ float vel[3] = {0};
+
+ /* apply force fields */
+ if (effectors) {
+ EffectedPoint epoint;
+ pd_point_from_loc(scene, realCoord[bData->s_pos[index]].v, vel, index, &epoint);
+ epoint.vel_to_sec = 1.0f;
+ pdDoEffectors(effectors, NULL, surface->effector_weights, &epoint, forc, NULL);
+ }
+
+ /* if global gravity is enabled, add it too */
+ if (scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY)
+ /* also divide by 10 to about match default grav
+ * with default force strength (1.0) */
+ madd_v3_v3fl(forc, scene->physics_settings.gravity,
+ surface->effector_weights->global_gravity * surface->effector_weights->weight[0] / 10.f);
+
+ /* add surface point velocity and acceleration if enabled */
+ if (bData->velocity) {
+ if (surface->drip_vel)
+ madd_v3_v3fl(forc, bData->velocity[index].v, surface->drip_vel * (-1.0f));
+
+ /* acceleration */
+ if (bData->prev_velocity && surface->drip_acc) {
+ float acc[3];
+ copy_v3_v3(acc, bData->velocity[index].v);
+ sub_v3_v3(acc, bData->prev_velocity[index].v);
+ madd_v3_v3fl(forc, acc, surface->drip_acc * (-1.0f));
+ }
+ }
+
+ /* force strength, and normalize force vec */
+ force[index * 4 + 3] = normalize_v3_v3(&force[index * 4], forc);
+ }
+
static int dynamicPaint_prepareEffectStep(
DynamicPaintSurface *surface, Scene *scene, Object *ob, float **force, float timescale)
{
@@@ -4130,12 -4619,7 +4618,7 @@@
/* Init force data if required */
if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP) {
- float vel[3] = {0};
- EffectorContext *effectors;
-
- effectors = pdInitEffectors(scene, ob, NULL, surface->effector_weights, true);
- ListBase *effectors = pdInitEffectors(scene, ob, NULL, surface->effector_weights, true);
++ EffectorContext *effectors = pdInitEffectors(scene, ob, NULL, surface->effector_weights, true);
/* allocate memory for force data (dir vector + strength) */
*force = MEM_mallocN(sData->total_points * 4 * sizeof(float), "PaintEffectForces");
diff --cc source/blender/depsgraph/intern/depsgraph_eval.cc
index 4a64542,e584e8a..e8b5e98
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@@ -51,9 -51,10 +51,10 @@@ extern "C"
#include "depsnode_component.h"
#include "depsnode_operation.h"
#include "depsgraph_debug.h"
+ #include "depsgraph_util_foreach.h"
#ifdef WITH_LEGACY_DEPSGRAPH
-static bool use_legacy_depsgraph = true;
+static bool use_legacy_depsgraph = false;
#endif
/* Unfinished and unused, and takes quite some pre-processing time. */
diff --cc source/blenderplayer/CMakeLists.txt
index 2e33eb7,6f32d50..0a0a500
--- a/source/blenderplayer/CMakeLists.txt
+++ b/source/blenderplayer/CMakeLists.txt
@@@ -111,10 -111,6 +111,9 @@@ endif(
ge_player_common
bf_intern_string
bf_intern_ghost
- bf_intern_ghostndof3dconnexion
+ bf_blenvm
+ bf_blenvm_bvm
+ bf_blenvm_compile
bf_rna
bf_blenkernel
bf_depsgraph
More information about the Bf-blender-cvs
mailing list