Age | Commit message (Collapse) | Author |
|
|
|
We still have base->flag_legacy & BA_WAS_SEL for the few cases we really
need to have a per-object selection check (used in the transform code).
|
|
|
|
|
|
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
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
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.
|
|
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.
|
|
Part of D4277 by @sobakasu
|
|
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
|
|
|
|
|
|
collection.
We have to ensure objects get expected RB data, when they are added to a
RB collection...
|
|
|
|
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
|
|
Stick to an existing way of dealing with disabled feature.
|
|
We cannot let those data be generated on-the-fly in RBW evaluation
anymore, since those would be added to CoW eval object and never ported
back to orig objects.
We *could* get orig objects in eval code, of course, but as in
constratints, this is not really threadsafe and future proof, depsgraph
evaluation should really write back to orig data as little as possible.
So instead, add code to ensure required data is generated to objects
when their collection is added to rigidbody world.
Note that we *may* want to clean that up once collection is no more used
by RB? On the other hand, people might want to keep those data around to
be able to switch between different setups easily... So think it's OK to
keep them at least for now.
|
|
|
|
|
|
Also use unsigned shifting for values not in int range.
|
|
|
|
|
|
Continuation of https://developer.blender.org/D3802
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3808
|
|
|
|
|
|
|
|
Conflicts:
source/blender/blenkernel/intern/rigidbody.c
|
|
The old springs with damping 1.0 operate in a special way that
is more similar to plastic deformation than a spring. Some users
rely on that, so let the user choose which implementation to use.
This also restores full backward compatibility with 2.79.
Reviewers: sergof
Differential Revision: https://developer.blender.org/D3544
|
|
|
|
To prevent the pointcache from being copied-on-write too (and requiring
copying back), the cache is now shared between the original and
evaluated scenes. Reading from the cache is always allowed; running the
sim and writing to the cache is only allowed when the depsgraph is
active.
Some pointers have moved from RigidBodyWorld (RBO) to
RigidBodyWorldShared (RBOS). writefile.c copies some pointers back from
RBOS to RBO so that the file can still be opened on older Blenders
without crashing on a segfault.
The RigidBodyWorldShared struct is written to the blend file, because it
refers to the PointCache ID block.
The RigidObjectShared struct is runtime-only, and thus not saved to the
blend file.
An RNA getter-function is used to hide the new 'shared' pointer. As a
result the Python API hasn't changed.
Reviewed by: campbellbarton
Differential Revision: https://developer.blender.org/D3508
|
|
|
|
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.
|
|
|
|
I moved some code from ED_rigidbody_object_remove() to
BKE_rigidbody_remove_object(), so that calling the latter doesn't leave
the object in rbw->group (causing a crash later on when rebuilding the
depsgraph).
|
|
This was caused by a floating point comparison using ==, instead of using
compare_ff_relative().
|
|
This makes it possible to perform re-evaluation of the scene without
having to re-run the simulation.
The CoW → Orig copy is only performed when the depsgraph is active, so
as to not influence the current scene while rendering in the background.
Alternatively, we could have the CoW copy share the cache with the
original to prevent too much copying of cache data. This will be faster,
but I'm not sure whether we can reliably check the DEG_is_active()
status at CoW copy creation time.
|
|
|
|
|
|
|
|
For physics simulation it's still fuzzy though, but this needs bigger
design for how it works with view layers and visibility.
|
|
|
|
|
|
|
|
This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming
Things to note:
1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)
2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)
victor_cpu
msvc:3099.51
clang:2796.43
pavillon_barcelona_cpu
msvc:1872.05
clang:1827.72
koro_cpu
msvc:1097.58
clang:1006.51
fishy_cat_cpu
msvc:815.37
clang:722.2
classroom_cpu
msvc:1705.39
clang:1575.43
bmw27_cpu
msvc:552.38
clang:561.53
barbershop_interior_cpu
msvc:2134.93
clang:1922.33
3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.
4) X64 only currently, X86 builds but crashes on startup.
5) Tested with llvm/clang 6.0.0
6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration
7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.
8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.
9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D3304
|
|
There are still probably other massive problems to solve (i.e. which copies
of data cache/sim gets written/read from for COW eval) that need to be solved
before we can get the sims actually running though.
|