When adding a shape key, set its blend value to 1.0 / 100%.
There is no practical use case where user wants to add shape key but
not work on it. New shape keys at value 0 have no purpose. Adding
shape key should be interpreted by Blender as user wanting to
sculpt/model on it. Also, being at 1.0 initially doesn't change
anything visually, because key isn't edited yet and it doesn't deform
mesh.
The default value of the shape key is also set to 1.0. When using
right-click to reset values, user most often wants to return to 1
(which is "correct" state of deformation without multiplication)
rather than 0 (which is no deformation at all).
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133399
e.g. stands for "exempli gratia" in Latin which means "for example".
The best way to make sure it makes sense when writing is to just expand
it to "for example". In these cases where the text was "for e.g.", that
leaves us with "for for example" which makes no sense. This commit fixes
all 110 cases, mostly just just replacing the words with "for example",
but also restructuring the text a bit more in a few cases, mostly by
moving "e.g." to the beginning of a list in parentheses.
Pull Request: https://projects.blender.org/blender/blender/pulls/139596
The script check_source/static_check_size_comments.py run directly
or called via the convenience target "make check_size_comments".
Add a utility module: `line_number_utils` which implements
a version of `re.finditer` that includes line numbers & ranges.
There is similar issue as what was fixed in autopep8 with the initial
LFS migration: `git ls-tree` running to gather all files contains files
with non-ascii names, such as some non-latin utf-8 files in the tests.
Decode the ls-tree using utf-8 for C code format as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/138488
This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.
The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.
More detailed explanation and conversation can be found in the
design task.
Ref #137215
Pull Request: https://projects.blender.org/blender/blender/pulls/137219
Job splitting logic didn't account for the same file being built
multiple times, causing there to be multiple built arguments per file.
Now multiple build configurations are stored per file.
After coming back to this file after a few months I myself did not remember where to edit it.
Adding the "Introduction and formatting" bullet item and update others for brevity.
Support importing scripts without running their logic to
allow basic validation (see #130746).
Parts of !131037 were used.
Co-authored-by: Bastien Montagne <bastien@blender.org>
This reverts commit 94959cb84f.
make_license.py was actually refactored in main, and this is introducing
a minor conflict. I will leave make_license as it is in 4.3, and focus
on the cleanups in main itself.
- Avoid manipulating a dictionary arguments, use return values &
iterators to return results.
- Move logic out of the file reading context once the file was read
(reducing right-shift).
- Move intermediate license data from a dictionary to a named-tuple
for better clarity & type safety.
- Remove use of `dataclass` as a container for constants,
as it quite clear to define the constants directly in the
global namespace.
- Group imports at the beginning of the file (no need to quiet pylint).
- Add headings for code sections.
- Use double quotes.
- Use the term "dir" instead of both dir/folder.
- Note the limitations parsing CMake files directly,
with a possible alternative.
There are two "SPIRV TOOLS" IGC_SPIRV_TOOLS & SHADERC_SPIRV_TOOLS, in:
build_files/build_environment/cmake/versions.cmake
Show both in the license.md file.
Also remove use of defaultdict to make it clear where dictionary
values are created.
Clear trailing space as this has as space at the line end
has a special meaning in markdown.
Write a new line at the end of the file
since some development tools add this or note when it's missing,
it's simplest just to add it.
This generates a `license.md` file with all the relevant information about
the different libraries and their respecive licenses.
This should replace: THIRD-PARTY-LICENSES.txt
Important files:
* `make_license.py` (main script called by `make license`.
* `licenses.json` (file to add the definition of new licenses).
* `licenses/*/*.txt` (individual license files.
The `license.md` groups the libraries per license, list their
corresponding copyright information and include the complete license.
Code includes contributions from:
* Campbell Barton (multi-line parser for versions.cmake).
* Thomas Dinges (Windows support for `make license`).
Part of: !129018
The updated autopep8 was ignoring the "exclude" values because
they started with a "./" instead of a "/".
The documentation I found doesn't go into details, even if this is a
regression in autopep8, update the configuration as it causes
"make format" to format files that aren't meant to be modified.
This renames the mode identifiers to be consistent with e.g. the context mode identifiers and other names used for the new Grease Pencil.
For `object.mode`:
* `PAINT_GPENCIL` -> `PAINT_GREASE_PENCIL`
* `SCULPT_GPENCIL` -> `SCULPT_GREASE_PENCIL`
* `VERTEX_GPENCIL` -> `VERTEX_GREASE_PENCIL`
* `WEIGHT_GPENCIL` -> `WEIGHT_GREASE_PENCIL`
For the internal `ob->mode` flag:
* `OB_MODE_PAINT_GPENCIL_LEGACY` -> `OB_MODE_PAINT_GREASE_PENCIL`
* `OB_MODE_SCULPT_GPENCIL_LEGACY` -> `OB_MODE_SCULPT_GREASE_PENCIL`
* `OB_MODE_VERTEX_GPENCIL_LEGACY` -> `OB_MODE_VERTEX_GREASE_PENCIL`
* `OB_MODE_WEIGHT_GPENCIL_LEGACY` -> `OB_MODE_WEIGHT_GREASE_PENCIL`
Resolves#127374.
Pull Request: https://projects.blender.org/blender/blender/pulls/128604
As of [0] `intern/itasc/` is excluded from formatting,
however the formatting script was still running clang-format
on files in this directory.
Support ignoring directories to avoid the overhead of running
clang-format which does nothing.
Also add comments & skip creating paths to convert to spaces when
converting tabs to spaces isn't enabled.
[0]: 77617fce77
Directories in intern/ were selectively formatted based on
paths in `tools/utils_maintenance/clang_format_paths.py`.
This had the following problems:
- Editing files inside intern/ would auto-format on save with editors
setup to auto-format as there was nothing to disable formatting.
- Some directories were missing (by accident it seems).
Resolve by formatting all of `./intern/` exclude except for
`./intern/itasc/` which includes ITASC & KDL versions we might
want to sync with upstream.
When passing `.py` paths to the format command, clang-format paths
would be empty and operate on all paths.
Resolve by detecting cases when there is nothing to format.
Ref: !126055