Age | Commit message (Collapse) | Author |
|
This moves the `alembic`, `avi`, `collada`, and `usd` modules into a common
`io` directory.
This also cleans up some `#include "../../{somedir}/{somefile}.h"` by
adding `../../io/{somedir}` to `CMakeLists.txt` and then just using
`#include "{somefile}.h"`.
No functional changes.
|
|
Introduce new IDTypeInfo structure.
Each ID type will have its own, with some minimal basic common info,
and ID management callbacks.
This patch only does it for Object type, for demo/testing purpose.
Moving all existing IDs is a goal of next "cleanup Friday".
Note that BKE_idcode features should then be merged back into BKE_idtype -
but this will have to be done later, once all ID types have been properly
converted to the new system.
Another later TODO might be to try and add callbacks for file read/write,
and lib_query ID usages looper.
This is part of T73719.
Thanks to @brecht for initial idea, and reviewing the patch.
Differential Revision: https://developer.blender.org/D6966
|
|
It will eventually rewritten.
This commit prepares some clean space to start this process.
So far no functional changes.
|
|
Even though we do not have much of those, this might change in the
future, and in any case having specific functions for this ID type in
generic `BKE_lib` area was really confusing.
|
|
Having functions defined in `BKE_lib_id.h` implemented into
`lib_remap.c` was confusing at best.
Besides trivial code splitting and header includes cleanup, had to add a
new `lib_intern.h` header for callbacks used by both remapping and
deletion code.
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Part of T72604:
> Proposal: BKE_library and BKE_main API naming: prefixes conventions
|
|
This now matches the Mesh behavior. Surfaces and metaball implementation
are yet to be implemented.
|
|
This is a more correct fix to the issue Brecht was fixing in D6600.
While the fix in that patch worked fine for linking it broke ASAN
runtime under some circumstances.
For example, `make full debug developer` would compile, but trying
to start blender will cause assert failure in ASAN (related on check
that ASAN is not running already).
Top-level idea: leave it to CMake to keep track of dependency graph.
The root of the issue comes to the fact that target like "blender" is
configured to use a lot of static libraries coming from Blender sources
and to use external static libraries. There is nothing which ensures
order between blender's and external libraries. Only order of blender
libraries is guaranteed.
It was possible that due to a cycle or other circumstances some of
blender libraries would have been passed to linker after libraries
it uses, causing linker errors.
For example, this order will likely fail:
libbf_blenfont.a libfreetype6.a libbf_blenfont.a
This change makes it so blender libraries are explicitly provided
their dependencies to an external libraries, which allows CMake to
ensure they are always linked against them.
General rule here: if bf_foo depends on an external library it is
to be provided to LIBS for bf_foo.
For example, if bf_blenkernel depends on opensubdiv then LIBS in
blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES.
The change is made based on searching for used include folders
such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries
to LIBS ion that CMakeLists.txt. Transitive dependencies are not
simplified by this approach, but I am not aware of any downside of
this: CMake should be smart enough to simplify them on its side.
And even if not, this shouldn't affect linking time.
Benefit of not relying on transitive dependencies is that build
system is more robust towards future changes. For example, if
bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES
and all such code is moved to bf_blenkernel this will not break
linking.
The not-so-trivial part is change to blender_add_lib (and its
version in Cycles). The complexity is caused by libraries being
provided as a single list argument which doesn't allow to use
different release and debug libraries on Windows. The idea is:
- Have every library prefixed as "optimized" or "debug" if
separation is needed (non-prefixed libraries will be considered
"generic").
- Loop through libraries passed to function and do simple parsing
which will look for "optimized" and "debug" words and specify
following library to corresponding category.
This isn't something particularly great. Alternative would be to
use target_link_libraries() directly, which sounds like more code
but which is more explicit and allows to have more flexibility
and control comparing to wrapper approach.
Tested the following configurations on Linux, macOS and Windows:
- make full debug developer
- make full release developer
- make lite debug developer
- make lite release developer
NOTE: Linux libraries needs to be compiled with D6641 applied,
otherwise, depending on configuration, it's possible to run into
duplicated zlib symbols error.
Differential Revision: https://developer.blender.org/D6642
|
|
This code has been moved into the draw manager.
|
|
|
|
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming.
Reviewed By: sergey
Maniphest Tasks: T59995
Differential Revision: https://developer.blender.org/D3855
|
|
After this commit it should be possible to share the same deformation
formulas that are used in the Elastic Deform brush with other areas of
Blender such as Grease Pencil or proportional editing.
This also removes a lot of code from sculpt.c that is not direclty
related to sculpting.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6281
|
|
Resolve linking issues, warnings.
|
|
|
|
The term suggestions on it's own is too ambiguous, use BKE_text prefix.
|
|
The term mirror on it's own is too ambiguous, use BKE_mesh prefix.
|
|
Custom profiles in bevel allows the profile curve to be controlled by
manually placed control points. Orientation is regularized along
groups of edges, and the 'pipe case' is updated. This commit includes
many updates to comments and changed variable names as well.
A 'cutoff' vertex mesh method is added to bevel in addition to the
existing grid fill option for replacing vertices.
The UI of the bevel modifier and tool are updated and unified.
Also, a 'CurveProfile' widget is added to BKE for defining the profile
in the interface, which may be useful in other situations.
Many thanks to Howard, my mentor for this GSoC project.
Reviewers: howardt, campbellbarton
Differential Revision: https://developer.blender.org/D5516
|
|
|
|
This solves performance issues on some computers where there is significant
threading overhead. Rather than doing the complicated work of optimizing our
own task scheduler, use TBB which appears to work well. The downside is that
we have another thread pool, but it is already there when using OpenVDB voxel
remesh.
For future releases we can switch to using TBB to replace our task scheduler
implementation entirely, and use the same thread pool for BLI_task, Cycles,
Mantaflow, etc.
Differential Revision: https://developer.blender.org/D6030
|
|
|
|
This patch adds paint symmetry support to Quadriflow. It bisects and mirrors the input and the output from the remesher to build the final mesh using the preserve boundary option.
This is also an important performance improvement in Quadriflow because it only needs to process half of the mesh with half the resolution.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D5855
|
|
Is intended to be used to generate an array of coordinates of coarse vertices
placed to the final subdivided position.
|
|
Just some higher level functions to access topology information.
|
|
When enabled prefetching(preview panel>view settings), a pernament running job
is created, that will render frames in the background until the cache is full.
If the cache is not filled fast enough, prefetch job suspends itself
at the last moment and will wait until it has chance to "catch up".
Effectively this will decouple rendering to separate thread, so rendering
itself is a bit faster.
Cache recycling behavior will be changed to "free furthest frame to the left
of playhead if possible, otherwise rightmost frame".
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5386
|
|
|
|
|
|
dna_type_offsets.h must be generated before we use it in blenkernel,
similar to what we already do for blenloader.
|
|
This provides an API to access structs
with their members set to default values:
- DNA_struct_default_get(name)
- DNA_struct_default_alloc(name)
Currently this is only used for scene & view shading initialization,
eventually it can be used for RNA defaults and initializing
DNA struct members on file reading.
|
|
Preparing for the bigger changes which will be related on passing
dependency graph to various callbacks which need it.
Differential Revision: https://developer.blender.org/D5725
|
|
These functions deal with voxel remeshing of Mesh data,
and aren't related to MOD_remesh.c for e.g.
Name so other kinds of remeshing wont cause confusion.
|
|
The voxel remesher introduces a new workflow for sculpting without any of the limitations of Dyntopo (no geometry errors or performance penalty when blocking shapes). It is also useful for simulations and 3D printing.
This commit includes:
- Voxel remesh operator, voxel size mesh property and general remesh flags.
- Paint mask reprojection.
- Geometry undo/redo for sculpt mode. This should support remesh operations as well as future tools that modify the topology of the sculpt in a single step, like trimming tools or mesh insert brushes.
- UI changes in the sculpt topbar and the mesh properties pannel.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5407
|
|
Simplify preferences by removing the ability to load them from
either the startup.blend or userpref.blend.
Also simplifies updating default preferences by moving
them to a struct definition.
|
|
|
|
Was removed when removing sorted libs however it's needed for stubs.
|
|
|
|
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
|
|
|
|
Having this in blenkernel caused bad level calls to bf_editors_anim,
causing tests that use 'blenkernel' to require almost all libraries.
(complicating gtest linking & causing large binaries).
|
|
Tested to work on Linux and macOS.
This will be enabled once all platforms are verified.
See D4684
|
|
|
|
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.
Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.
See T46725.
|
|
|
|
On CCG side it is done similar to displacement, where we have
a dedicated functor which evaluates displacement. Might be seemed
as an overkill, but allows to decouple SubdivCCG from mesh entirely,
and maybe even free up coarse mesh in order to save some memory.
Some weak-looking aspect is the call to update normals from the
draw manager. Ideally, the manager will only draw what is already
evaluated. But it's a bit tricky to find a best place for this since
we avoid dependency graph updates during sculpt as much as possible.
The new code mimics the old code, this is how it was in 2.7.
Fix shading part of T58307.
|
|
Following removal from C source code.
See: 8c68ed6df16d8893
|
|
|
|
|
|
This commit makes it so that subsurf/multires modifiers will respect
the WITH_OPENSUBDIV option. The WITH_OPENSUBDIV_MODIFIER option is
now gone.
For artists it mean that subsurf modifier will behave same as it is
planned for 2.80. Multires will now support sculpting, but it has some
known limitations. Those will be worked on before the final release.
If OpenSubdiv is disabled, no subsurf/multires functionality will
present.
For the details see:
https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Modeling#Subsurf.2FMultires
|
|
This is needed for keymaps to define their own options,
which can include left/right mouse select.
This can also help to us to provide popular keymap tweaks as options,
so users can easily fit blender to their workflow with well supported
adjustments which don't give the overhead of having to maintain
your own keymap, which become out-dated when operators change.
|
|
We already had a BKE_main.h header, no reason not to put there
Main-specific functions, BKE_library has already more than enough to
handle with IDs and library management!
|