Age | Commit message (Collapse) | Author |
|
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
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.
|
|
This adds support for line gesture to SculptGestureContext and
implements a Mask Line tool, which affects everything to the right of a plane
defined by the straightline gesture.
For this to work, a new WM_gesture_straightline_oneshot_modal is needed
which only runs exec when the gesture is over.
Added as experimental as it does not have icon.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D8722
|
|
|
|
Box mask is not a selection, so it should not be part of the select
operator. This allows to add more sculpt mode specific functionality and
properties and to share more code with the lasso mask operator in a
later refactor.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8456
|
|
Enables the color palette subpanel for brushes that have color
capabilities (only the paint brush for now)
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8268
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/sculpt_paint` module.
No functional changes.
|
|
Using a number greater than 1 produce a huge number of entries in the palette because any small variation in the color create a new entry.
Remove the threshold reduce the precision of the color extracted, but always is better than having a palette with thounsands of colors.
Related to T78317
Still pending the memory crash when it's impossible to allocate memory for the palette in the popover, but with this change I don't think we get this error again.
|
|
extract palette
Also fixed the same error in generate GPencil object from image.
The problem was the Render Result image hasn't ibuf.
|
|
clicking Image Aspect
Calculate with positive areas here and ensure stencil_dimension stays
positive.
Maniphest Tasks: T76267
Differential Revision: https://developer.blender.org/D7821
|
|
|
|
Caused by rB47da01a4db1d.
Above commit did not change the toolname it was setting when the brush
was actually toggled.
Maniphest Tasks: T75457
Differential Revision: https://developer.blender.org/D7792
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
|
|
Issues exposed by 'bl_run_operators.py' utility.
|
|
|
|
|
|
Both the MS headers and blender headers define the HKEY
which gives all kind of inclusion order issues.
This diff renames all *KEY constants to EVT_*KEY to resolve
this conflict.
Reviewed By: brecht , dfelinto
Differential Revision: http://developer.blender.org/D7164
|
|
The poll function was not checking the paint pointer.
|
|
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
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
|
|
|
|
While one issue of the report was fixed already (rB27adc4aa3347), still a
couple of clarifications could be made:
- correct/clarify which modes these apply to
- clarify that "Face Mask" is a paint thing
Maniphest Tasks: T54323
Differential Revision: https://developer.blender.org/D6797
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Also rename struct members to 'launch_event', since it's more
descriptive and was called this in some places.
|
|
When you create a new Brush, the user count is `2` (caller and fake user). The problem is when you duplicate a Brush, the user count grows to `3` and this is not correct, because is a new brush.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D6310
|
|
When the brush is duplicated, the grease pencil settings doesn't need to be recreated.
|
|
Causes undo push in sculpt mode, see: T71434
|
|
|
|
|
|
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).
Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.
- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
select different brushes.
- Make UV sculpt use paint paint tool slots
(using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
S/P/G keys to switch tools.
|
|
|
|
|
|
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
|
|
|
|
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
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.
|
|
|
|
Without this clang-format may wrap them onto a single line.
|
|
The problem was the brush was not initializated because some code was missing (marked as ToDo)
|
|
Part of T59335.
|
|
|
|
Instead check which property has been set.
|
|
|