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
6844b02a71
Fix for building w/ Python3.6
2015-09-19 17:49:38 +10:00
42d65ef5cc
Add bool parser for PyArg_ParseTuple
...
Use for mathutils.bvhtree
2015-08-03 20:00:16 +10:00
339915a962
Optimize PySequence_Fast usage
...
Access arrays directly, avoiding type-check every time.
2015-07-29 10:49:35 +10:00
d226a4ba6d
Fix leak in PyC_AsArray
...
Would only happen when the list-length was an unexpected size.
Also add PyC_AsArray_FAST
2015-07-29 10:49:34 +10:00
3ce4a58aa9
Cleanup: duplicate includes
2015-06-18 06:32:01 +10:00
29aae4db38
UI: errors in buttons now show in info report
...
Mistakes in button expressions were previously only printed to the console.
2015-05-18 10:02:29 +10:00
9fd569a654
PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RET
...
Setting all values of a tuple is such a common operation that it deserves its own macro.
Also added Py_INCREF_RET to avoid confusing use of comma operator.
2015-01-06 19:09:11 +11:00
43fa4baa6c
Refactor: BLI_path_util (part 2)
...
Use BKE_appdir/tempdir naming prefix for functions extracted from BLI_path_util
2014-11-23 18:55:52 +01:00
9f05588b68
Python: remove redundant casts
2014-07-01 14:10:59 +10:00
87930eb7c2
Hopefully fix compilation with old MSVC2008/WIN32...
2014-06-18 10:32:25 +02:00
f94b87bbb8
New python API for units handling.
...
Exposes all supported unit systems & types, and to_value()/to_string() functions.
Reviewed and enhanced by CampbellBarton, many thanks!
Differential Revision: https://developer.blender.org/D416
2014-06-17 16:03:40 +02:00
f2a0062042
Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a))
2014-06-17 02:47:57 +10:00
f325ddb0d7
Fix Python fails to execute text-blocks including non-mbcs chars (T35176, D595)
2014-06-16 15:29:25 +10:00
b96d531bc9
Python: move to version 3.4x on all platforms
2014-04-30 23:19:16 +10:00
3d9b4159a4
PyC_RunQuicky: Print filename when its missing
2014-04-29 02:55:59 +10:00
e73d0f57a3
Code cleanup: use 'const' for arrays (python)
2014-04-27 00:25:15 +10:00