Age | Commit message (Collapse) | Author |
|
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).
|
|
|
|
|
|
|
|
|
|
Uses HKEY for border hide, CTRL+HKEY for border show, and ALT+HKEY for
show all.
Documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/PartialVisibility
Code review:
http://codereview.appspot.com/5695043
|
|
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
polygon version of dm->getFaceMap(ob, dm)
sculpt uses this for checking connectivity.
|
|
Only affected sculpt.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
the include path from CMake & SCons.
* ED_curve_editnurbs --> curve_editnurbs
* ED_sculpt_modifiers_changed --> object_sculpt_modifiers_changed
|
|
- Constructive modifiers are enabled by default in sculpt mode.
- There's option to disable all constructive modifiers in the "Options"
panel of toolbox in sculpt mode,
- Use one column in options panel to make strings easier to read
- No modifiers would still be applied on multires
|
|
* Removed some fields from struct SculptSession:
- Fields drawobject, projverts, and previous_r were completely
unused
- Field `ob' was really unnecessary, changed sculpt functions
to pass the object rather than the SculptSession
This removal of `ob' from SculptSession should should make it a little
easier to continue generalizing paint/sculpt functionality.
There should be no visible changes from cleanup.
|
|
|
|
|
|
Used a crazyspace approach (like in edit mode), but only modifiers with
deformMatricies are allowed atm (currently shapekeys and armature modifiers only).
All the rest modifiers had an warning message that they aren't applied because
of sculpt mode. Deformation of multires is also unsupported.
With all this restictions users will always see the actual "layer" (or maybe
mesh state would be more correct word) they are sculpting on.
Internal changes:
- All modifiers could have deformMatricies callback (the same as deformMatriciesEM but
for non-edit mode usage)
- Added function to build crazyspace for sculpting (sculpt_get_deform_matrices), but it
could be generalized for usage in other painting modes (particle edit mode, i.e)
Todo:
- Implement crazyspace correction to support all kinds of deformation modifiers
- Maybe deformation of multires isn't so difficult?
- And maybe we could avoid extra bad-level-stub for ED_sculpt_modifiers_changed
without code duplicating?
|
|
More cleanups: moved a function declaration to the correct module,
removed old/incorrect comments, marked more things with TODO where
appropriate, refactored copy-pasted function, de-duplicated code.
|
|
- remove some redundant declarations
- changed VertexTangent and Path structs to avoid compiler alignment padding.
|
|
'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
|
|
- removed DNA_brush_types.h from DNA_scene_types.h (and some other similar cases)
- removed DNA_wave_types.h (never used)
- removed Main.wave
|
|
https://svn.blender.org/svnroot/bf-blender/branches/soc-2010-jwilkins
See log of that branch for details.
|
|
the Basis
PBVH used the same verts array as mesh data and shape key/reference key coords
were applying on the mesh data, so on some refreshing undeformed mesh was
displayed.
Added utility functions to get vert coords from key block, apply new vert coords
on keyblock and function to apply coords on bpvh, so now pbvh uses it's ovn
vertex array and no changes are making to the mesh data.
Additional change:
Store key block name in SculptUndoNode, so now shape wouldn't be copied to
wrong keyblock on undo
|
|
Fixes various crashes and redraw problems, most noticeable new feature
is that you can now sculpt on a multires mesh with deforming modifiers
preceding it.
I've left out support for sculpting on multires with enabled modifiers
following it, in this case only the base mesh can be sculpted now. The
code changes needed to do this are just too ugly in my opinion, would
need a more torough redesign which I don't think we should try now. In
my opinion this is also not really an important case, since it's going
to be incredibly slow anyway to run a modifier on a high res mesh while
sculpting.
So, to summarize current state:
* Fastest sculpting: base mesh with no modifiers or multires with only
modifiers preceding it.
* Slower sculpting: base mesh with modifiers, depends on the speed of
the modifiers.
* Not supported: multires mesh with modifiers following it.
|
|
|
|
levels, child particles, and shadow/SSS/AO quality.. Now also works on what
is displayed in the 3d view instead of only rendering, see panel in the scene
properties.
Most file changes were to make scene available in the isDisabled modifier
callback function.
|
|
|
|
that it is able to store changes in the mesh more compact than global undo.
It doesn't integrate well with multires yet, will tackle that when I start
looking into multires, for now still focusing on sculpt on regular meshes.
|
|
* Screen keymap is now split up in two, some of the area/region
manipulation operators here need to be handled before others.
* Moved paint/sculpt/sketch out of the 3d view keymap, these were
there as a workaround, now with keymap poll no longer needed.
* Also fixes #19297, 3d cursor moves when combing in particle mode.
|
|
* Removed the BKE_sculpt file and moved it's contents (basically just the sculpt session struct) to BKE_paint
|
|
|