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
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2022-01-06Cleanup: anim, remove `const` declarations from pass-by-value paramsSybren A. Stüvel
Remove `const` from pass-by-value parameters in function declarations. The variables passed as parameters can never be modified by the function anyway, so declaring them as `const` is meaningless. Having the declaration there could confuse, especially as it suggests it does have a meaning, training people to write meaningless code.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-11-22Cleanup: Make parameter const (BKE_brush_curve_strength_clamped).Jeroen Bakker
2021-01-04Cleanup: rename get_brush_icon, make it a static functionCampbell Barton
Group with other icon preview API functions.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-05-15GPencil: Fix unreported missing Sculpt/Vertex/Weight paint brushesAntonio Vazquez
This error was introduced wit the change in commit https://developer.blender.org/rB6a850f3cc840 As the brushes were not created, all modes except Edit were broken. Now, the brushes and palette are not created when load the file in versioning code, but when the mode is enabled. Also, if the brush already exist, the parameters are not reset as it was done in the versioning code in order to keep user settings. The same logic is used for the default palette.
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-03-06Cleanup: Brush: Move to IDTypeInfo, and remove unused BKE API.Bastien Montagne
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2019-11-27Sculpt/Paint: Remove Unified SIZE_PRESSURE and ALPHA_PRESSUREPablo Dobarro
The relation between the pressure/size and the pressure/alpha is a fundamental property that defines the behavior of a brush, so it does not make sense to have it unified across all brushes. This applies both for sculpting and painting. Some of the new 2.82 brushes need pressure/size or pressure/alpha to be enabled to work propely, while others don't. Users should not be switching on and off this property manually when changing brushes if they want to use unified size. This is also causing that some users are using the brushes with an incorrect configuration. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6291
2019-10-07Cleanup: clang-formatCampbell Barton
2019-09-27Sculpt: Sculpt cursor UX improvementsPablo Dobarro
This commit introduces the following changes: - Invert the direction of the brush strength WM control. It was working in the opposite direction to any other control in Blender. Now dragging to the right increases the strength. - Increase the alpha of the cursor - Remove the font shadow of the numbers in the WM control. It was adding too much visual noise when rendered on top of the brush alpha - Add a second circle to preview the strength in the cursor - Increase the resolution of the cursor circles. Now they look smooth even when working with large brush sizes. - Add a line preview to display the brush curve - Don't offset the cursor preview when changing size and strength Reviewed By: billreynish, brecht Differential Revision: https://developer.blender.org/D5889
2019-09-27GPencil: New Brush default settingsAntonio Vazquez
This patch replaces D5787. Now instead to replace the startup.blend file, all the changes are done in versioning and moved to shared module to be reused by Brush reset. Reviewers: brecht, mendio Reviewed By: brecht Subscribers: pepeland, mendio Differential Revision: https://developer.blender.org/D5913
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-25GPencil: Only brushes with pinned materials have materialsAntonioya
Using GP_BRUSH_MATERIAL_PINNED to switch between active material and brush material, instead of updating all brushes on active material changes. This will allow brushes to have no material and therefore to not inflate the user count. This fix T62465. Patch contributed by @matc Reviewers: @brecht @antoniov @billreynish @mendio
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-11-13Merge branch 'master' into blender2.8Campbell Barton
2018-11-13Cleanup: use lowercase 2d/3d in function namesCampbell Barton
2018-11-12Cleanup: minor gpencil changesCampbell Barton
- Replace BKE_brush_getactive_gpencil -> BKE_paint_brush (no need for per-paint-type brush access). - Rename TOT_GP_EDITBRUSH_TYPES -> GP_EDITBRUSH_TYPE_MAX (avoid sharing prefix w/ unrelated constants). - Rename instances of `GP_EditBrush_Data` to 'gp_brush' (`Brush` is typically called 'brush').
2018-11-07Cleanup: use BKE_brush_tool_get/set macrosCampbell Barton
Also add API call WM_toolsystem_ref_sync_from_context (was in rna_workspace_api.c)
2018-11-05Paint: add BKE_paint_ensure to initialize toolsettingsCampbell Barton
Each mode had its own logic for initializing paint structs, move to a single function. Also remove "BKE_brush_get_gpencil_paint", entering grease pencil mode is responsible for ensuring the data is created.
2018-08-25GP: Select color in Brush or in PropertiesAntonioya
After some artist feedback the material selection was not clear. Now, the material can be selected in the top bar or in the properties panel. 1) If the material is selected in properties panel, all Brushes except pinned will be assigned to this material. 2) If the material is selected in the brush, the properties panel is updated to set the active material. Added a new Pin icon to keep locked the material to one brush
2018-08-05GP: Add python api to create brush settings for grease pencilAntonioya
2018-07-31New Grease Pencil object for 2D animationAntonioya
This commit merge the full development done in greasepencil-object branch and include mainly the following features. - New grease pencil object. - New drawing engine. - New grease pencil modes Draw/Sculpt/Edit and Weight Paint. - New brushes for grease pencil. - New modifiers for grease pencil. - New shaders FX. - New material system (replace old palettes and colors). - Split of annotations (old grease pencil) and new grease pencil object. - UI adapted to blender 2.8. You can get more info here: https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/ https://code.blender.org/2018/07/grease-pencil-status-update/ This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible. Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-06-29Cleanup: trailing newlinesCampbell Barton
2018-06-09Cleanup: unused functionsCampbell Barton
2018-02-06Use eObjectMode for function argumentsCampbell Barton
2017-10-17Cleanup: use 'e' prefix for enum typedefsCampbell Barton
Convention was only followed loosely, apply to DNA where changes aren't likely to conflict. (Skipped ModifierType for eg).
2017-10-05Fix sculpt secondary color missing some brushesCampbell Barton
D2841 by @uvwxyz w/ edits
2017-10-05Cleanup: use bool for brush checksCampbell Barton
2017-10-03Weight Paint: don't set weight w/ average brushCampbell Barton
Also use 'const' for brush.
2017-10-02Vertex Paint: projection optionsCampbell Barton
This makes vertex paint match image painting more closely. - Add falloff shape option sphere/circle where sphere uses a 3D radius around the cursor and circle uses a 2D radius (projected), like previous releases. - Add normal angle option so you can control the falloff. - Add Cull option, to paint onto faces pointing away. Disabling normals, culling and using circle falloff allows you to paint through the mesh.
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2016-07-21Refactor/deduplicate even more make_local code (and fix part of T48907).Bastien Montagne
Turns out most BKE_foo_make_local datablock-specific functions are actually doing exactly the same thing, only two currently need special additional operations (object and brush ones). So added a BKE_id_make_local_generic instead of copying same code over and over. Also, changed a bit how make_local works in case we are localizing a whole library. We need to do the 'remap' step (from old linked ID to new local one) in the second loop, otherwise we miss some dependencies. This fixes main part of T48907.
2016-07-14Add option to id_make_local to force localization of datablock, even if not ↵Bastien Montagne
used locally. Will be used by link/append code.
2016-07-10Refactor/enhance BKE_brush_make_local() and BKE_speaker_make_local().Bastien Montagne
Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10Cleanup/Refactor: pass Main pointer to all ID copy functions.Bastien Montagne
Also allows us to get rid of a few _copy_ex() versions...
2016-02-18Cleanup: add missing struct qualifierCampbell Barton
2015-11-02Fix T46626: Crash generating previewsCampbell Barton
Brush.toggle_brush was allowed to be an invalid pointer, it worked for the one operator that used it - but in general bad practice, requiring a lookup on every access. Ensure the pointer is kept valid now.
2015-10-20First step to handle missing libs/datablocks when reading a file.Bastien Montagne
Idea is, instead of ignoring completely missing linked datablocks, to create void placeholders for them. That way, you can work on your file, save it, and find again your missing data once lib becomes available again. Or you can edit missing lib's path (in Outliner), save and reload the file, and you are done. Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon. Future plans are also to be able to relocate missing libs and reload them at runtime. Code notes: - Placeholder ID is just a regular datablock of same type as expected linked one, with 'default' data, and a LIB_MISSING bitflag set. - To allow creation of such datablocks, creation of datablocks in BKE was split in two step: + Allocation of memory itself. + Setting of all internal data to default values. See also the design task (T43351). Reviewed by @campbellbarton, thanks a bunch! Differential Revision: https://developer.blender.org/D1394
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.