Age | Commit message (Collapse) | Author |
|
can be reused by other paint systems too.
|
|
did that anyway, just kept the result in an intermediate variable)
|
|
also rename some functions to match our convention
|
|
|
|
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
|
|
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.
|
|
|
|
history operator (Ctrl + Alt + Z).
This will only show paint operations now while in an image paint mode.
The caveat is that user can delete previous paint operations too (even
on images not on the canvas currently) so it needs some care. This is
consistent with regular undo behaviour though.
Sculpting also suffers from lack of Undo history support, this will be
added in a separate commit.
|
|
|
|
sculpted object if last sculpt stroke ends outside the mesh.
Code here used the last true location which is invalid in that case,
just reuse the average stroke location instead.
|
|
an undo if we are in image paint mode and use the paint undo stack. Also added missing GPU update.:
|
|
masking, like lasso selection.
|
|
Made it so average coordinate of previous stroke is used as
a viewport rotation center when Rotate Around Selection is
enabled in user preferences.
|
|
is a multi-res modifier).
|
|
DO_MIN/MAX re-reading same value from array 4 times when it can do once (use minf rather then MIN2, same for maxf)
|
|
|
|
|
|
Enables the NUMPERIOD view centering operator to work in sculpt mode. Hitting NUMPERIOD while in sculpt mode will center the view on the end of the last sculpting stroke made by the user.
This is useful for quickly refocusing on the current work area without fussing with the view controls.
It does not zoom into the stroke (slide only).
It does nothing if there have been no strokes.
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
the include path from CMake & SCons.
* ED_curve_editnurbs --> curve_editnurbs
* ED_sculpt_modifiers_changed --> object_sculpt_modifiers_changed
|
|
|
|
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?
|
|
The tool-redo depends on a working undo system, so it can rewind
a step and then redo operator with new settings. When a user
disables undo, this won't work.
Now the properties for redo operator (toolbar, F6) will grey out
when a redo isn't possible.
|
|
Now operator redo will look for an undo push with the same name in both the
paint/sculpt and global undo stack.
|
|
|
|
|
|
|
|
* This is experimental, the file format may change still!
* Helps reduce memory usage, keeps .blend files smaller, and makes
saving quicker when not editing multires.
* This is implemented at the customdata level, currently only the
multires displacements can be stored externally.
ToDo
* Better integration with object duplication/removal/..
* Memory is not yet freed when exiting sculpt mode.
* Loading only lower levels is not supported yet.
|
|
paint_undo.c file, to be reused for sculpt.
|
|
branch until we merge to trunk.
|
|
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
|
|
* 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.
|
|
* Image painting back. 2d paint, 3d paint and projection, undo,
pressure, repeating paint operations, etc should all work.
Drawing cursor needs a bit of work, only gets shown when enabling
texture paint mode now.
* Move sculpt, image paint, and vertex/weight paint into a single
sculpt_paint module. Doesn't make much difference now, but nice
to have it together for better integration and consistency in
the future.
|
|
|
|
shiftkey for flipping stroke direction in or out
|
|
|