Age | Commit message (Collapse) | Author |
|
* Cleanup for previous commit and reduce some local variable referencing
* Add support for brushes that operate on frontfaces only and do not
show the option for those brushes. Currently only clay strips is in the
list but this may change according to artist feedback. This should take
care of the "sticky" surface problem completely.
|
|
Made it so dynamic topology will flush changes from
SculptSession->bm to Object->me.
Used the same approach as sculptsession_bm_to_me does,
but instead of using DAG_id_tag_update used in-place
DerivedMesh release. Otherwise this lead to some
update issues resulting in missed object after render.
Also fixed multires modifier not being applied for
render when rendering from dyntopo sculpt mode.
P.S. Apparently sculpsession_bm_to_me was declared
in BKE_paint.h but implemented in object.c.
Rather confusing and better make it so this
functions are declared and implemented in
consistent files. But will solve this in a
separate commit.
|
|
|
|
* Clobbering enum
* Cursor overlay not dependent on mapping (again!)
* Brush overlay not updating when size is tweaked
|
|
Allow separate control for tex/mask/cursor overlay. This commit implements
separate overlays for mask textures and cursor curves. The user can turn on
and off separate parts of the overlay by using the appropriate widgets.
The cursor overlay widgets are located at the tool selection panel
Also fixed alpha masks not getting correctly masked and mask texture mapping
not having the correct update callback
|
|
Made it so average coordinate of previous stroke is used as
a viewport rotation center when Rotate Around Selection is
enabled in user preferences.
|
|
|
|
next to the overlay alpha.
|
|
|
|
* Fix precision overflow issue with overlay previews,
* Expose alpha mask mapping to UI (still not functional but coming soon).
* More overlay refactoring:
Overlay now does minimal checking for texture refresh.
Instead, we now have invalidation flags to set an aspect of the brush
overlay as invalid. This is necessary because this way we will be able to
separate and preview different brush attributes on the overlays, using
different textures:
These attributes/aspects are:
Primary texture (main texture for sculpt, vertex, imapaint)
Secondary texture (mask/alpha texture for imapaint)
Cursor texture (cursor texture. It involves brush strength and curves)
Modified the relevant RNA property update functions and C update callback
functions to call the relevant cursor invalidation functions instead
of checking every frame for multiple properties.
Properties that affect this are:
Image changes, if image is used by current brush,
Texture slot changes, similarly
Curve changes,
Object mode change invalidates the cursor
Paint tool change invalidates the cursor.
These changes give slightly more invalidation cases than simply
comparing the relevant properties each frame, but these do not occur in
performance critical moments and it's a much more elegant system than
adding more variables to check per frame each time we add something on
the system.
|
|
ALERT! POSSIBLE BREAKING COMMIT, ESPECIALLY FOR SCULPT!
Separate the sculpt sampling function so that it can be reused
from other paint systems. This includes updating of the relevant
coordinates for anchored and rake style brushes, which are now
being updated as part of the stroke system.
I left only code for area-style brush texture mapping in sculpt
code, since it requires a few data structures not present on other
paint systems.
This commit makes it almost as easy to support rake on other systems as
exposing the python UI for it. Also it makes it totally possible to
have texture painting capabilities in vertex paint too :) These commits
will follow very soon.
Also, even if I did my best to keep the code from breaking, (even fixed a
leftover bug from coordinate changes) this is a big change. Please test!
|
|
* Projection painting files reside in paint_image_proj.c
* 2d projection files reside in paint_image_2d.c
* Common operator/paint operation code resides in paint_image.c
All old code layout is out. Phew...Now we can at least concentrate on
each system separately when debugging this beast. We could even separate
the paint structs for 2d/projective more easily should we choose to do
so.
|
|
|
|
This is as close as I can get to keeping the old code intact. After this
commit, I will have to change existing code paths, making testing of
functionality harder.
Changes:
* Keep only projective texturing code in paint_image_proj.c
* Move 2D code to paint_image_2d.c. This needed the introduction of
allocation/cleanup functions for the relevant structures.
* Common code interface for both modes stays in paint_image.c (which
still includes all old code, system should work as it did with the
exception of non-projective 3D paint mode) and is made public. This is
not a lot of code, only rectangle invalidation and undo system.
* Changed the naming in the new code slightly: imapaint_ prefixed functions refer to
common functions used by both systems, paint_2d_ prefixed to 2d
painting. There will be an interface for the projection painting as
well. Probably there is some leftover naming conversions to do.
TODO:
* Move operator init/exec/modal to common interface file
* Get rid of old BKE_brush_painter_paint, now brush_painter_2d_paint.
All code uses stroke system for the stroke management
* Write space pressure management for the paint stroke system (for other
systems to access as well :) )
* Move texture paint tablet presssure exception code for old bugs to
stroke system (makes me wonder...aren't other systems also influenced by
these pressure issues?) or up in the function hierarchy inside texture
paint. This code is still not there so users with tablets may notice
some issues.
* possibly change other systems to pre-multiply pressure with the
relevant influenced attributes in the stroke function. This could get
tricky though and it's possible that it could backfire.
|
|
|
|
It was caused by image threading safe commit and it was noticeable
only on really multi-core CPU (like dual-socket Xeon stations), was
not visible on core i7 machine.
The reason of slowdown was spinlock around image buffer referencing,
which lead to lots of cores waiting for single core and using image
buffer after it was referenced was not so much longer than doing
reference itself.
The most clear solution here seemed to be introducing Image Pool
which will contain list of loaded and referenced image buffers, so
all threads could skip lock if the pool is used for reading only.
Lock only needed in cases when buffer for requested image user is
missing in the pool. This lock will happen only once per image so
overall amount of locks is much less that it was before.
To operate with pool:
- BKE_image_pool_new() creates new pool
- BKE_image_pool_free() destroys pool and dereferences all image
buffers which were loaded to it
- BKE_image_pool_acquire_ibuf() returns image buffer for given
image and user. Pool could be NULL and in this case fallback to
BKE_image_acquire_ibuf will happen.
This helps to avoid lots to if(poll) checks in image sampling
code.
- BKE_image_pool_release_ibuf releases image buffer. In fact, it
will only do something if pool is NULL, in all other case it'll
equal to DoNothing operation.
|
|
Moved the GPU function gpu_bmesh_face_visible() to BKE_paint and
inverted the test to match equivalent tests for other mesh types:
paint_is_bmesh_face_hidden().
Changed BKE_pbvh_bmesh_node_save_orig() to not save hidden faces into
the triangle array.
Modified the non-use-original branch of pbvh_bmesh_node_raycast() to
skip hidden faces.
Fixes bug #33914:
projects.blender.org/tracker/index.php?func=detail&aid=33914&group_id=9&atid=498
|
|
* Add a detail_size field to the Sculpt struct, two new sculpt flags,
and a Mesh flag for dynamic-topology mode; that's it for file-level
changes needed by dynamic topology
* Add RNA for the new DNA field and flags
* Add a new icon for dynamic-topology created by Julio Iglesias. TODO:
update the icon for the new SVG icon format
* Add a SculptSession function for converting from BMesh to Mesh,
handles reordering mesh elements and setting face shading
|
|
Added option to display object's diffuse color multiplied by sculpting
mask. This option could be found in Options panel of toolshelf when in
sculpting mode.
Thanks to Nicholas and Brecht for reviewing the patch!
|
|
|
|
|
|
doesn't work if weight paint mode is active
Some operators like curve presets, color sample and some more were using object's
mode to distinguish in which mode user is currently painting. Such approach fails
in cases when there's paint mode active in 3D viewport and Image Editor.
Changed logic here to use some context's state like active space which helps
distinguishing current paint mode more accurate.
Ported all areas which uses paint_get_active() to new paint_get_active_from_context().
There're still some calls to paint_get_active(), but that shouldn't be harmful due
to that places indeed have object's mode as priority when getting paint mode.
|
|
|
|
|
|
|
|
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.
|
|
Changed the create_vert_poly_map function to return a more compact
structure. Memory saved will vary depending on the mesh, but typically
it should be about one third of the old size.
|
|
Updates SDNA, customdata functions, and file read/write. Also adds
accessor functions to BKE paint.
|
|
|
|
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.
|
|
saves slowdown of having to maintain tesselation of base mesh data)
|
|
spesific
- some merges added lines in multiple times
- removed some NULL checks that were only in bmesh
- enable cycles by default (was disabled because it used not to work)
- make formatting match
|
|
|
|
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
|
|
- added API examples for mathutils.Color/Euler/Quaternion/Matrix.
- corrected own bad spelling matricies --> matrices.
- minor pep8 edits.
- update CMake ignore file list.
|
|
|
|
|
|
|
|
|
|
- removed some unused functions.
- renamed vars to make more sense paint_vertex.c 'flags' --> 'lock_flags'
- some odd modifications were made in unrealted, commented code, copy these back from trunk.
- rename vertex_group_fix 'cp' property to 'accuracy'
- make style more consistant with trunk.
- remove 'Radish' comments.
|
|
Added a tool-tip to the "fix deforms" op.
Removed code markers:
"Radish"
|
|
They weren't & aren't meant to show ownership, they just help me navigate my related code.
|
|
|
|
|
|
the include path from CMake & SCons.
* ED_curve_editnurbs --> curve_editnurbs
* ED_sculpt_modifiers_changed --> object_sculpt_modifiers_changed
|
|
Weight Paint Vertex Select tweaked to act like edit mode's select and Circle select was added, but clipping is not working properly for either.
Select all was added too, but to the Q key until I look into overriding A's select all bones.
The select vertices checkbox was moved to the header, but it does not force face select mask to turn off yet--and it doesn't have the correct icon.
There will definitely be an update tomorrow to fix the problems with all or most of the issues.
|