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:
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index ffeba0148a2..74fbfc318a8 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -88,7 +88,7 @@ float PSYS_FRAND_BASE[PSYS_FRAND_COUNT];
void psys_init_rng(void)
{
RNG *rng = BLI_rng_new_srandom(5831); /* arbitrary */
- for (int i = 0; i < PSYS_FRAND_COUNT; ++i) {
+ for (int i = 0; i < PSYS_FRAND_COUNT; i++) {
PSYS_FRAND_BASE[i] = BLI_rng_get_float(rng);
PSYS_FRAND_SEED_OFFSET[i] = (unsigned int)BLI_rng_get_int(rng);
PSYS_FRAND_SEED_MULTIPLIER[i] = (unsigned int)BLI_rng_get_int(rng);
@@ -2691,7 +2691,7 @@ static void psys_thread_create_path(ParticleTask *task,
pa = &psys->particles[cpa->parent];
par = pcache[cpa->parent];
- /* If particle is unexisting, try to pick a viable parent from particles
+ /* If particle is non-existing, try to pick a viable parent from particles
* used for interpolation. */
for (k = 0; k < 4 && pa && (pa->flag & PARS_UNEXIST); k++) {
if (cpa->pa[k] >= 0) {
@@ -2747,7 +2747,7 @@ static void exec_child_path_cache(TaskPool *__restrict UNUSED(pool),
int i;
cpa = psys->child + task->begin;
- for (i = task->begin; i < task->end; ++i, ++cpa) {
+ for (i = task->begin; i < task->end; i++, cpa++) {
BLI_assert(i < psys->totchildcache);
psys_thread_create_path(task, cpa, cache[i], i);
}
@@ -2794,7 +2794,7 @@ void psys_cache_child_paths(ParticleSimulationData *sim,
/* cache parent paths */
ctx.parent_pass = 1;
psys_tasks_create(&ctx, 0, totparent, &tasks_parent, &numtasks_parent);
- for (i = 0; i < numtasks_parent; ++i) {
+ for (i = 0; i < numtasks_parent; i++) {
ParticleTask *task = &tasks_parent[i];
psys_task_init_path(task, sim);
@@ -2805,7 +2805,7 @@ void psys_cache_child_paths(ParticleSimulationData *sim,
/* cache child paths */
ctx.parent_pass = 0;
psys_tasks_create(&ctx, totparent, totchild, &tasks_child, &numtasks_child);
- for (i = 0; i < numtasks_child; ++i) {
+ for (i = 0; i < numtasks_child; i++) {
ParticleTask *task = &tasks_child[i];
psys_task_init_path(task, sim);
@@ -3011,7 +3011,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra, const bool use_re
if (part->type == PART_HAIR) {
HairKey *hkey;
- for (k = 0, hkey = pa->hair; k < pa->totkey; ++k, ++hkey) {
+ for (k = 0, hkey = pa->hair; k < pa->totkey; k++, hkey++) {
mul_v3_m4v3(hkey->world_co, hairmat, hkey->co);
}
}
@@ -4068,9 +4068,7 @@ void psys_get_texture(
0,
texvec);
- if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) {
- BKE_mesh_texspace_calc(me);
- }
+ BKE_mesh_texspace_ensure(me);
sub_v3_v3(texvec, me->loc);
if (me->size[0] != 0.0f) {
texvec[0] /= me->size[0];