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-09-16Undo the front-facing only commit for clay strips brushes, it adds anAntony Riakiotakis
attenuation that should really be optional. There's also a minor performance penalty and all this only for one problematic case. In case the tool flattens two surfaces, users can manually set the front face only option. A better non-attenuating way to cull such vertices can be added later. Also flatten brush should calculate the flatten plane from the original vertices or the flattening will not converge for planes offsets different than zero. Reported by Michalis Zissiou, thanks!
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-09-05Ctr-Alt-F radial control operator for texture painting, controls theAntony Riakiotakis
rotation of the brush mask texture. Unfortunately secondary path does not work here because we do not have a permanent switch to choose between primary-secondary brush texture. Use operator property instead.
2013-07-02remove nan copyrights from code added since blender become opensource (copy ↵Campbell Barton
paste errors), also remove BKE_script.h
2013-05-12Image paint: 2D painting now supports texture masks and does masking moreBrecht Van Lommel
consistent with projection painting. Also did some refactoring of this code, moving the brush image creation code out of brush.c and making it consistent with image updating code.
2013-04-30More painting fixes:Brecht Van Lommel
* 2D image painting with textures that contained alpha did not work correctly, had been broken for a while. * 2D image panels texture (mask) panels showed wrong buttons for texture overlay. * Texture map mode 3D now also uses masking, like Tiled and Stencil the texture does not move along with the brush so it works fine. * 2D image paint View mapping did not work correct, especially noticeable with Rake rotation. * Masking is now disabled for the smear tool, this can't really work because the original image is constantly changing and gave artifacts.
2013-04-30Fix #35141: stencil and 3D texture mode did not work with 2D image paint.Brecht Van Lommel
2013-04-30More image painting fixes:Brecht Van Lommel
* 2D image painting support for masking to limit the max contribution of a stroke to a pixel, to get it working compatible with projection painting. Not strictly a bugfix, but the inconsistency here was annoying. * Fix python errors in Texture Mask panel in image editor, was missing overlay options. * Clamp paint mask to 0..1 in case some texture exceeds it, this could give black pixels due to integer overflow.
2013-04-22Support more mapping modes for alpha masks. Tiled, stencil and randomAntony Riakiotakis
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-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-14fix reading out of buffer bounds for recent vertex paint commit.Campbell 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-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-10More cruft remove for 2d painting. Remove functions from brush interfaceAntony Riakiotakis
that were in fact 2d painting specific. Also remove old stroke managing function completely.
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-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-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-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-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-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-05-05code cleanup: brush/camera namingCampbell Barton
2012-05-02Fix wrong unified weight paint value version patch, was doing incorrect ↵Brecht Van Lommel
version check. Fix #31209: weight paint sample & fill not using correct brush/unified value.
2012-04-30Add per-brush weight field.Nicholas Bishop
Patch from Jaggz H, thanks! [#31096] Weight-painting: Brush-specific weights http://projects.blender.org/tracker/?func=detail&atid=127&aid=31096&group_id=9 Each brush's weight can now be set individually, can also enable unified setting (same as size and strength have.) Added readfile code to the patch: subversion bumped to 1, brushes get default weight of 0.5, unified weight enabled by default and value from old vgroup_weight field.
2012-02-29Code Cleanup: remove non existing function declarations.Campbell Barton
added some missing functions too - which are not used yep but should be there for api completeness. * CDDM_set_mloop * CDDM_set_mpoly * BLI_mempool_count
2012-02-28code cleanup: use float vector size in function definitions, and const's ↵Campbell Barton
where the values are unchanged.
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-01-15Fix all remaining unified paint settings uses of current Scene.Nicholas Bishop
Things like brush size and strength accessors now take a scene parameter rather than guessing about which Scene's unified paint settings to use. Setting the size/strength through RNA can now be done separately for the brush or the UnifiedPaintSettings. The UI python code required updating to check whether the size/strength controls should use brush or UnifiedPaintSettings RNA. Radial control also required some updates to switch between the two RNA sources.
2012-01-14ensure functions are not used within FTOCHAR macro since they run 2-3 times.Campbell Barton
brushes were doing curve lookups within this macro for example.
2012-01-13Fix some RNA/scene issuess with unified paint settings.Nicholas Bishop
Added RNA for the unified paint setting flags that matches the Brush RNA. Fixed the getter/setter functions to avoid guessing which Scene's UnifiedPaintSetting to use. The getter functions take a Scene pointer now, the setter functions are removed in favor of a more explicit approach through RNA: Rather than RNA choosing whether a property's value is in the Brush or in the UnifiedPaintSettings, there are now explicit properties for both. The UI code has been modified accordingly to switch the toggle buttons between affecting the Brush and the UnifiedPaintSettings.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-06-07fix for float projection painting, now updating correctly. Antony Riakiotakis
This fix also allows for partial update of the image, speeding up painting. The different code path implemented will be used to upload high resolution images to OpenGL when onion branch is merged. Due to conversion of float textures to/from sRGB, corrections made to brush color sampling to take account of the image profile. This is not 100% correct yet as texture images used for projection painting strokes are not converted to/from sRGB yet(This has been decided due to loss of precision for 8-bit formats). It will have to do for now, though. last-minute update, exr image loading is broken, will fix asap
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-02-18doxygen: blenkernel under core as module.Nathan Letwory
2011-02-14misc small changes:Campbell Barton
- rename rna collection structs Main prefix to BlendData: eg, MainObjects --> BlendDataObjects - printing python collection now prints its type (when available) - renamed shadowed vars in bpy_rna.c. - when making functions static I also made debugging/test functions static, reverse and add definitions to headers instead.
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.
2010-10-30warning/portability fixes.Campbell Barton
2010-09-23bugfix [#23595] Texture paint with a node based brush produces artifactsCampbell Barton
also changed displace modifier not to link object depgraph when not using object texturespace.
2010-08-04Brush/Paint internal changesCampbell Barton
- remove brush array for each Paint struct, just use a single brush pointer. - removed rna function based template filtering. - filter brushes using a flag on the brush and the pointer poll function. - set the brushes using a new operator WM_OT_context_set_id(). TODO - remake startup.blend, currently brush groupings are lost. - rewrite WM_OT_context_set_id() to use rna introspection.
2010-07-27== Sculpt ==Nicholas Bishop
Added a brush reset operator so that a user won't need to reload the default blend to get back default brush settings * New brush.reset operator, resets a brush based on the currently-selected tool * Added UI button in the tools panel TODO: * Only resets sculpt brushes right now, other paint modes should be added * Sculpt polish tool exists only as a Brush, not as a tool; I'd suggest we make it a tool so it can be reset to defaults too
2010-07-22== Sculpt/Paint Fixes ==Jason Wilkins
* Fix: unify strength and size did work consistently with other paint modes * Fix: If [ and ] keys were used to resize a brush it was not possible to increase the size of the brush if it went under 10 pixels * Fix: Made interpretation of brush size consistent across all modes, Texture/Image paint interpreted brush size as the diameter while all the other modes interpret it as radius * Fix: The default spacing for vertex paint brushes was 3%, should be 10% * Fix: due to fixes to unified strength, re-enabled 'Unify Size' by default * Fix: Unified size and strength were stored in UserPrefs, moved this to ToolSettings * Fix: The setting of pressure sensitivity was not unified when strength or size were unified. Now the appropriate pressure sensitivity setting is also unified across all brushes when corresponding unification option is selected * Fix: When using [ and ] to resize the brush it didn't immediately redraw * Fix: fkey resizing/"re-strength-ing" was not working consistently accross all paint modes due to only sculpt mode having full support for unified size and strength, now it works properly. * Fix: other paint modes did expose the ability to have a custom brush colors, so I added the small bit of code to allow it. Note: I made all of the other paint mode brushes white. Note2: Actually, probably want to make the paint modes use the selected color for painting instead of a constant brush color. * I had removed OPTYPE_REGISTER from some Sculpt/Paint operators but in this commit I add them back. I'm not completely sure what this option does so I don't want to disturb it for now.
2010-07-20* Made the default sculpt icons an internal part of the executableJason Wilkins
* Default icons can be selected from a menu * Option to make a custom icon from a file is present but the UI is disabled because of a mysterious crash * New startup.blend that has the appropriate icons selected
2010-07-20* Images for brush icons are now reloaded when they are needed from an ↵Jason Wilkins
external file * First, try to load the file from the given filename. This is either absolute or relative to the current .blend * If file is found using the given filename directly then look for the file in the datafiles/brushicons directory (local, user, or system). * Note: This commit does not update the .blend to reference the default icons * Note: This commit does not make sure that the build system copies the default icons to the 2.52/datafiles/brushicons directory
2010-07-14Merge GSOC Sculpt Branch: 28499-30319Jason Wilkins
https://svn.blender.org/svnroot/bf-blender/branches/soc-2010-jwilkins See log of that branch for details.
2010-02-12correct fsf addressCampbell Barton