Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
This way we allow animation system to make decisions based on which
context dependency graph is coming from, and whether it belongs to
an active edit window or not.
|
|
|
|
Conflicts:
intern/cycles/blender/blender_curves.cpp
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/object_update.c
source/blender/blenkernel/intern/particle_system.c
source/blender/editors/object/object_modifier.c
source/blender/editors/physics/physics_fluid.c
source/blender/makesrna/intern/rna_particle.c
source/blender/modifiers/intern/MOD_particlesystem.c
|
|
|
|
|
|
The problem was that the particle system modifier was reading ob->derivedDeform
during modifier stack evaluation. Due to the mesh -> DM conversion this was no
longer set leading to wrong results.
In fact we don't really need the deformed mesh, just the original mesh topology
for face/poly index remapping. So the solution is to use that instead.
|
|
|
|
The modifier is still quite slow; this could be due to caches being written
to a CoW datablock instead of the original one. More investigation is
needed.
|
|
There are a few places where DerivedMesh is still used, most notably
when calling the (not yet ported) cloth simulation. There is also still
the use of Object.derivedDeform and Object.derivedFinal. Those places are
marked with a TODO.
Some functions in the editors module were copied to accept Mesh. Those
already had 'mesh' in the name; the copies are suffixed with '__real_mesh'
for easy renaming later when the DM-based functionality is removed.
|
|
This makes the particle animation work again!
|
|
They might be looking weird, but they match conditions when children particles
are to be re-calculated for particle edit.
|
|
Everything seems to be working without this, which makes since there is no
evaluation-time edit code in master. The only tricky part here would be that
this means we might want to ensure edit structure exists from inside particle
mode in draw manager.
Other point for not having this code in evaluation is that it's possible to
have same object evaluated in different contexts at the same time, and since
edit structures are supposed to be in original object we might run into
threading conflict.
|
|
Currently only affects EVALUATION debug messages, rest are to be
supported on per-depsgraph level.
|
|
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
|
|
This isn't something we should do,
each instance should be noted and removed.
|
|
This is just to have hair rendering and editing mostly working as in
master. A better fix is probably needed, there seems to be some
missing depsgraph relations for particle edit settings, and particle
edit code doesn't rebuild caches after applying edits. But at least
you can see and interact with hair now until those things can be
sorted out.
|
|
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
|
|
|
|
|
|
For correct results these must have been set already when the depsgraph was
created and evaluated, so all dependencies have appropriate resolutions too.
For particle we no longer backup and restore the viewport particles to avoid
overwriting them during render, as copy-on-write solves this for us. Even
without COW particles seem to work ok.
This also removes the particle simplification options based on camera. This
was never used much and only available in Blender Internal.
Differential Revision: https://developer.blender.org/D3148
|
|
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
|
|
- Undo that changes modes currently asserts,
since undo is now screen data.
Most likely we will change how object mode and workspaces work
since it's not practical/maintainable at the moment.
- Removed view_layer from particle settings
(wasn't needed and complicated undo).
|
|
|
|
Use more generic id->recalc flag.
Also sanitize flag flush from settings to particle system.
Need to do such flush before triggering point cache reset, since
point cache reset will do some logic based on what flags are set.
This will solve crash caused by threaded update which will set
some bitflags while point cache reset is in progress.
|
|
|
|
This way we can easily control format and keep it consistent.
And also possibly do other trickery, like coloring addresses!
|
|
- put render iterator in own scope
(would shadow it's own variable if used multiple times).
- enforce semicolon at end of iterator macros.
- no need to typedef one-off macro structs.
|
|
Convention from 2.7x, since some looping macros don't need an '_END',
it avoids confusion to keep this.
|
|
|
|
Now it's possible to have debug messages for following things:
- Graph construction
- Graph evaluation
- Graph tagging
|
|
|
|
Some of these API's can have 3D versions, explicitly name them 2D.
|
|
|
|
|