Age | Commit message (Collapse) | Author |
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
- 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 a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
undo data is restored.
- Some undo types accumulate changes (image & text editing)
others store the state multiple times (with de-duplication).
This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
manage restoring correct ID's.
Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
Previously this wasn't done, making history fail in some cases.
This can be optimized to skip some combinations of undo steps.
grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.
See D3113
|
|
Sync API changes from 2.8 to master.
|
|
|
|
Ended up removing the need for eval_ctx,
but left it being initialized.
|
|
|
|
|
|
When projecting to the view, cull faces pointing
away from the view normal.
|
|
This makes brush influence into a tube instead of a sphere.
It can be used along the outline of a mesh to adjust it's silhouette.
Note that all this takes advantage of changes from vertex paint,
from testing this seems useful so exposing from the brush options.
|
|
Also use 'const' for brush.
|
|
This makes vertex paint match image painting more closely.
- Add falloff shape option sphere/circle
where sphere uses a 3D radius around the cursor and
circle uses a 2D radius (projected), like previous releases.
- Add normal angle option so you can control the falloff.
- Add Cull option, to paint onto faces pointing away.
Disabling normals, culling and using circle falloff
allows you to paint through the mesh.
|
|
No functional changes.
|
|
|
|
|
|
paint_vertex.c was getting too big, move all code unrelated to
mode switching and modal painting into their own files.
Also replace vertex-color operators region redraw tag /w notifiers.
|
|
GSOC 2017 by Darshan Kadu, see: D2859.
This is a partial merge of some of the features from
the soc-2017-vertex_paint branch.
- Alpha painting & drawing.
- 10 new color blending modes.
- Support for vertex select in vertex paint mode.
|
|
2016 GSOC project by @nathanvollmer, see D2150
- Mirrored painting and radial symmetry, like in sculpt mode.
- Volume based splash prevention,
which avoids painting vertices far away from the 3D brush location.
- Normal based splash prevention,
which avoids painting vertices with normals opposite the normal
at the 3D brush location.
- Blur mode now uses a nearest neighbor average.
- Average mode, which averages the color/weight
of the vertices within the brush
- Smudge mode, which pulls the colors/weights
along the direction of the brush
- RGB^2 color blending, which gives a more accurate
blend between two colors
- multithreading support. (PBVH leaves are painted in parallel.)
- Foreground/background color picker in vertex paint
|
|
|
|
|
|
|
|
That's rather tricky to think of a good threshold here, and
maybe we'd better use something based on the number of faces
instead.
Anyway, let's give it a try this way and see what happens.
|
|
Issue wascaused by the famous OpenMP crap in MSVC2013,
so only way is to use openmp threading if number of BVH
nodes is high enough.
Made it 8 for now, which seems to work rather fine on my
laptop and adult dragon from sintel. But maybe it's to be
adjusted a bit more.
|
|
Sculpt mode drawing fails after deleting a subsurf modifier
in sculpt mode and undoing.
This was quite difficult to spot. Main cause was that mesh data was not
synchronized properly between undo and sculpt code because we generated
a pbvh on derivedmesh invalidation without really refreshing the rest of
the data. This could result in undo and drawing operating on different
data.
To solve this and avoid bad level calls I had to move quite some code
around. Crazyspace is now moved to blenkernel, as did some sculpt calls
that make sure sculpt data are properly refreshed.
|
|
It makes code more tidy (avoids having to call invalidation on a myriad
places). Also makes sure other invalidation cases (some mesh change,
e.g.) work as expected.
|
|
Don't use a dedicated node layer but use temporary int layer instead.
Works like a charm as long as we are careful resetting the layer when
needed (after pbvh clearing and always after bmesh has been filled in
undo)
Tip by Campbell, thanks!
|
|
Store PBVH node ID in CustomData. This avoids a number of hash deletions
and checks/insertions on big hashes.
|
|
|
|
also use bools for paint callbacks
|
|
|
|
hides that an arg passed is really an array which may be modified by other functions.
|
|
|
|
|
|
which have been removed.
|
|
|
|
* User documentation:
wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Dynamic_Topology_Sculpting
* Code review for this and the other dynamic-topology commits:
https://codereview.appspot.com/6947064/
Thanks to Sergey for doing code review!
* Add SCULPT_OT_dynamic_topology_toggle operator to enable or disable
dynamic topology mode
* Most brushes need little modification for dynamic topology, but for
some it won't work well and is disabled. This decision is made in
sculpt_stroke_dynamic_topology().
* For brushes that need original data (e.g. grab brush) the topology
is not updated during the stroke, but some changes to original
vertex data is accessed were made since BMesh works a little
differently from mesh/multires. This is abstracted with
SculptOrigVertData and associated functions.
* Smooth brush gets yet another set of functions, for mesh and
multires and dynamic topology and, separetely, masking
* For most brushes, the topology is updated during the stroke right
before the regular brush action takes place. This is handled in
sculpt_topology_update().
* Exiting sculpt mode also disables dynamic topology
* Sculpt undo works differently with BMesh. Since the contents of
nodes in the PBVH do not remain static during a sculpt session, the
SculptUndoNodes do not correspond with PBVHNodes if dynamic topology
is enabled. Rather, each SculptUndoNode is associated with a
BMLogEntry.
* Sculpt undo gets a few new cases: entering and exiting dynamic
topology does an undo push of all mesh data. Symmetrize will
similarly push a full copy of BMesh data, although it does so
through the BMLog API.
* Undo and redo in dynamic-topology mode will do a full recalculation
of the PBVH.
* Add some documentation to doc/sculpt.org. This could stand to be
expanded a lot more, for now it mostly contains test cases for the
undo system.
* Add SCULPT_OT_optimize operator to recalculate the BVH. The BVH gets
less optimal more quickly with dynamic topology than regular
sculpting. There is no doubt more clever stuff we can do to optimize
it on the fly, but for now this gives the user a nicer way to
recalculate it than toggling modes.
|
|
* This doesn't make much difference for regular mesh/multires
sculpting, but for dynamic topology sculpting the undo stack isn't
split up by PBVH nodes, so it's more convenient to store the layer
data in PBVH nodes.
* Note that the life cycle of the layer displacement data is
unchanged -- it's only valid during a stroke with the layer brush,
gets free'd when the undo step ends.
|
|
now blenlib/BLI doesn't depend on any blenkern/BKE functions,
there are still some bad level includes but these are only to access G.background and the blender version define.
|
|
then they needed to be.
update to clang_array_check.py - parse function definitions lazily for some speedup.
|
|
is a multi-res modifier).
|
|
|
|
|
|
|
|
|