d49c71e96e
Cleanup: use logging for "Found bundled Python" message
...
This was added when Python was initially bundled so any problems
finding Python could be investigated.
Move this to use logging so we can show this information when needed.
2020-11-02 19:33:32 +11:00
c7cd74fac3
Cleanup: multi-line comment blocks
2020-10-14 15:24:42 +11:00
2abfcebb0e
Cleanup: use C comments for descriptive text
...
Follow our code style guide by using C-comments for text descriptions.
2020-10-10 22:04:51 +11:00
Valentin
5ac4778056
Cleanup: convert gforge task ID's to phabricator format
...
Cleanup old tracker task format to the new. e.g: [#34039 ] to T34039
Ref D8718
2020-09-30 20:11:06 +10:00
efa7aaa97f
Cleanup: use const variables where possible in the Python API
2020-08-20 16:10:13 +10:00
397cec6a4d
Cleanup: Pass 'FILE *' instead of 'void *' for BPY_python_backtrace
...
This was committed as a temporary workaround in 82150f5641
as release builds were failing (only debug builds worked).
This adds `stdio.h` to the header which is now split into a file that
contains more specialized functionality.
Also move function body inside BPY_python_backtrace,
removing PyC_StackPrint as we have PyC_StackSpit() for
similar functionality that can be called from a debugger.
2020-08-17 18:31:04 +10:00
3d48d99647
Cleanup: Python, Clang-Tidy else-after-return fixes
...
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/python` module.
No functional changes.
2020-08-07 13:38:07 +02:00
3439cbcc69
Merge branch 'blender-v2.90-release' into master
2020-08-06 19:20:32 +10:00
82150f5641
Workaround release builds failing
...
Issue caused by e9c4325515
.
2020-08-06 19:19:25 +10:00
14dc1aecf0
Merge branch 'blender-v2.90-release' into master
2020-08-06 15:48:42 +10:00
Daniel Bailey
e9c4325515
Python: include Python stack trace in the crash log
...
This helps Python developers troubleshoot errors when
Python causes a crash.
2020-08-06 15:44:00 +10:00
c86fed79d5
Cleanup: use doxy sections for py_capi_utils.c
2020-08-06 13:51:28 +10:00
7beef1fd33
PyAPI: simplify syntax error reports
...
The result of syntax errors read poorly in reports,
resulting in cryptic and unhelpful information.
Change PyC_ExceptionBuffer_Simple only to extract the initial text,
making syntax errors when entering invalid numeric expressions into
buttons easier to follow.
2020-07-27 21:00:50 +10:00
8438ef4d8e
Cleanup: update comments, remove disabled code
2020-07-23 14:04:18 +10:00
19afb0ea67
Cleanup: remove redundant static variable use
...
This hasn't been needed since Python 3.7x.
2020-07-23 13:59:07 +10:00
2bc791437e
Cleanup: use 'r_' prefix for output arguments
...
Also pass some args as 'const'.
2020-03-25 17:58:58 +11:00
2a6df7dfe5
Cleanup: use named unsigned types in the Python API
2020-02-20 15:40:05 +11:00
576d385ddb
PyAPI: add utility functions get the size from an evaluated string
...
Allows including null bytes in the resulting string.
2019-12-11 18:04:44 +11:00
a0d675d88f
Merge branch 'blender-v2.81-release'
2019-10-22 17:42:09 +11:00
b5f77973a7
Cleanup: remove BLI_dynstr use in py_capi_utils
...
Needed for standalone mathutils module.
2019-10-22 17:38:48 +11:00
e413b39a93
PyAPI: use public API's for module & builtin access
...
D6038 by @Dormouse
2019-10-16 23:16:51 +11:00
9dd5e3b6e8
Cleanup: define PY_SSIZE_T_CLEAN for Python
...
Silence deprecation warnings running with Python 3.8.
2019-10-16 15:58:32 +11:00
a7cf7b114f
Fix for building with Python 3.8
2019-10-16 13:39:29 +11:00
07feb6e814
PyC API: utility to parse a string as an RNA like enum
...
More convenient than comparing strings,
with the advantage that errors don't need to repeat expected values.
2019-10-01 05:18:25 +10:00
6529d20d79
Cleanup: spelling in comments
2019-06-12 09:43:49 +10:00
778542fd8f
Cleanup: comments (long lines) in python
2019-04-29 20:01:10 +10:00
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
25ec4b437f
Cleanup: style, use braces for the Python API
2019-03-30 07:14:28 +11:00
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
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
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
f20dbc293f
Cleanup: blank lines over doxy headers
2019-01-26 21:43:24 +11:00
9bfc9d799e
PyAPI: Avoid redundant prefix for PyC_Err_Format_Prefix
...
Only show the exception value type when it's not a string.
2019-01-17 08:43:57 +11:00
debb68024e
PyAPI: add PyC_Err_SetString_Prefix for internal use
2019-01-17 08:38:59 +11:00
d022794cad
Cleanup: rename checks for Python struct strings
...
Using 'format' prefix made this read as if t was for string formatting.
Use 'PyC_StructFmt' prefix instead since these values are compatible
with formatting from Python's 'struct' module.
2018-10-08 08:37:32 +11:00
af7967b010
CPython: py_capi_utils: format char utilities do not need to be inline.
2018-10-07 12:22:17 -03:00
63658ae76d
Cleanup: redundant include
2018-09-26 10:55:22 +10:00
a4f2ebc78d
Spelling fixes in comments and descriptions, patch by luzpaz.
...
Differential Revision: https://developer.blender.org/D3700
2018-09-19 18:18:05 +02:00
7ff1750218
PyAPI: add optional imports to expression eval API
...
Avoids having to use `__import__` to access modules.
2018-09-03 12:43:43 +10:00
0ddf3e110e
Cleanup: comment blocks
2018-09-02 18:51:31 +10:00
98800aa4e0
C/Python API: Add PyC_RunString_AsIntPtr
...
Utility to get an int or pointer from a Python expression.
2018-08-31 14:21:32 +10:00
ddee0931b8
RNA: use bool for boolean RNA types
...
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
2018-07-01 15:57:59 +02:00
a69f985f40
PyAPI: move deep-copy args check to py_capi_utils
2018-06-26 09:31:57 +02:00
7719c11006
Cleanup: strip trailing space in Python module
2018-06-04 08:54:40 +02:00
31f2a6755d
PyAPI: Add PyC_Tuple_Pack_F64 utility
2018-04-02 19:48:34 +02:00
017c731cf3
Logging: use for Python API
...
Adds categories "bpy.context" & "bpy.rna"
2018-04-02 13:13:57 +02:00
0b325ba201
PyAPI: PyC_Err_PrintWithFunc utility function
...
Move function error printing utility into py_capi_utils.
2017-11-29 13:41:10 +11:00
691ed21842
PyAPI: replace PyC_FromArray with typed functions
...
This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.
Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.
2017-08-22 18:10:57 +10:00
a10a7f42de
PyAPI: Integer conversion functions
...
Python's C-API doesn't provide functions to get
int's at specific integer sizes.
Leaving the caller to check for overflow,
which ended up being ignored in practice.
Add API functions that convert int/uint 8/16/32/64, also bool.
Raising overflow exception for unsupported ranges.
2017-08-20 15:39:08 +10:00
3d1e5bca88
PyAPI: don't use deprecated PyModule_GetFilename
...
Allows compiling with newer Python versions.
Also add missing decref when compiling as a py-module.
2017-07-17 12:53:55 +10:00