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-04-16Fix some names, and move overlay flag to overlay_flags.Antony Riakiotakis
2013-04-16Option to hide overlay during a stroke. To enable, press the brush iconAntony Riakiotakis
next to the overlay alpha.
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-05code cleanup: quiet some warnings and styleCampbell Barton
2013-03-31style cleanupCampbell Barton
2013-03-31Woot woot commit.Antony Riakiotakis
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
2013-03-27style cleanupCampbell Barton
2013-03-27Paint system:Antony Riakiotakis
Random texture mapping * Support for 2d painting. * Better random generation and useof the result.
2013-03-26style cleanup:Campbell Barton
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
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-25Alpha mask textures porting part 1: Support for projective texturing.Antony Riakiotakis
Also add random mapping to brushes.
2013-03-20code cleanup: use booleans for mesh and selection code.Campbell Barton
2013-03-19Fix: jittered brushes are not jittered, reported by kursad karatas.Antony Riakiotakis
Issue is sharing using global random generator which is shared with particle system which resets the seed due to some scene/option combination. Since it may be desirable to get predictable results with particles, made sure brushes allocate their own random number generator on startup and use that for jittering.
2013-03-17Fix "can't paint" bug no.1, painting with black on image editor did notAntony Riakiotakis
paint. Was own regression when optimizing colour operations. I will not use an alpha bit mask since it may run into portability issues with byte order.
2013-03-15Support for rake in 2D image painting.Antony Riakiotakis
2013-03-14fix reading out of buffer bounds for recent vertex paint commit.Campbell Barton
2013-03-14Fix silly mistake that could lead to crash. Also, slight cleanup/renameAntony Riakiotakis
and comments
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-13fix for 2 errors where the 2d arrays were used as 3d. (out of bounds read).Campbell Barton
also minor code cleanup.
2013-03-13Fix write past end of array in recent texture sampling refactoring commit, andBrecht Van Lommel
a small warning for double const keyword.
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-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-02-15style cleanupCampbell Barton
2013-02-14Fix: Tiled image painting in image editor was broken for float canvas.Antony Riakiotakis
The mask was initialized using texture values, while it needed to be opaque.
2013-02-06style cleanup: some warnigs & spelling.Campbell Barton
2013-02-05Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashesSergey Sharybin
Issue was caused by couple of circumstances: - Normal Map node requires tesselated faces to compute tangent space - All temporary meshes needed for Cycles export were adding to G.main - Undo pushes would temporary set meshes tessfaces to NULL - Moving node will cause undo push and tree re-evaluate fr preview All this leads to threading conflict between preview render and undo system. Solved it in way that all temporary meshes are adding to that exact Main which was passed to Cycles via BlendData. This required couple of mechanic changes like adding extra parameter to *_add() functions and adding some *_ex() functions to make it possible RNA adds objects to Main passed to new() RNA function. This was tricky to pass Main to RNA function and IMO that's not so nice to pass main to function, so ended up with such decision: - Object.to_mesh() will add temp mesh to G.main - Added Main.meshes.new_from_object() which does the same as to_mesh, but adds temporary mesh to specified Main. So now all temporary meshes needed for preview render would be added to preview_main which does not conflict with undo pushes. Viewport render shall not be an issue because object sync happens from main thread in this case. It could be some issues with final render, but that's not so much likely to happen, so shall be fine. Thanks to Brecht for review!
2013-01-22Bugfix #33945Ton Roosendaal
OSX: in HiDPI mode, the brush circle doubled on every use. Was caused by new code storing and setting brush sizes.
2013-01-22Fix projection texture painting crashSergey Sharybin
It was caused by own mistake by not noticing externtex is used not only by render engine. Now this function uses pool passed as argument rather than using R.pool.
2013-01-21Ommit extraneous check for paint tool in 3d mapping case (Only draw toolAntony Riakiotakis
uses this anyway) and avoid copying of coordinate for 3D case.
2013-01-213D mapping for projective texture painting (only for draw brush). UsefulAntony Riakiotakis
to draw with procedural textures on surface of object. 2D painting will still paint as if tiled. When we unify the paint systems, the texture sampling functions will need to be changed. Sculpt uses a slightly different system that passes both screen and 3d coordinates to the sampling function. This commit however is not too disrupting for that however so it can go in now.
2013-01-16Get rid of the BRUSH_FIXED_TEX flag, use mapping modes instead. VersionAntony Riakiotakis
patched all previous texture paint brushes to use tiled mapping since mappping is now shared between 2d and 3d painting.
2013-01-02Code cleanup:Antony Riakiotakis
Separate 2D painting functions away from brush.c, which should implement the brush API and into its own file, paint_2D.c. Ideally projective texturing and 2D painting should be totally separate, however functionality is still interleaved mostly in the BKE_brush_painter_paint function. The functionality of this function can possibly be done using the brush stroke functions instead.
2012-12-15move pbvh into BKE, it used many BKE bad level includes.Campbell Barton
now blenlib/BLI doesn't depend on any blenkern/BKE functions, there are still some bad level includes but these are only to access G.background and the blender version define.
2012-12-15move bpath module from BLI to BKE, it was making many bad level calls into BKE.Campbell Barton
2012-12-14Fixes for correct UI scaling display:Ton Roosendaal
- Move to layer (and more popups) didn't scale yet - User Prefs and render window now open on right location on Mac Retinas - Brush sizes for painting now scale for Mac Retina
2012-11-15Image thread safe improvementsSergey Sharybin
This commit makes BKE_image_acquire_ibuf referencing result, which means once some area requested for image buffer, it'll be guaranteed this buffer wouldn't be freed by image signal. To de-reference buffer BKE_image_release_ibuf should now always be used. To make referencing working correct we can not rely on result of image_get_ibuf_threadsafe called outside from thread lock. This is so because we need to guarantee getting image buffer from list of loaded buffers and it's referencing happens atomic. Without lock here it is possible that between call of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would be called. Image signal handling too is blocking now to prevent such a situation. Threads are locking by spinlock, which are faster than mutexes. There were some slowdown reports in the past about render slowdown when using OSX on Xeon CPU. It shouldn't happen with spin locks, but more tests on different hardware would be really welcome. So far can not see speed regressions on own computers. This commit also removes BKE_image_get_ibuf, because it was not so intuitive when get_ibuf and acquire_ibuf should be used. Thanks to Ton and Brecht for discussion/review :)
2012-10-23rename api functions...Campbell Barton
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-21style cleanup: commentsCampbell Barton
2012-10-12quiet some -Wshadow warningsCampbell Barton
2012-09-30style cleanupCampbell Barton
2012-08-21change curve evaluation functions never to modify curve data (ensures thread ↵Campbell Barton
safety), now initializations has to be done outside evaluation.
2012-08-21code cleanup: don't use magic numbers for curve flag & use bool args for ↵Campbell Barton
curvemapping_changed()
2012-07-29code cleanup: replace MIN2/MAX2 with minf/maxfCampbell Barton
2012-07-26fix some types and incorrect infoCampbell Barton
2012-07-08style cleanupCampbell Barton
2012-05-23code cleanup: double promotion warningsCampbell Barton
2012-05-09code cleanup: color/bw conversion - use BLI color function.Campbell Barton
change modifier to use the average of the RGB since perceptual conversion isn't really needed for modifiers.
2012-05-06style cleanup: BKE_*.c files which deal with library functionsCampbell Barton