Campbell Barton
1730829592
Cleanup: move RNA utility functions into a generic module
...
Avoid having to include bpy_rna.h for enum utility functions,
recently added to idprop_py_ui_api.c.
2021-09-01 16:33:42 +10:00
Campbell Barton
dae445d94a
Fix T85573: Building with Python 3.10a5 fails
...
Replace deprecated _PyUnicode_AsString{AndSize} usage.
T83626 still needs to be resolved before 3.10 is usable.
2021-02-13 23:09:55 +11:00
Campbell Barton
5531697f6d
Cleanup: remove duplicate context variable (__py_context)
...
The context was stored both in __py_context & bpy_context_module.
This avoids duplicate functions to update them too.
2020-10-15 19:00:16 +11:00
Campbell Barton
87aa13d025
PyAPI: prevent leading comma when printing some enums
...
BPy_enum_as_string (used for creating error messages)
showed a leading comma for enums that used category headings.
While harmless, it looks odd.
2020-09-01 16:32:11 +10:00
Campbell Barton
565d7f75cc
UI: improve errors when evaluating a number button fails
...
Showing the Python error without any explanation is often
not enough information and doesn't hint that the error was in the
user input.
The error report from a invalid expression such as '..1' used to be:
('invalid syntax', ('<string>', 1, 1, '..1'))
Now reads:
Error evaluating number, see Info editor for details: invalid syntax
Address issue raised by T78913.
2020-07-27 21:00:50 +10:00
Campbell Barton
9ce2c5bf50
Cleanup: remove workaround for old BLI_dynstr_vappendf bug
...
Remove workaround from 1c806f6bb4
as this doesn't seem to be needed anymore.
2020-07-27 21:00:49 +10:00
Dalai Felinto
d138cbfb47
Code Quality: Replace for loops with LISTBASE_FOREACH
...
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
2020-04-03 19:27:46 +02:00
Dalai Felinto
b0c1184875
Cleanup: Including "BLI_listbase.h" for LISTBASE_FOREACH macro
...
These headers are not needed right away, but will be in the upcoming
commit.
2020-04-03 19:27:42 +02:00
Dalai Felinto
2d1cce8331
Cleanup: make format after SortedIncludes change
2020-03-19 09:33:58 +01:00
Campbell Barton
41d4a19865
ClangFormat: format '#if 0' code in source/
2019-04-17 08:24:14 +02:00
Campbell Barton
e12c08e8d1
ClangFormat: apply to source, most of intern
...
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-04-17 06:21:24 +02:00
Campbell Barton
25ec4b437f
Cleanup: style, use braces for the Python API
2019-03-30 07:14:28 +11:00
Campbell Barton
9f2665b526
PyAPI: utility function to print reports
2019-03-27 14:03:40 +11:00
Campbell Barton
de13d0a80c
doxygen: add newline after \file
...
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
eef4077f18
Cleanup: remove redundant doxygen \file argument
...
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
65ec7ec524
Cleanup: remove redundant, invalid info from headers
...
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-02-02 01:36:28 +11:00
Campbell Barton
7719c11006
Cleanup: strip trailing space in Python module
2018-06-04 08:54:40 +02:00
Campbell Barton
e32cfb0743
Cleanup: rename bpy_util -> bpy_capi_utils
...
This is for internal CAPI use only, avoid confusion w/ bpy.utils module.
2017-11-29 21:11:29 +11:00