Campbell Barton
0ffc603553
Cleanup: Py API naming
...
Use BPY_execute_* prefix for all Python execution commands
2015-12-31 21:20:41 +11:00
Campbell Barton
41a2b97c30
Minor changes needed for standalone mathutils
2015-12-07 11:09:00 +11:00
Campbell Barton
d7d1fc5c74
Cleanup: use correct name in prints
2015-11-25 23:54:39 +11:00
Campbell Barton
00afa02528
PyAPI: remove workaround for Py3.4 bug
2015-11-25 21:54:02 +11:00
Campbell Barton
70dfb61300
Cleanup: remove _POSIX_C_SOURCE undefine
2015-10-20 14:06:29 +11:00
Campbell Barton
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
Campbell Barton
365d8ceac0
Workaround for linking Python on win32
2015-09-23 23:20:15 +10:00
Campbell Barton
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
Campbell Barton
6844b02a71
Fix for building w/ Python3.6
2015-09-19 17:49:38 +10:00
Campbell Barton
f2341f8296
BLF: initial word-wrap support
...
- Adds support for word wrapping to Blender's BLF font library.
- Splits lines when width limit is reached or on explicit \n newlines.
Details:
- Word wrapping is used when `BLF_WORD_WRAP` flag is enabled.
- There is a single loop to handle line wrapping,
this runs callback, passing in a substring,
this way we can avoid code-duplication for all word-wrapped
versions of functions... OR... avoid having to add support
for word-wrapping directly into each function.
- The `ResultBLF` struct was added to be able to get the number
of wrapped lines, when calling otherwise unrelated functions
such as `BLF_draw/BLF_width/BLF_boundbox`,
which can be passed as the last argument to `BLF_*_ex()` functions.
- The `ResultBLF` struct is used to store the result of drawing
(currently only the number of lines wrapped, and the width).
2015-09-18 20:43:52 +10:00
Campbell Barton
02b9921b75
bgl: fix implicit overflow
2015-09-10 03:59:18 +10:00
Campbell Barton
d4ca74c227
bgl: disable some defines not found in mesa 7
2015-09-10 03:54:40 +10:00
Martijn Berger
4e759d6735
Fixes T46060 Regenerated the full list of constants we should expose
2015-09-09 18:35:05 +02:00
Sergey Sharybin
a660f27527
Don't use GCC-only pragma for all compilers
2015-09-01 17:40:10 +05:00
Martijn Berger
230d93ad54
Fix bgl so that get-methods that take a string use strings instead of bgl buffer objects again
2015-08-03 12:20:08 +02:00
Campbell Barton
42d65ef5cc
Add bool parser for PyArg_ParseTuple
...
Use for mathutils.bvhtree
2015-08-03 20:00:16 +10:00
Campbell Barton
03f00eb91d
Docs: doxy corrections
2015-07-31 23:44:37 +10:00
Campbell Barton
339915a962
Optimize PySequence_Fast usage
...
Access arrays directly, avoiding type-check every time.
2015-07-29 10:49:35 +10:00
Campbell Barton
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
Campbell Barton
dc6153453a
Cleanup: comments (remove outdated & update)
2015-07-24 16:59:39 +10:00
Martijn Berger
7f32601159
PyAPI: update bgl to OpenGL 3.3
...
Adds (currently unused) deprecated option
so we can remove support for older API versions.
2015-07-24 16:48:40 +10:00
Campbell Barton
ea3dae74d8
Cleanup: remove redundant __doc__ from bgl
2015-07-24 09:45:25 +10:00
Campbell Barton
3b362950e9
Cleanup: move defines inside bgl C source
...
- remove number-of-args arg from BGL_Wrap.
- use doxy groups.
2015-07-24 09:35:39 +10:00
Campbell Barton
3ce4a58aa9
Cleanup: duplicate includes
2015-06-18 06:32:01 +10:00
Campbell Barton
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
Campbell Barton
616eb6818f
cleanup
2015-02-13 16:17:00 +11:00
Campbell Barton
2242022653
PyAPI: Replace importlib.reload, not 'imp'
2015-01-23 16:37:30 +11:00
Campbell Barton
bf0c8e116d
PyAPI: add PyList_APPEND
...
This appends while giving ownership to the list, avoiding temp assignment.
This matches PyList_SET_ITEM which bypasses refcount's
Note, this also reduce code-size, Py_DECREF is a rather heavy macro.
2015-01-06 19:09:53 +11:00
Campbell Barton
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
Campbell Barton
aab4f2b762
cleanup: redundant casts & const cast correctness
2015-01-01 23:42:28 +11:00
Campbell Barton
3da1a75b74
correct recent cleanup for id-property types
2014-12-18 02:06:57 +01:00
Campbell Barton
7b0d6a1e6c
SCons: correct include for win, also minor cleanup
2014-11-24 09:56:24 +01:00
Campbell Barton
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
Bastien Montagne
6e17fb8fe3
Fix T42593: Rigify crash when I press "Generate" - corrupted IDGroup's listbase of children
...
Nothing related to rigify actually, recent hack in py handling of IDProp (rB3346ab03)
was breaking integrity of IDGroup's listbase of children IDProps...
Took me hours to nail this down, should have bisected for once. :/
2014-11-14 16:42:49 +01:00
Campbell Barton
3346ab0348
Fix/workaround T37073: Crash updating custom props visible in the UI
2014-11-10 17:10:58 +01:00
Jason Wilkins
8d084e8c8f
Ghost Context Refactor
...
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
Antony Riakiotakis
85945a8b86
Add debug information for maximum opengl limits in system info
...
generation.
2014-08-28 12:19:59 +02:00
Sergey Sharybin
3e41c8ad6f
Fix compilation error with debug scons
...
The issue is that we've got hell with DEBUG and _DEBUG,
theu're defined really inconsistent acros CMake and SCons.
Used more reliable NDEBUG definition for IDP_spit.
2014-08-11 20:58:42 +06:00
Campbell Barton
00b29156e0
Defines: replace ELEM3-16 with ELEM(...), that can take varargs
2014-07-20 01:33:40 +10:00
Campbell Barton
9f05588b68
Python: remove redundant casts
2014-07-01 14:10:59 +10:00
Bastien Montagne
87930eb7c2
Hopefully fix compilation with old MSVC2008/WIN32...
2014-06-18 10:32:25 +02:00
Bastien Montagne
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
Campbell Barton
f2a0062042
Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a))
2014-06-17 02:47:57 +10:00
Tamito Kajiyama
f325ddb0d7
Fix Python fails to execute text-blocks including non-mbcs chars (T35176, D595)
2014-06-16 15:29:25 +10:00
Campbell Barton
b460674d64
Code cleanup: replace macro with function to reduce binary size
2014-06-03 19:25:07 +10:00
Campbell Barton
4ca67869cc
Code cleanup: remove unused includes
...
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
Campbell Barton
4d1a109dde
Fix T35176: Python fails with blend files from non-ASCII paths
...
Thanks to Tamito for updating the patch to support Freestyle!
2014-04-30 23:43:01 +10:00
Campbell Barton
b96d531bc9
Python: move to version 3.4x on all platforms
2014-04-30 23:19:16 +10:00
Campbell Barton
3d9b4159a4
PyC_RunQuicky: Print filename when its missing
2014-04-29 02:55:59 +10:00
Campbell Barton
e73d0f57a3
Code cleanup: use 'const' for arrays (python)
2014-04-27 00:25:15 +10:00