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:
authorAlexander Gavrilov <angavrilov@gmail.com>2021-01-09 22:24:48 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2021-02-02 23:03:16 +0300
commit78ff8526808a4fbc3d261155b1e6f873247ff8ce (patch)
treee154dc0541c268c64947ddef87ae4a4f34ebf8ec /source/blender/blenkernel/intern/softbody.c
parent64a963486f7b20f8db480be9cb894eb28e79ac57 (diff)
Force Fields: implement early filtering by the Affect flags.
Most fields have Affect Location and Rotation options that switch off their effect, but they are only checked as the last step after the force is already computed. It is more efficient to check it when building the list of field objects, just like zero weight. It is also possible to check the strength-related fields for 0. As an aside, this adds Location to Texture fields (they don't handle rotation) and both Location & Rotation checkboxes to Fluid Flow. Boid and Curve Guide remain without options for now as they are completely different from others. Differential Revision: https://developer.blender.org/D10087
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r--source/blender/blenkernel/intern/softbody.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 736acd76dfd..de88e8a941c 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1539,7 +1539,8 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph,
* or even be UI option sb->spawn_cf_threads_nopts */
int lowsprings = 100;
- ListBase *effectors = BKE_effectors_create(depsgraph, ob, NULL, ob->soft->effector_weights);
+ ListBase *effectors = BKE_effectors_create(
+ depsgraph, ob, NULL, ob->soft->effector_weights, false);
/* figure the number of threads while preventing pretty pointless threading overhead */
totthread = BKE_scene_num_threads(scene);
@@ -2300,7 +2301,7 @@ static void softbody_calc_forces(
}
/* after spring scan because it uses Effoctors too */
- ListBase *effectors = BKE_effectors_create(depsgraph, ob, NULL, sb->effector_weights);
+ ListBase *effectors = BKE_effectors_create(depsgraph, ob, NULL, sb->effector_weights, false);
if (do_deflector) {
float defforce[3];