Commit Graph

9 Commits

Author SHA1 Message Date
Campbell Barton 27c660707d Cleanup: spelling in comments, variables 2023-11-27 09:54:36 +11:00
Sergey Sharybin 687e58bb77 Cleanup: Simplify public API of unique name functions
Their return value was only used in one place.

Change it to comparison with a stored name, and make the functions
to return void instead.

Removing the return boolean makes it possible to change underlying
functions to work with std::string and return unique name by value.

Pull Request: https://projects.blender.org/blender/blender/pulls/113934
2023-10-19 15:07:57 +02:00
Bastien Montagne b53c7a804a Readfile: Replace the 'lib_link' specific code by generic usage of foreach_id.
The `lib_link` callback cannot always be fully replaced/removed, as in
some case it is also doing some validation checks, or data editing based
on the result of lib_linking internal ID pointers.

The callback has been renamed for that purpose, from `read_lib` to
`read_after_liblink`. It is now called after all ID pointers have been
fully lib-linked for the current ID, but still before the call to
`do_versions_after_linking`.

This change should not have any behavioral effect. Although in theory
the side-effect of this commit (to split lib linking itself, and the
validation/further processing code) into two completely separated steps
could have some effects, in practice none are expected, and tests did
not show any changes in behavior either..

Part of implementing #105134: Removal of readfile's lib_link & expand code.
2023-08-24 16:33:31 +02:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Bastien Montagne 695995d7cb Refactor: Move 'local data' liboverride flag clearing from 'lib_link' to 'read_data' code.
There is no reason to do that in the 'lib_link' stage of blendfile
reading, whether the owner ID is linked or local is already known info
at the 'read_data' stage of the process. And it is more logical to do
that in code affecting internal private data of an ID, rather than in
code handling updates of it ID pointers.

Note that the camera's baground image case was already handled in the
'read_data' stage.

No behavioral change expected here.
2023-08-14 16:45:18 +02:00
Campbell Barton 4cf728c3dd Cleanup: use boolean for GpencilModifierTypeInfo::is_disabled
Also rename user_render_params to use_render_params
(matching object modifiers).
2023-07-27 22:10:16 +10:00
Campbell Barton cc892efcd4 Cleanup: use snake case, especially for structs that define callbacks
Use snake case for ShaderFxTypeInfo, ModifierTypeInfo,
GpencilModifierTypeInfo & bConstraintTypeInfo.
2023-07-27 12:21:06 +10:00
Sergey Sharybin c1bc70b711 Cleanup: Add a copyright notice to files and use SPDX format
A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.

This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.

Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.

Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:

    https://reuse.software/faq/
2023-05-31 16:19:06 +02:00
Falk David df0c2693b6 Refactor: Rename grease pencil files to legacy
This renames the `BKE_gpencil_*` as well as the `DNA_gpencil_types.h`
files to indicate that it's the legacy grease pencil.

Pull Request: https://projects.blender.org/blender/blender/pulls/105597
2023-03-13 10:42:51 +01:00