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
2017-03-30Prevent crash on weight paintDalai Felinto
Weight painting is still wrong, but it doesn't crash any more.
2016-07-28Fix T48965: Cannot Append Palette As Local Datablock.Bastien Montagne
Palette and PaintCurve were totally missing from id_copy/id_make_local switch... :/
2015-08-31Fix T45258, impossible to select brush when removing it from 2dAntony Riakiotakis
painting. Also system added a brush every time it found no paint brush in the system which is not what we would want. Solution: * Brush panel stays visible always, regardless of whether there is a brush or not. * We search for first available brush when we find no brush in paint struct instead of always generating a new one. * Generating and searching for a brush take a mode argument now. Needed some refactoring to users of BKE_paint_init as well. * Did some style cleanups for paint mode enums. Patch is big but it's mostly argument refactoring.
2015-07-16Add tessellation data to DerivedMesh (LoopTri)Campbell Barton
This stores loop indices into the loop array giving easier acess to data such as vertex-colors and UV's, removing the need to store an MFace duplicate of custom-data. This doesn't yet move all internal code from MFace to LoopTri just yet. Only applies to: - opengl drawing - sculpting (pbvh) - vertex/weight paint Thanks to @psy-fi for review, fixes and improvements to drawing!
2015-05-07Fix T44604 bad quality of rake with bezier curves.Antony Riakiotakis
We can calculate tangents analytically for bezier curves, so just make them awesome. New code uses forward differencing calculation for efficiency just like curve calculation. Picture before/after: http://www.pasteall.org/pic/87843
2015-04-17Cleanup: remove unused face normalsCampbell Barton
also use const
2015-04-13Fix adding to paint-curves from the first pointCampbell Barton
- add_index now works when selecting the first point. - sliding now selects the correct handle.
2015-04-04Cleanup: use BKE_sculptsession_* prefixCampbell Barton
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-03-19Remove deleted list for palette colorsCampbell Barton
was used because of UI memory access only.
2015-03-18RNA: palette colors apiCampbell Barton
Methods so Python can manage colors. palette.colors.new()/remove()/clear()/active
2015-02-11Cavity masking - add curve control to cavity mask and move relevantAntony Riakiotakis
structs to paint struct (might be useful for vertex paint too in the future) Cavity masking now has a curve control. The control will set the amount of masking for positive cavity ("pointness") or negative cavity ("cavity") with x axis being the amount of cavity and 0.0 = full cavity, 1.0 = full pointness, 0.5 = no cavity and the y axis being the amount of alpha.
2014-12-29Move average stroke from sculpt session to unified paint settings so itAntony Riakiotakis
can be reused by other paint systems too.
2014-12-29Cleanup: get rid of sculpt minmax and reuse last stroke function (codeAntony Riakiotakis
did that anyway, just kept the result in an intermediate variable)
2014-12-27Brush Texture Angle Goodies:Antony Riakiotakis
This commit includes a few things: * It moves the Rake and Random flags from the brush to the MTex. * The first change allows mask textures to have independent rake support. * Random rotation now has an angle value that controls the width of the effect from the rake or default angle * Rake and Random are now supported together.
2014-10-06Texture painting:Antony Riakiotakis
Do not generate materials/images/UVs if they are missing. Now we spawn a panel ("Missing Data") with operators to generate the missing data and pop a warning if user tries to paint without them. The reason we have reverted this is that it is too easy to end up with more textures than we wanted. It was impossible to enter texture paint without having textures added, and code makes too many assumptions about what user may want. Discussed during Sunday's meeting. This might be a candidate for 2.72a but I'm not sure how other artists will take this (and how refined and crash-free it is), better make a few iterations first. And for interested parties...test please, don't wait until after a release to poke with such issues. Also, add slot operator now adds a new unconnected image node in cycles. Only used in the "Missing Data" panel. This should be a separate commit but I am squashing it into the same commit because it relies too much on changes done here and can be reverted easily if complainstorm occurs again.
2014-09-18PalettesAntony Riakiotakis
* Remove some duplication in deletion code * Fix crash when restoring file from last saved state.
2014-08-13SpellingCampbell Barton
2014-07-21GSOC 2013 paintAntony Riakiotakis
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.
2014-05-14Code cleanup: indentationCampbell Barton
2014-05-07Code cleanup: naming.Antony Riakiotakis
Prepend BKE_ to the functions moved in blenkernel for recent bug fix.
2014-05-07Fix issue discovered while investigating T39950:Antony Riakiotakis
Sculpt mode drawing fails after deleting a subsurf modifier in sculpt mode and undoing. This was quite difficult to spot. Main cause was that mesh data was not synchronized properly between undo and sculpt code because we generated a pbvh on derivedmesh invalidation without really refreshing the rest of the data. This could result in undo and drawing operating on different data. To solve this and avoid bad level calls I had to move quite some code around. Crazyspace is now moved to blenkernel, as did some sculpt calls that make sure sculpt data are properly refreshed.
2014-04-17Refactor to Dyntopo node customdata commit.Antony Riakiotakis
Don't use a dedicated node layer but use temporary int layer instead. Works like a charm as long as we are careful resetting the layer when needed (after pbvh clearing and always after bmesh has been filled in undo) Tip by Campbell, thanks!
2014-04-07Code cleanup: remove unused functions and convert int -> boolCampbell Barton
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-26Paint API: add BKE_paint_select_elem_test: to check on paint selectionCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-21Code Cleanup: use bool for return values and correct commentsCampbell Barton
also remove CDDM_Check, theres no need for it.
2013-09-14Sculpting:Antony Riakiotakis
* Cleanup for previous commit and reduce some local variable referencing * Add support for brushes that operate on frontfaces only and do not show the option for those brushes. Currently only clay strips is in the list but this may change according to artist feedback. This should take care of the "sticky" surface problem completely.
2013-05-15Fix #35362: using dyntopo gives wrong render resultsSergey Sharybin
Made it so dynamic topology will flush changes from SculptSession->bm to Object->me. Used the same approach as sculptsession_bm_to_me does, but instead of using DAG_id_tag_update used in-place DerivedMesh release. Otherwise this lead to some update issues resulting in missed object after render. Also fixed multires modifier not being applied for render when rendering from dyntopo sculpt mode. P.S. Apparently sculpsession_bm_to_me was declared in BKE_paint.h but implemented in object.c. Rather confusing and better make it so this functions are declared and implemented in consistent files. But will solve this in a separate commit.
2013-04-23Allow hiding separate hiding of overlays on stroke.Antony Riakiotakis
2013-04-23Overlay fixes:Antony Riakiotakis
* Clobbering enum * Cursor overlay not dependent on mapping (again!) * Brush overlay not updating when size is tweaked
2013-04-23Overlay refactor:Antony Riakiotakis
Allow separate control for tex/mask/cursor overlay. This commit implements separate overlays for mask textures and cursor curves. The user can turn on and off separate parts of the overlay by using the appropriate widgets. The cursor overlay widgets are located at the tool selection panel Also fixed alpha masks not getting correctly masked and mask texture mapping not having the correct update callback
2013-04-19Fix #34818: Sculpting Mode only rotates around geometry origin (bring bug back)Sergey Sharybin
Made it so average coordinate of previous stroke is used as a viewport rotation center when Rotate Around Selection is enabled in user preferences.
2013-04-18style cleanupCampbell Barton
2013-04-16Option to hide overlay during a stroke. To enable, press the brush iconAntony Riakiotakis
next to the overlay alpha.
2013-04-13code cleanup: warnings + styleCampbell Barton
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-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-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-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-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-19Skip hidden faces in PBVH BMesh ray intersection testNicholas Bishop
Moved the GPU function gpu_bmesh_face_visible() to BKE_paint and inverted the test to match equivalent tests for other mesh types: paint_is_bmesh_face_hidden(). Changed BKE_pbvh_bmesh_node_save_orig() to not save hidden faces into the triangle array. Modified the non-use-original branch of pbvh_bmesh_node_raycast() to skip hidden faces. Fixes bug #33914: projects.blender.org/tracker/index.php?func=detail&aid=33914&group_id=9&atid=498
2012-12-30Add DNA/RNA/BKE infrastructure for dynamic-topology sculpt modeNicholas Bishop
* Add a detail_size field to the Sculpt struct, two new sculpt flags, and a Mesh flag for dynamic-topology mode; that's it for file-level changes needed by dynamic topology * Add RNA for the new DNA field and flags * Add a new icon for dynamic-topology created by Julio Iglesias. TODO: update the icon for the new SVG icon format * Add a SculptSession function for converting from BMesh to Mesh, handles reordering mesh elements and setting face shading
2012-10-22Fix #32522: Object's diffuse color not showing in Sculpt ModeSergey Sharybin
Added option to display object's diffuse color multiplied by sculpting mask. This option could be found in Options panel of toolshelf when in sculpting mode. Thanks to Nicholas and Brecht for reviewing the patch!
2012-07-26code cleanup: use BKE_pain_ prefix for paint funcs. also minor style editsCampbell Barton
2012-07-25mask now draws in the image view, misc minor edits.Campbell Barton
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.