Age | Commit message (Collapse) | Author |
|
|
|
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
|
|
We are handling a keyblock here, not a whole key(set). Names are alreay a bit confusing,
let's be consistent at least.
|
|
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.
|
|
Yep, at last it's here!
There are a few minor issues remaining but development can go on in
master after discussion at blender institute.
For full list of features see:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting
Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
|
|
also rename some functions to match our convention
|
|
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE
- BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE
- BLI_BITMAP_GET -> BLI_BITMAP_TEST
- BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
|
|
|
|
|
|
Undoing nodes that do not belong to the current object will cause the
saved bmesh log entry to be reverted instead. This entry can belong to
another object though.
This is easy to fix by enforcing name matching (this was borrowed by
edit mode but can definitely be improved) between current object name
and undo node name and deleting older entries.
However there are complications. Deleting dyntopo entries in this way
can leave a brush stroke as first dyntopo log entry. This can present
issues if we attempt to delete that entry since it's deleted mesh
elements may now have had their ids (which would still be valid at the
time) cleaned up. This can result in crashing if we attempt to resculpt
on the mesh. To fix this I have disabled releasing the deleted entries.
This entanglement between bm_log and undo is quite volatile but I hope
the system works better now.
Also minor cleanup, fix unneeded check warning
|
|
Prepend BKE_ to the functions moved in blenkernel for recent bug fix.
|
|
undo didn't work, layer and smooth crashed..
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
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.
|
|
|
|
This is meant to support undo when hiding parts of the mesh.
Also avoid rebuilding the PBVH in that case as well (no nodes split)
|
|
|
|
also replace AT with __func__ since AT expands the full pathname
|
|
|
|
|
|
|
|
|
|
modification. In that case no pbvh needs to be freed and recreated and
we can get away just with draw buffer update (all of them for now. When
pbvh nodes get logged for undo we will be able to only update the
affected ones).
|
|
an undo if we are in image paint mode and use the paint undo stack. Also added missing GPU update.:
|
|
hides that an arg passed is really an array which may be modified by other functions.
|
|
|
|
also correct odd indentation.
|
|
|
|
|
|
to include a few more that gcc is using too.
|
|
|
|
* 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.
|
|
|
|
is a multi-res modifier).
|
|
sculpt_update_mesh_elements().
also add NULL check for BKE_key_from_object(), to avoid unlikely but possible NULL pointer dereference.
|
|
|
|
a linked list by a pointer.
|
|
Fixes bug [#31858] Undo + sculpt mode, which exposed the bug by having
two objects use the same mesh data.
The rebuild variable was initialize to true, so multires data was
getting marked as having GridHidden modified rather than coords
modified.
|
|
|
|
|
|
* Changes to DerivedMesh interface: DMGridData has been removed,
getGridData() now returns an array of CCGElem pointers. Also added
getGridKey() to initialize a CCGKey (implemented only by
CCGDerivedMesh.)
* PBVH: added BLI_pbvh_get_grid_key().
* A lot of code is affected, but mainly is just replacing
DMGridData.co, DMGridData.no, and sizeof(DMGridData) with the
CCG_*_elem functions, removing the reliance on grid elements of
exactly six floats.
|
|
|
|
|
|
|
|
Was caused by earlier refactoring of undo, used index array
before it gets initialized. Fixed by swapping order of copying.
Also changed normals calculation on undo restore to operate on
tessellated data (which sculpt still uses), fixes console warning
print.
|
|
paint/sculpt tools
|