Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-03-14Two new Features:Antony Riakiotakis
* Support for Rake in projective paint (2D painting will be a separate commit) * Support for smooth stroke across all paint systems
2013-03-13code cleanup: use const events for modal and invoke operators.Campbell Barton
2013-03-13Texture sampling function refactoring:Antony Riakiotakis
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!
2013-03-12use gcc warning -Wredundant-decls, exposes some odd/duplicate declarations ↵Campbell Barton
which have been removed.
2013-03-11code cleanup:Campbell Barton
- move recursive bone/parent check into ED_armature.h - remove unused vars - use const for paint vector args.
2013-03-10Fix: stroke spacing fails in image editor, we need to account forAntony Riakiotakis
zooming because spacing used to happen in unscaled screen space
2013-03-10Texpaint refactor complete!Antony Riakiotakis
* 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.
2013-03-10* Cleanup: collapse unneeded paint 2d function to the caller. Also, newAntony Riakiotakis
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)
2013-03-07Texture paint refactoring commitAntony Riakiotakis
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.
2013-03-06Texture paint refactoring commitAntony Riakiotakis
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.
2013-03-03Cleanup, move uv sculpt specific code to sculpt_uv.c. Also renameAntony Riakiotakis
brush_drawcursor to a more indicative of its users name until paint cursor unification is done.
2013-02-26Add missing select menu for weight, vertex, texture paint modes.Campbell Barton
2013-01-21Fixed render time regression in Blender InternalSergey Sharybin
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.
2013-01-16fix for airbrush not using tablet pressure (any brush with BRUSH_SPACE ↵Campbell Barton
disabled).
2012-12-22Weight gradient tool for weight paint modeCampbell Barton
- 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.
2012-10-08code cleanup: reduce change the size of some float vectors that were bigger ↵Campbell Barton
then they needed to be. update to clang_array_check.py - parse function definitions lazily for some speedup.
2012-06-04Fix #31093: Brush's "Paint curve presets" in Image paint in UV\Image Editor ↵Sergey Sharybin
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.
2012-05-22Add input sample averaging to PaintStroke.Nicholas Bishop
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
2012-05-11style cleanup: mainly sculpt/whitespaceCampbell Barton
2012-05-11Add support for hiding masked regions.Nicholas Bishop
Add a new mode, PARTIALVIS_MASKED, to the PAINT_OT_hide_show operator.
2012-05-11Add a paint mask operator to clear, fill, or invert the mask.Nicholas Bishop
2012-05-03code cleanup: minor changes to get trunk compiling with strict warnings.Campbell Barton
2012-05-03Patch [#30965] Cancel Sculpt Stroke w/ ESCAPEJason Wilkins
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.
2012-03-28fix [#30666] Texturepaint "Soften" brush gets stuckCampbell Barton
use derived mesh tessfaces since the mesh doesnt ensure this, also means non-project-painting in the viewport works with modifiers now.
2012-03-14Add partial visibility operator including keymaps and menu items.Nicholas Bishop
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
2012-03-03style cleanup - use aligned * prefixed blocks for descriptive comments (was ↵Campbell Barton
already used a lot and part of proposed style guide).
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-01-19Remove stroke parameter from PaintStroke's StrokeGetLocation callback.Nicholas Bishop
Only affected sculpt.
2012-01-17Uv Tools branch GSOC 2011Antony Riakiotakis
========================= 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).
2012-01-16Minor sculpt/paint cleanups.Nicholas Bishop
Added some comments, constified a param, and moved a couple things around.
2011-12-27Factor out some generic parts of the sculpting PBVH redraw planes code.Nicholas Bishop
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.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-09-18Split do_weight_paint_vertex() to isolate the simple case.Jason Hays
Added a tool-tip to the "fix deforms" op. Removed code markers: "Radish"
2011-09-18Changed the branch code markers to say "Radish" in response to a review.Jason Hays
They weren't & aren't meant to show ownership, they just help me navigate my related code.
2011-09-18I made multitude of fixes based on the comments provided online:Jason Hays
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.
2011-07-18Started adding vertex masking--supports regular painting, and setting weight ↵Jason Hays
(Shift+K) Removed my unreferenced vars
2011-07-12Lots of incomplete changes:Jason Hays
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.
2011-06-06Added cancel callbacks to modal operators which allocates memorySergey Sharybin
in invoke callback. This prevents unfreed memory blocks when quiting Bledner with modal operator running.
2011-05-25fix [#27479] Missing 'Select vertex groups under the cursor' in weight paint ↵Campbell Barton
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.
2011-05-20edit gp_stroke_convertcoords not to modify the mval passed to it & make some ↵Campbell Barton
mval args const elsewhere too.
2011-05-12== Radial control ==Nicholas Bishop
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.)
2011-03-01Bugfix #26249Ton Roosendaal
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).
2011-02-27doxygen: blender/editors tagged.Nathan Letwory
2011-02-24face-paint mode operators were not ported from 2.4x yet hide/reveal/sel-swapCampbell Barton
also added hide-unselected option to armature mode.
2011-02-23doxygen: prevent GPL license block from being parsed as doxygen comment.Nathan Letwory
2011-01-15IRC bugreport fix: thumb brush works incorrect when using tablet by Dan ↵Sergey Sharybin
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.
2011-01-08Sculpt/Paint:Nicholas Bishop
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.
2011-01-08Paint/Sculpt:Nicholas Bishop
More minor cleanups: fixed names and factored out a function that was copy-pasted into paint stroke.
2011-01-08Paint/Sculpt:Nicholas Bishop
Some minor cleanups: removed `#if 0' code and moved a function into paint_util to avoid `extern' declaration.
2010-10-15replace SIDE_OF_LINE macro with line_point_side_v2() inline function.Campbell Barton
made a number of files build without unused warnings.