Age | Commit message (Collapse) | Author |
|
* Support for Rake in projective paint (2D painting will be a separate
commit)
* Support for smooth stroke across all paint systems
|
|
|
|
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!
|
|
which have been removed.
|
|
- move recursive bone/parent check into ED_armature.h
- remove unused vars
- use const for paint vector args.
|
|
zooming because spacing used to happen in unscaled screen space
|
|
* 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.
|
|
code now does not use painter_2d_paint at all. Made sure the approprate
variables of painter_2d are still initialized (They may be refactored to
become part of the ImagePaintState struct)
* Enable pressure control for new code path in texture paint. This revealed a bug, also present in blender 2.66: Size pressure is broken.
This was pretty interesting for me because it indicates that we could support
dynamic size in texture paint: (See anchored brushes)
|
|
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.
|
|
Adding new file paint_image_proj.c which includes the projective texture painting part of texture
painting, using the stroke system. To access the new code path use Shift-LClick.
The new code path still is problematic with tablet pressure and I will be looking
into ways to unify this across paint systems next.
The old code is still present and can be accessed by regular Lclick as usual.
Also removed 3D (non-projective) painting from 3D viewport.
TODO:
* Add pressure influence code to stroke, remove from every other paint
system code, including texpaint.
* Put UnifiedPaintSettings update in PaintStroke code.
|
|
brush_drawcursor to a more indicative of its users name until paint
cursor unification is done.
|
|
|
|
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.
|
|
disabled).
|
|
- blends from current weight into alpha zero.
- uses brush alpha & curve.
- respects weight paint vertex/face select modes.
- updates realtime.
Access With
- Alt+LMB (linear gradient)
- Ctrl+Alt+LMB (radial gradient)
note:
- WM_gesture_straightline_* are used but not well suited to this task, may end up replacing with own modal operator.
- Key handling works but needs to be done better.
|
|
then they needed to be.
update to clang_array_check.py - parse function definitions lazily for some speedup.
|
|
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.
|
|
Averages input samples to make the brush stroke smoother. Only mouse
location is averaged right now, not pressure/tilt/etc.
The DNA is in struct Paint.num_input_samples, RNA is
Paint.input_samples. In combination with PaintStroke usage this change
applies to sculpt, vpaint, and wpaint.
The range of useful values varies quite a bit depending on input
device; mouse needs higher values to match tablet pen, so set max
samples pretty high (64).
Release note section:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Sculpting#Input_Stroke_Averaging
|
|
|
|
Add a new mode, PARTIALVIS_MASKED, to the PAINT_OT_hide_show operator.
|
|
|
|
|
|
If the RMB has not been released after starting a sculpt stroke, then hitting escape will cancel the stroke in progress and undo any changes to the mesh.
This is a slightly faster work-flow than using undo, is a feature available in other paint programs, and also puts in place the infrastructure to add other keys later that could tweak strokes in different ways.
|
|
use derived mesh tessfaces since the mesh doesnt ensure this, also means non-project-painting in the viewport works with modifiers now.
|
|
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
|
|
already used a lot and part of proposed style guide).
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
Only affected sculpt.
|
|
=========================
Documentation: http://wiki.blender.org/index.php/User:Psy-Fi/UV_Tools
Major features include:
*16 bit image support in viewport
*Subsurf aware unwrapping
*Smart Stitch(snap/rotate islands, preview, middlepoint/endpoint stitching)
*Seams from islands tool (marks seams and sharp, depending on settings)
*Uv Sculpting(Grab/Pinch/Rotate)
All tools are complete apart from stitching that is considered stable but with an extra edge mode under development(will be in soc-2011-onion-uv-tools).
|
|
Added some comments, constified a param, and moved a couple things
around.
|
|
One function converts bounding boxes to screen space, the other
converts a screen-space rectangle to 3D clipping planes.
Also const-ified some parameters in the ED_view3d API.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
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.
|
|
Removed the drawSelectedVerts and added drawSelectedVertices, which uses dm->foreachMappedVert.
In calc_weightpaint_vert_color():
Made the weight paint color black and return instead of input=-1
Made the pose bone selection normal when multi-paint is inactive.
Name fix for functions using mv instead of mvert.
Used vector functions provided by the math lib.
Changed some MEM_callocN references to be stacks.
Changed dm_deform_clear to use ob->derivedDeform primarily
Made the variable "float **changes" into "float (*changes)[2]"
Used CTX_data_active_object() in place of CTX_data_pointer_get_type()
Added the invert selection hotkey "Ctrl+I" to weight paint's vertex mask.
|
|
(Shift+K)
Removed my unreferenced vars
|
|
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.
|
|
in invoke callback. This prevents unfreed memory blocks when quiting
Bledner with modal operator running.
|
|
mode
really todo :) but still needs to be done.
Split this into 2 operators, works like 2.4x
- Ctrl+LMB samples weight.
- Shift+LMB selects vertex groups.
|
|
mval args const elsewhere too.
|
|
Patch to make the radial control more generic with RNA. Patch was
reviewed here: http://codereview.appspot.com/4280080/
Prior to this update, the radial control code in trunk had generic
parts of the radial control implemented as an incomplete operator
within WM. Then each different user of the radial control had to
implement a separate operator to actually pass in specific brush data
-- e.g. sculpt's brush size, vpaint's brush size, etc.
This patch removes all the extra operators and makes the WM operator
do everything. It now takes several RNA path strings as its properties
-- the only required property is data_path, which specifies the data
to be modified by the radial control. The other paths affect display
in various ways, e.g. rotation, color, etc.
In addition to decreasing some duplicate paint brush code, these
updates make it pretty easy to enable radial control for other
purposes (and it can be set up entirely though python or keymaps, no
extra C code needed.)
|
|
Paint strokes now can be mapped to any key. The operators now store the
event it was started with, so it ends with a release. Even hotkeys work
(while hold).
|
|
|
|
also added hide-unselected option to armature mode.
|
|
|
|
McGrath (troubled)
Quite silly fix, not sure if it could be smarter with current events/brushes design.
Use pressure_value from first brush step for brushes which don't support strokes -- thumb.
brush, brushes with anchored stroke method.
Should be fixed in nicer way after events redesigning.
P.S. Tried to place pressure saving into invaliants update fuunction, but it seens
that this function wouldn't know about pressure yet.
|
|
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.
|
|
More minor cleanups: fixed names and factored out a function that was
copy-pasted into paint stroke.
|
|
Some minor cleanups: removed `#if 0' code and moved a function into paint_util to avoid `extern' declaration.
|
|
made a number of files build without unused warnings.
|