Commit Graph

21 Commits

Author SHA1 Message Date
Campbell Barton
93aa1654be Fix crash caused by bl_keymap_validate clearing key-maps
The fix for disabling add-ons #113206 caused a crash when the
bl_keymap_validate test exited.

This happened because add-on unregister would try to remove key-map
items that had been freed.

Resolve by disabling all addons instead of clearing the keymaps.
2023-10-04 22:20:38 +11:00
Campbell Barton
b7f3e0d84e Cleanup: spelling & punctuation in comments
Also remove some unhelpful/redundant comments.
2023-09-14 13:25:24 +10:00
Campbell Barton
6d6a99974d Fix script_validate_keymap test failing (mistake parsing --relaxed arg) 2023-09-14 12:38:34 +10:00
Campbell Barton
716d1b9e29 Tests: bl_keymap_validate failure wasn't causing tests to fail
bl_keymap_validate wasn't exiting with a non-zero exit code
on failure since [0] which unintentionally removed the assignment.

[0]: 167c4c6962c96b281f40ea1b540b1bf1223a5277
2023-09-13 15:11:38 +10:00
Campbell Barton
6adc6675ad Fix bl_keymap_validate.py failure caused by add-on key-maps 2023-09-13 15:09:54 +10: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
Campbell Barton
89811cb96f Cleanup: unused-imports in tests/ 2023-07-25 21:43:53 +10:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Hans Goudey
7d935f94f3 Cleanup: Grammar: it's vs its 2023-06-13 14:51:49 -04:00
Campbell Barton
39c341bf4a Cleanup: remove redundant braces from assert & raise
autopep8 v1.7 added a space after assert & raise,
remove the braces as they aren't needed.
2022-09-14 16:18:59 +10:00
Campbell Barton
3ca76ae0e8 Cleanup: remove "<pep8 compliant>" from headers
It can be assumed that all scripts comply with basic pep8 formatting
regarding white-space, indentation etc.

Also remove note in best practices page & update `tests/python/pep8.py`.

If we want to exclude some scripts from make format,
this can be done by adding them to `ignore_files` in:
source/tools/utils_maintenance/autopep8_format_paths.py

Or using `# nopep8` for to ignore for individual lines.

Ref T98554
2022-06-02 20:16:20 +10:00
Campbell Barton
3035235def Cleanup: run autopep8 on tests/ 2022-04-19 15:25:55 +10:00
Campbell Barton
7e4c031328 Cleanup: remove all tweak events from key-map presets 2022-03-02 17:29:27 +11:00
Campbell Barton
81df323df4 Tests: disable file output for bl_keymap_validate.py
Left on by accident but should only be used when debugging output.
2022-02-24 17:43:36 +11:00
Campbell Barton
813895f713 Cleanup: use strict type checking for bl_keymap_validate 2022-02-21 12:21:47 +11:00
Campbell Barton
167c4c6962 Tests: add duplicate key-map test, also test multiple configurations
Duplicate key-map items (while harmless in most cases) may cause
unexpected behavior or point to mistakes in the key-map,
so best avoid these.
2022-02-21 12:03:56 +11:00
Campbell Barton
c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Campbell Barton
d82372aee3 Cleanup: spelling in comments 2022-02-02 13:53:46 +11:00
Brecht Van Lommel
7d5ef64bfb Cleanup: fix typos in comments and docs
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D13264
2021-11-19 12:46:49 +01:00
Campbell Barton
042f06ef3c Cleanup: update comments, remove ifdef'd code 2021-03-15 14:48:17 +11:00
Campbell Barton
85b209e02e Tests: add script_validate_keymap
This checks the generated key-map data matches the result of
re-exporting and re-importing.

This shows up various inconsistencies, including:

- Unused keymaps.
- Unknown/unused data in the keymap.
- Event arguments that don't make sense.
- Event values that don't match the event type
  (tweak direction on keyboard event for example).
2021-03-14 23:31:09 +11:00