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-12-10Refactoring/cleanup, borrowed from soc-2013-paint branch.Antony Riakiotakis
* 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.
2013-10-31remove return argument from wmOperatorType->cancel, was only ever returning ↵Campbell Barton
OPERATOR_CANCELLED.
2013-10-11fix [#37031] bones are not selectable in weight paint mode anymoreCampbell Barton
2013-09-10Fix #36577: sculpt area plane texture mapping + random angle did not work.Brecht Van Lommel
2013-08-19Minor optimization for paint systems, initialize the paint curve beforeAntony Riakiotakis
the stroke and skip checking for initialization each time we request the curve value.
2013-08-01Fix a very irritating problem of our stroke system. On small brushes,Antony Riakiotakis
the space stroke would be repeated on unneeded subpixel precision. Since this is not really useful, enforce spacing to be at least one pixel. This makes small brushes quite more responsive.
2013-07-21code cleanup: add break statements in switch ()'s, (even at the last case).Campbell Barton
2013-07-19style cleanup: braces/indentationCampbell Barton
2013-05-24style cleanup: also remove unused varCampbell Barton
2013-05-18Fix for #35373, calling any paint operator from operator search menuAntony Riakiotakis
with mouse crashes blender. Issue here is that paint operator invocation, immediately calls modal, which checks if event is the same as initialization event plus keyup. Since using the mouse on amenu calls the operator on mouse button up, the operator ended immediately and that cause immediate cleanup and crash, Worked around this by forbidding the operator to finish on first modal call (which is expected by all the asserts on invoke anyway). This prevents the crash but requires an extra up event to end. Also, ported part of Jason Wilkins' patch to stroke code to allow for stroke sampling to be done before a dab is first performed and as soon as the stroke begins
2013-05-18style cleanupCampbell Barton
2013-05-18Painting / Sculpting: more tweaks to pressure sensitivityBrecht Van Lommel
* Also do pressure interpolation for brush size and spacing. * Do smoothing of pressure when smooth stroke and sample average is enabled. * Revert the OS X specific pressure change to pressure ^ 2.5, for low pressure values like 0.05 it makes the pressure 100x lower, which is problematic. If we need to adjust the pressure curve it should be done for all platforms. Still weak: * Pressure of first touch on tablet is difficult to control, usually it's low which makes the stroke start out small or soft, but other times not. Finer event capturing at ghost level would help, along with pressure changes without mouse movement, but this may also need different paint stroke logic. * Brush radius is rounded to integers, this gives noticeable stepping. * Brush falloff is not antialiased, gives noticeable aliasing for small brush sizes which was always a problem, but is more common with size pressure control.
2013-05-18Stroke code:Antony Riakiotakis
* Fix crash on 2d painting when no active object is present (NULL pointer dereference in cursor drawing) * Skip conditional on space_stroke function, since this is already checked for on higher level. * Interpolate pressure on spaced strokes.
2013-05-16Fix #35372: sculpting/painting long brush strokes with small brush size wouldBrecht Van Lommel
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.
2013-05-15Attempt to fix #35057 and #35372: slow texture painting performance.Brecht Van Lommel
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.
2013-05-13Fix #35337: sculpt performance regression, partial redraw was not working ↵Brecht Van Lommel
anymore due to paint cursor redraw problem.
2013-05-01Fix missing brush cursor redraw for texture paint when no pixels changed in theBrecht Van Lommel
image, no images need to be refreshed then but the cursors needs to be redrawn still. Otherwise it gets stuck, especially annoying in unexpected cases where the mask has reached the maximum for all pixels in the brush.
2013-04-23Allow hiding separate hiding of overlays on stroke.Antony Riakiotakis
2013-04-22Support more mapping modes for alpha masks. Tiled, stencil and randomAntony Riakiotakis
2013-04-16Option to hide overlay during a stroke. To enable, press the brush iconAntony Riakiotakis
next to the overlay alpha.
2013-04-15rename axis_angle_to_mat3_no_norm() --> axis_angle_normalized_to_mat3().Campbell Barton
this matches closer to convention from existing functions - angle_v3v3() angle_normalized_v3v3(). also added assert to ensure argument given to axis_angle_normalized_to_mat3() is in fact normalized.
2013-04-15WIP, jason's patchAntony Riakiotakis
2013-04-12Paint refactoring commit, non-disruptive (in theory :p)Antony Riakiotakis
* 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.
2013-04-01correct too-big allocation in mesh beautify.Campbell Barton
2013-03-30Tidy up stroke options and make them sexy, aka the paint optionAntony Riakiotakis
sculptification commit. We have a drop menu to select the stroke mode now. Jitter controls appear under stroke panel under all modes (As they should! They stroke control options). Also enable jittering for all modes. I really fail to see why not.
2013-03-30code cleanup: move beauty fill calculation into its own function and some ↵Campbell Barton
style cleanup
2013-03-29Support for brush overlay in texture paint mode. For the image editor,Antony Riakiotakis
the tiled overlay is still a bit off, investigating on how to better correct this, though it may well be non trivial.
2013-03-27Paint system:Antony Riakiotakis
Random texture mapping * Support for 2d painting. * Better random generation and useof the result.
2013-03-25code cleanup:Campbell Barton
- remove unused defines. - quiet some shadow warnings. - bevel, ifdef out some asserts that are too common. - style
2013-03-25Fix #34730, set special brush rotation to zero if brush is not rake orAntony Riakiotakis
anchored.
2013-03-25Alpha mask textures porting part 1: Support for projective texturing.Antony Riakiotakis
Also add random mapping to brushes.
2013-03-16style cleanupCampbell Barton
2013-03-16minor cleanup and calculate rake angle before jittering or resultAntony Riakiotakis
becomes essentially, random
2013-03-15code cleanup: rename BKE_mesh_to_curve_ex --> BKE_mesh_to_curve_nurblist,Campbell Barton
also correct odd indentation.
2013-03-15Fixes for 2d painting:Antony Riakiotakis
* Jittering accounts for zoom * Smooth stroke accounts for zoom * Expose smooth stroke in image paint editor.
2013-03-14style cleanup: odd indentationCampbell Barton
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-13style cleanup: also remove unused defines in paint_image.cCampbell 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-11Feature request for all paint systems that support it: Jittering inAntony Riakiotakis
absolute coordinates. This allows an artist to lower the brush radius while keeping the spread of the brush constant. A toggle under the jitter slider provides the option to switch between relative/absolute.
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-10Fix #34562, leftover from own coordinate conversion refactoring. AlsoAntony Riakiotakis
avoid extraneous OpenGL state chage.
2013-03-10Time to start reaping the benefits of code unification. Support forAntony Riakiotakis
pressure spacing across all paint systems (was supported only for texture painting earlier). Also, switch paint code to use the new code path from now on. No shift-Lclick required anymore.
2013-03-08style cleanupCampbell Barton
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-07Support position jittering on new texpaint code using the stroke system.Antony Riakiotakis
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-05Convert paint stroke code to write region instead of screen coordinatesAntony Riakiotakis
on mouse event coordinates. Every paint mode operated on and converted back to region coordinates, texture paint does so too so this will help in unifying the systems. ALERT! POSSIBLE BREAKING COMMIT: I have tested all paint systems that use the stroke code and they look like they work well but I would appreciate it if more eyes could test this.