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
e392bb4937
PyAPI: add BPY_execute_string_as_string
...
Utility to execute a string and get the resulting string,
matching BPY_execute_string_as_number.
Not used just yet but generally useful function.
2017-03-18 12:19:03 +11:00
d863b5182e
Cleanup: use return args last and 'r_' prefix.
2017-03-18 09:39:36 +11:00
2dfc954c4a
PyAPI: Add PyC_UnicodeAsByteAndSize
...
Read the string length from Python directly when assigning id-properties
2016-07-31 16:52:44 +10:00
c885cea7bb
Cleanup: spelling
2016-07-16 17:48:57 +10:00
f5e020a7a6
PyAPI: fix memory leaks in dictionary assignment
...
Thanks to Kévin Dietrich for spotting driver leak,
checked other uses of PyDict_SetItem and found more.
2016-07-14 17:30:52 +10:00
21fddf7d1c
C99/C++11: replace deprecated finite() by isfinite().
2016-05-17 21:39:16 +02:00
0ffc603553
Cleanup: Py API naming
...
Use BPY_execute_* prefix for all Python execution commands
2015-12-31 21:20:41 +11:00
41a2b97c30
Minor changes needed for standalone mathutils
2015-12-07 11:09:00 +11:00
d7d1fc5c74
Cleanup: use correct name in prints
2015-11-25 23:54:39 +11:00
00afa02528
PyAPI: remove workaround for Py3.4 bug
2015-11-25 21:54:02 +11:00
4aad17c622
Use PyThreadState_GetDict, avoid Python internals
...
Works around problems caused by exposing Py internals (Py_BUILD_CORE).
- Build error with GCC, Py3.6 & OpenMP
- Linking error on MSVC
2015-09-26 12:02:17 +10:00
365d8ceac0
Workaround for linking Python on win32
2015-09-23 23:20:15 +10:00
7b9bd5b546
Recent change for Py3.6 compat caused fatal-error
...
Revert back to old method, and define Py_BUILD_CORE to expose internals.
2015-09-21 23:08:18 +10:00