Age | Commit message (Collapse) | Author |
|
With the ultimate goal of simplifying drawing and evaluation,
this patch makes the following changes and removes code:
- Use `Mesh` instead of `DispList` for evaluated basis metaballs.
- Remove all `DispList` drawing code, which is now unused.
- Simplify code that converts evaluated metaballs to meshes.
- Store the evaluated mesh in the evaluated geometry set.
This has the following indirect benefits:
- Evaluated meshes from metaball objects can be used in geometry nodes.
- Renderers can ignore evaluated metaball objects completely
- Cycles rendering no longer has to convert to mesh from `DispList`.
- We get closer to removing `DispList` completely.
- Optimizations to mesh rendering will also apply to metaball objects.
The vertex normals on the evaluated mesh are technically invalid;
the regular calculation wouldn't reproduce them. Metaball objects
don't support modifiers though, so it shouldn't be a problem.
Eventually we can support per-vertex custom normals (T93551).
Differential Revision: https://developer.blender.org/D14593
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
|
|
Also add groups in some files.
|
|
|
|
This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5.
|
|
Those were only shallow wrappers around `BKE_id_copy`, barely used (even
fully unused in some cases), and we want to get rid of those ID-specific
helpers for the common ID management tasks. Also prevents weird custom
behaviors (like `BKE_object_copy`, who was the only basic ID copy
function to reset user count of the new copy to zero).
Part of 71219.
|
|
It used to be an `int mode`.
|
|
Previously, it was kind of a mess. In different places it was using `char`, `short` and `int`.
The changed properties are flags that are operated upon using bit operations. Therefore, the integer type should be unsigned. Since we only use 2 bits of these flags, `uint8_t` is large enough.
Especially note the change I had to make in `RNA_define.h` to make this work.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D8844
|
|
No functional changes
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
Also order return matrices last.
|
|
This changes curve deform code not to set the objects inverse matrix,
this shouldn't cause problems as it's not used elsewhere afterwards.
|
|
- BKE_lattice_deform_data_create was init_latt_deform.
- BKE_lattice_deform_data_destroy was end_latt_deform.
- BKE_lattice_deform_data_eval_co was calc_latt_deform.
|
|
This is an improvement over 2.7x which converted edit-mesh to mesh
(CDDM) for all 3 modifiers.
Overall this increases performance in edit-mode by around 15-20%.
|
|
Move armature/curve functions into their headers,
they were previously in BKE_lattice.h
|
|
Prefer meaningful function names over redundant NULL arguments.
Also clarify variable names as it wasn't obvious the object-data
is part of the object target.
|
|
|
|
|
|
|
|
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
|
|
|
|
Adds the invert vertex group option to the Curve modifier.
Adds a short flag and char pad to the Curve modifier DNA. Passes the flag into the curve_deform_verts function as the weight values are found there and not in the modifiers .c file.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D6746
|
|
Adds the invert vertex group option to the Lattice modifier.
Adds a short flag and modifies the existing char padding for the correct amount.
Adds a .invert_vgroup to the LatticeDeformUserdata.
Passes the flag into the lattice_deform_verts function where the weights around found and used.
For the other calls of lattice_deform_verts function they pass in NULL for the flag in the same way they pass NULL for the vgroup name.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D6747
|
|
Currently supports mesh, armature, lattice, curve & metaballs.
Access from pivot popover.
|
|
This makes the function more predictable since other object
types don't access edit-mode data.
|
|
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
|
|
|
|
|
|
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
|
|
Quiet undeclared variable warning.
|
|
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.
|
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|
|
This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!
Also, use MOD_get_vgroup() helper in modifier code itself and pass
reluting MDeformVert & index to BKE_curve's curve_deform_verts(),
this is simpler and avoids duplicating vgroup handling code.
Also fixes crash when used on lattice.
Related to T57972.
|
|
|
|
This commit adds a new armature modifier for grease pencil. The deformations are done reusing the mesh deform routines.
There is also a new operator in weight paint mode to help the artist to generate weights base on armatures. This operator is required because 2D animation workflow is not equal to meshes when parent an object to armatures.
In the drawing engine has been added the option to handle the Fade object parameter used in armatures to see the strokes while move the bones.
When rename bones, all related data of grease pencil is renamed too. This not only affect new armature code, but also layers parented and hook modifiers.
Thanks @aligorith for his review and help.
|
|
|
|
This commit merge the full development done in greasepencil-object branch and include mainly the following features.
- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.
You can get more info here:
https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/
This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.
Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
|
|
|
|
D3164 by @ranjian0
|
|
|
|
|
|
The mesh parameter of armature_deform_verts() is now const, to indicate
that it's safe to pass ob->data to it directly.
|
|
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
|
|
This was dangerous to do such calculations, and now it is solvable by making
dependency graph more granular in this case. Removing the workaround also saves
us a hassle of passing lots of extra arguments down the evaluation routines.
In theory, we can also remove EvaluationCOntext from constraints evaluation as
well now. But probably better to wait with such removal for now.
This commit effectively reverts 1130c53. Will do a proper fix in dependency
graph itself.
|
|
2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.
Also use const to prevent unexpected modifications.
This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
|
|
This will allow much finer controll over how we copy data-blocks, from
full copy in Main database, to "lighter" ones (out of Main, inside an
already allocated datablock, etc.).
This commit also transfers a llot of what was previously handled by
per-ID-type custom code to generic ID handling code in BKE_library.
Hopefully will avoid in future inconsistencies and missing bits we had
all over the codebase in the past.
It also adds missing copying handling for a few types, most notably
Scene (which where using a fully customized handling previously).
Note that the type of allocation used during copying (regular in Main,
allocated but outside of Main, or not allocated by ID handling code at
all) is stored in ID's, which allows to handle them correctly when
freeing. This needs to be taken care of with caution when doing 'weird'
unusual things with ID copying and/or allocation!
As a final note, while rather noisy, this commit will hopefully not
break too much existing branches, old 'API' has been kept for the main
part, as a wrapper around new code. Cleaning it up will happen later.
Design task : T51804
Phab Diff: D2714
|