Age | Commit message (Collapse) | Author |
|
kopias on irc, thanks.
|
|
|
|
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.
|
|
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
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
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.
|
|
|
|
|
|
suggestion :)
|
|
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.
|
|
|
|
|
|
|
|
also use bools for paint callbacks
|
|
Issue seems to be caused by thread-unsafe IMB_freeImBuf.
Now use generic BKE_image_release_ibuf to de-reference
image buffer which was acquired from image datablock.
|
|
Summary:
Behaves very much the same as cache for Movie Clip datablock:
- Image now have `MovieCache *cache` field which replaced
legacy `ListBase ibufs`.
This allows image datablock to easily keep of image
buffers which are owned by itself. This field isn't
saved to the file and getting restored on undo steps.
However, cache limit is global for movies, sequences
and image datablocks now. So overall cached image buffers
size will not go above cache limit size in user
preferences.
- Image buffers which are marked as BITMAPDIRTY will never
be freed from the cache.
- Added utility function to iterate over image buffers
saved in movie cache.
- Movie cache cleanup check callback now have ImBuf argument
which can be used in a condition of cleanup.
- Added some utility functions which replaces legacy ibufs
iterations with image cache iteration which happens from
inside a lock.
- Fixed `image_mem_size()` which was only counting one of
the buffers if both float and byte buffer present.
Additional notes:
- `BKE_image_get_first_ibuf()` is rather stupid, but direct
access to ibufs->first was also the same stupid idea.
Would consider avoid this function is another project.
- There are some places which doesn't look threadsafe, but
they already were not so much threadsafe anyway before.
So think not a big deal with solving this later.
Finally solves infinite memory usage by image sequences! :)
Reviewers: brecht, campbellbarton
Reviewed By: brecht
CC: sebastian_k
Differential Revision: http://developer.blender.org/D95
|
|
* Move symmetry options to the paint struct (where all paint systems can
make use of it)
* Rename draw_pressure to stroke_active. This is what is really checked
on those occasions that this is used. Also move turning on/off of this
option to the stroke level and avoid doing it on every stroke system.
* Rename BRUSH_RESTORE_MESH to BRUSH_DRAG_DOT. In image painting this
won't restore any mesh, so better have a name that is directly linked to
what the flag actually does.
|
|
an undo if we are in image paint mode and use the paint undo stack. Also added missing GPU update.:
|
|
OPERATOR_CANCELLED.
|
|
|
|
Thanks to Brecht for the solution!
|
|
during color sampling the cursor of the current brush is disabled. This avoids sampling of the brush cursor for really small brushes. Only caveat is that if operator exec is called then cursor might be visible in new sample location. This is not so common though.
|
|
exiting a paint mode.
|
|
The issue was discussed at blender.org forum:
http://www.blender.org/forum/viewtopic.php?t=28158
|
|
resolves [#36860] sampling color in face select mask
|
|
this was only done in some cases before and it was possible to enable weightpaint+sculpt at the same time when enabling sculpt by directly running the mode switching operator.
add generic function to ensure a compatible mode before entering the new mode (added to each operators exec function)
|
|
after recent change to size of bool.
|
|
|
|
take up a lot of memory.
The operator was recording an array with all stroke points. However this was not
particularly useful, only sculpt mode had exec() implemented to redo the stroke,
but it was not registering the operator anyway so there was no way to access the
data after the operator was done. So no one was using this anyway.
I did now implement exec for the paint modes so you can call the operator with
stroke points from a script.
|
|
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.
|
|
EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere).
|
|
* 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.
|
|
for sample color and exit the operator. Also tweaked stencil to behave
similarly, so it is now possible to assign custom keys to stencil
control.
|
|
* Add a poll function that only activates the operator when a stencil
brush is active
* Change shortcuts to RMouse - translate, Shift - RMouse Scale, Ctrl -
RMouse, rotate. MUCH faster and simpler workflow.
* Change shortcut of colour sampling to S. Sampling is important but not
as important as warranting the Right Mouse button.
* Add a notifier so that toolbar gets updated texture rotation when
rotating the stencil
Also,
* Slight rearrangement of options so that jittering is more accessible
(easily more often used than smooth stroke)
|
|
the tiled overlay is still a bit off, investigating on how to better
correct this, though it may well be non trivial.
|
|
- pass string size to BLI_timestr() to avoid possible buffer overrun.
- quiet warning for mingw.
- include guards for windows utf conversion funcs.
- fix for mistage in edge-angle-selection check.
- some style cleanup.
|
|
Also add random mapping to brushes.
|
|
to integer overflow. One of the beautiful bugs that is sad to see fixed.
Also remove unused timer variable
|
|
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.
=== Dynamic node type registration ===
Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes.
Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2].
=== Node group improvements ===
Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3].
The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there.
[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
|