Age | Commit message (Collapse) | Author |
|
|
|
|
|
To find all effectors in the scene, we need to loop over all objects.
Doing this during depsgraph evaluation caused crashes because not all
objects are guaranteed to be evaluated yet.
To fix this, we now cache the relations as part of the dependency graph
build. As a bonus this also makes evaluation faster for big scenes,
since looping over all objects for each particle system is slow.
Fixes T55156.
|
|
|
|
|
|
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
|
|
|
|
|
|
|
|
|
|
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
|
|
Noisy change, but safe, and better do it sooner than later if we are to
rework copying code. Also, previous commit shows this *is* useful to
catch some mistakes.
|
|
Problem was, during initialization of boids particles in `dynamics_step()`,
psys of target objects was not obtained with generic `psys_get_target_system()`
as later in code, which could lead to some uninitialized `psys->tree` usage...
Think it's safe enough for 2.77, though not a regression.
|
|
Definitions could shadow local vars.
|
|
shape causes crash.
This is a mere bandage, that whole area is known broken anyway, but at least it should prevent the crash.
Note that that kind of stuff (the efd->index being a pointer) is really bad practice imho...
Should be backported to final 2.76.
|
|
|
|
By default watertight intersections are used,
For callbacks where its not needed,
BLI_bvhtree_ray_cast_ex can be called without the BVH_RAYCAST_WATERTIGHT flag.
Fixes T45286
|
|
This was already the case for most users of ray-cast.
Doing this avoids 2x normalize calls per ray-cast in many places.
|
|
|
|
|
|
Normals for each kdtree node were allocated but never used,
and search args only use in particles/boids code.
|
|
in threaded depgraph updates and effector list construction.
Gathering effectors during depgraph updates will call the
psys_check_enabled function. This in turn contained a DNA alloc call
for the psys->frand RNG arrays, which is really bad because data must be
immutable during these effector constructions.
To avoid such allocs the frand array is now global for all particle
systems. To avoid correlation of pseudo-random numbers the psys->seed
value is complemented with random offset and multiplier for the actual
float array. This is not ideal, but work sufficiently well (given that
random numbers were already really limited and show repetition quite
easily for particle counts > PSYS_FRAND_COUNT).
|
|
Problem was introduced with r54648, which determined the initial interval for the Newton-Raphson method using the "total_time" of the collision - but this info is only defined for regular collisions, not
for the raycasting used in boids to find the "ground object". To ensure correct behavior, now clear the collision info before using it (good practice in any case), then check the inv_total_time variable
and use the standard 0.001 step if not defined.
|
|
also replace callocs with mallocs since zeroing memory can be avoided.
|
|
- boids random option was falling through to average.
- (NC_OBJECT | ND_DRAW) notifier was falling through to ND_SHADING button preview updates.
|
|
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.
Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
|
|
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
|
|
|
|
|
|
references in bmesh docs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if's
|
|
|
|
|
|
fix for sequencer unique naming which was missed with string length update.
|
|
(in keeping with most of blenders code)
also split some long lines in own code.
|
|
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
|
|
the file.
|
|
copying, some parts of the code are copying float -> short normals without scaling. fix coming next.
|
|
with hair particle objects
* Noise is now considered an animated texture as it changes with every frame
* Converted a few places in particles code to use the particle system's own random table instead of BLI_frand.
|
|
* Boids that can only fly shouldn't care about ground unless there's actually a collision object below them.
|
|
|