Age | Commit message (Collapse) | Author |
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
Use prefix now there isn't only the 3d version.
|
|
There were two problems:
1. `mesh_get_eval_final` has to be called with the evaluated object.
2. Particle systems have to have unique names within an object.
The depsgraph seems to use the particle system name as identifier.
This issue is actually independent of duplication.
The old code used a small hack to create unique names.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4451
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
That way it is obvious when we are using default ID copy behaviour, and
when we are using advanced/specialized ones.
|
|
Turns out most of our 'local working copy' cases can use same set of
flags.
Note that this commit adds LIB_ID_COPY_CACHES to all our local meshes
copying, however this is no-op since that flag is unused during mesh
copying... We may want to add another set of flags without that one at
some point, but for now it would not be useful imho.
|
|
Those two first sets of flags should represent some common use cases.
The goal here is to reduce verbosity of calls to BKE_id_copy_ex, and
help make it more obvious the 'common behaviours' of ID copying across
codebase.
|
|
This was used in *one* place only... much better to have a dedicated
helper for that kind of things. ;)
|
|
Was happening with certain settings for hair. Need to make a copy
of particle settings before modifying them via animation system.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
The issue was caused by dependency graph resetting particles
when evaluating copy-on-write version of object. Solved by
only doing reset from dependency graph on user edits.
Other issue was caused by modifier itself trying to compare
topology and reset particles when number of vertices or faces
changed. This isn't reliable, since topology might change even
with same number of elements. But also, since copy-on-written
object initially always have those fields zero-ed the reset
was happening on every F12.
The latter issue is solved by moving reset from modifier stack
to places where we exit edit/paint modes which might be changing
topology.
There is still weird issue of particles generated at some
weird location after tapping tab twice, but this is not a new
issue in 2.8 branch and is to be looked separately.
|
|
Was missing synchronization of current frame to the original one,
which is one of the issues why point cache does not properly reset
on edits.
Also clear recalc flag on original particle system.
Ideally we need to get rid of recalc on a particle system, since
that is not really covered by tagging system of dependency graph.
|
|
This removes a bunch of animation/driver evaluations and recalc flags that
should be redundant in the new depsgraph, and were incorrectly affecting
the evaluated scene in a permanent way.
Still two cases that could be removed if the depsgraph is improved, in
BKE_object_handle_data_update and BKE_cachefile_update_frame.
For physics subframe interpolation there are also still calls to
BKE_object_where_is_calc that should ideally be removed as well, though
they are not known to cause keyframing bugs.
Differential Revision: https://developer.blender.org/D4274
|
|
|
|
The issue was caused by the hair step checking whether
particle system needs to have path cache. This was done
in a way which was traversing an entire scene and was
checking every object for particle instance modifier.
Ideally, path cache should be an own operation in the
dependency graph. Or at least, this flag should be set
by dependency graph builder, similar to curve's path.
Since the code was broken already (it was only checking
first particle instance modifier), it is easier to
remove the buggy code, solve the crash and move on for
now.
If this causes an issue, simply set particle system to
be rendered as path.
Fixes crash with playback of Spring scenes.
|
|
|
|
Textures are now hooked up to the RESET operation of particle
settings, which ensures particles being re-distributed when
texture is changed.
This is limited to a direct user modifications, which matches
old behavior in 2.79.
|
|
There were at least three copies of those:
- OB_RECALC* family of flags, which are rudiment of an old
dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
as a separate set since the graph itself did not handle
particle systems.
- DEG_TAG_* which was used to tag IDs.
Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.
Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.
Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.
Fixes T58632: Particle don't update rotation settings
|
|
|
|
|
|
Same fix as for smoke (and is what caching proposal is AFAIK):
share cache between copied and original objects.
One thing which is still missing to be fixed is to make auto-cache
more reliable. It was already kind of broken, so don't think it
should be a stopping factor for this fix.
|
|
Continuation of https://developer.blender.org/D3802
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3808
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
|
|
|
|
This reorganizes the cloth UI, and changes some of the behaviour to be
more reasonable.
Changes included here:
* Reorganized cloth panels
* Improved some tooltips
* Removed `vel_damping` option
* Removed cloth pinning checkbox
* Removed stiffness scaling checkbox
* Separated shrinking from sewing
* Separated self collisions from object collisions
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D3691
|
|
This separates cloth stiffness and damping forces into tension,
compression, and shearing components, allowing more control over the
cloth behaviour.
This also adds a bending model selector (although the new bending model
itself is not implemented in this commit). This is because some of the
features implemented here only make sense within the new bending model,
while the old model is kept for compatibility.
This commit makes non-breaking changes, and thus maintains full
compatibility with existing simulations.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D3655
|
|
|
|
|
|
|
|
Changed code to follow master behavior closer: ignore draw-as checks
when particles are evaluating for rendering.
|
|
|
|
|
|
Same reasoning as effector relations in earlier commit.
|
|
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.
|
|
Need to get away from thosae update flags in original datablocks.
|
|
The idea is to only use pointers to particles in original object when
creating an edit structure. The derived mesh we get from evaluated
object.
The rest of the commit is just keeping pointers in sync.
|
|
|
|
|
|
|
|
Avoids threading conflicts between multiple particle systems being simulated.
|
|
Currently only obvious cases, but is already a progress.
|
|
The issue is that children drawing is done by object mode,
which operates with data from evaluated context. But that
data needs edit mode's cache to be properly updated first.
|
|
|
|
Relying on evaluation to initialize data causes issues w/ 2.8.
|
|
|
|
|