Age | Commit message (Collapse) | Author |
|
D2050 by @metaraptor with edits
Adds levels, brightness/contrast, hsv & invert operations.
|
|
|
|
This allows for dragging out shapes that rotate to follow the cursor motion.
Values over 1 can be set for 'interesting' artistic effects.
|
|
label when active.
Poll function of that keymap was slightly... agressive.
|
|
|
|
|
|
|
|
affecting relative size.
|
|
Add simple uvs now does a cube unwrap and pack operation. Result is not
optimal by far but it should not result in crashes and it will be quite
usable for simple cases.
|
|
Do not generate materials/images/UVs if they are missing.
Now we spawn a panel ("Missing Data") with operators to generate the missing data and
pop a warning if user tries to paint without them.
The reason we have reverted this is that it is too easy to end up with more textures
than we wanted. It was impossible to enter texture paint without having textures added,
and code makes too many assumptions about what user may want.
Discussed during Sunday's meeting.
This might be a candidate for 2.72a but I'm not sure how other artists will take this
(and how refined and crash-free it is), better make a few iterations first.
And for interested parties...test please, don't wait until after a release to poke with such issues.
Also, add slot operator now adds a new unconnected image node in cycles. Only
used in the "Missing Data" panel. This should be a separate commit but I am squashing it into the same commit because
it relies too much on changes done here and can be reverted easily if complainstorm occurs again.
|
|
|
|
Disallow kernels bigger than 2x2 for blur/sharpen in projective painting
due to performance considerations.
|
|
This reverts commit 7c7cb01aa5641414d9f0c39ab81df0f57205f362.
The smoothing weights will cause shifting in the image if not calculated
as they were in the branch. Solution for better performance will be to force-clip
kernel to a square of size two for projective painting.
|
|
|
|
Attempt to make soften brush faster by allowing non-symmetric kernels.
Projective painting supports those naturally but for 2D painting there's
a small hack to avoid shifting of the texture. Not totally correct but
it works for now.
|
|
|
|
|
|
New layer in texture painting will now allow entering image parameters,
similar to new image.
|
|
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.
|
|
This can be used to subtract a region from masks but it's not very
user friendly yet. To male this work better, the tool will probably be
brushified later.
|
|
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
|
|
be cached and reused.
|
|
Naming:
Change pressure to size_pressure, it notes correctly that this value is
updated and expected to be used for size updating only.
Change name of cursor function and since it is used for uv sculpting
only now move to the relevant file. Also cleanup unneeded functionality
from function.
Stroke:
Separate updating of stroke variables to invariants (updated when
stroke->init = false) and variants.
|
|
texture nodes.
Adopt a similar system to texture sampling for painting.
|
|
|
|
Issue is that sampling functions did not pass a thread index to the
texture sampler so all threads were contesting for the same pool.
Paint cursors and sculpting that used openmp for threading suffered from
this. Now use omp_get_thread_num to pass the thread number.
|
|
Following problems:
- painting onto a cube asserts immediately (vpaint/wpaint)
- crashes with valgrind (bad memory use)
- the original intended behavior of vertex projection paint no longer works as I intended.
(its constantly refreshing geometry even when no modifiers are applied).
Best get code review for these kinds of changes.
|
|
|
|
Issue here is that coordinates used for projection would not fit the
closest candidate. So it was possible to paint against the mirrored part
of the mesh, which would get clipped on reprojection.
Fix avoids reprojection by storing squared distance, and screen space
coordinates, which we will need again later anyway. Also we now always
paint against the closest vertex always. This is ensured because squared
distances for uninitialized vertices will be MAXFLOAT, thus failing the
strength test.
|
|
also use bools for paint callbacks
|
|
|
|
* Support for symmetry in lasso masking
* Optimize away symmetry multiplication of gravity vector if no gravity
active
* Move flip_v3_v3 to paint_utils (used in masking as well)
* Use OpenMP for mask flood fill too.
|
|
an undo if we are in image paint mode and use the paint undo stack. Also added missing GPU update.:
|
|
OPERATOR_CANCELLED.
|
|
for now.
Used to be ultra terrible but with threading (openmp) there is slightly
better performance
and is ready for testing. To use press shift-ctrl-lclick. Still no
ability to
remove mask. Coming soon.
Also make box selection threaded (openmp) and comment fix.
|
|
masking, like lasso selection.
|
|
|
|
exiting a paint mode.
|
|
old limitation where you could only paint onto one side of a mirrored mesh (weight paint, vertex paint).
|
|
unused defines and correct include guards.
|
|
After the paint refactoring for 2.67, the OpenGL texture was getting updated for
every stroke point, rather than once for every redraw. With a small brush radius
and low spacing the number of stroke points can be quite large, which might have
a big performance impact depending on the graphics card / drivers.
Also for 2D image paint, avoid redrawing the button panels and properties editor
during painting.
There is another possible cause for slowdowns with 3D texture painting which was
not fixed. Projection painting is creating and destroying threads for every stroke
point. Depending on the CPU/OS there might be a lot of overhead in doing that if
the brush size is small.
|
|
brush
size. Interpolated mouse coordinates should not get rounded to integers.
|
|
* 2D image painting support for masking to limit the max contribution of a stroke
to a pixel, to get it working compatible with projection painting. Not strictly
a bugfix, but the inconsistency here was annoying.
* Fix python errors in Texture Mask panel in image editor, was missing overlay
options.
* Clamp paint mask to 0..1 in case some texture exceeds it, this could give black
pixels due to integer overflow.
|
|
|
|
Since the bug was fixed that made blur brush _not_ blur all verts, there is no way to blur vertex colors after baking.
While this was hidden it was useful especially for baking vertex colors.
|
|
Stencil style texture mapping. Ready for field testing and user feedback.
This commit adds stencil like brushes, like those that existed on old ptex branch.
(with the exception of clip colour)
To control the position of the stencil, you use
Q: translation
Shift - Q: scaling
Ctrl - Q: rotation
There's extra work that has been done to make this work:
* Support for coloured overlay in vertex/texture painting
* Also made A button do stroke mode selection like in sculpt mode,
when mask painting is inactive.
There are some TODOs to work on during bcon3:
* Support tiled and stencil mode in 2D painting. Support alpha textures also.
* Tidy up overlay code. There's some confusion there due
to the way we use the primary brush texture sometimes for alpha, other times
for colour control.
WIP design docs will be in
http://wiki.blender.org/index.php/User:Psy-Fi/New_Brush_Tool_Design
|
|
the tiled overlay is still a bit off, investigating on how to better
correct this, though it may well be non trivial.
|
|
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
|
|
too nice but it frees the Ctrl-LClick shortcut and allows us to set
invert mode for other paint tools, such as sharpen vs blur or invert
colour for draw brush. This conflict has existed on GSOC branch, better
resolve now before merging invert functionality.
|
|
from Kevin Mackay (yakca)
|