73a9ff0d2d
PyAPI: Fast buffer access to id property arrays
...
Support Python's buffer protocol for ID-properties.
2017-04-10 21:12:02 +10:00
3f818c7898
Merge branch 'master' into blender2.8
2017-03-20 09:32:40 +11: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
b4157dedb0
OpenGL: remove packed imm mode functions from Python API
...
These are from the ARB_vertex_type_2_10_10_10_rev extension that became part of OpenGL 3.3.
So they are new, but only exist for compatibility with immediate mode, which is old.
Related to T49165 (general OpenGL upgrade)
2017-03-13 14:08:03 -04:00
0e40f1bac4
OpenGL: remove GLU functions from Python API
...
Part of T49042
2017-03-13 14:08:03 -04:00
c1f43c9dc6
Cleanup: warnings
2017-03-02 00:36:33 +11:00
e9011100f7
Fix compiler warnings on macOS / clang / c++11.
2017-02-26 00:16:21 +01:00
Martijn Berger
5cbc7b6ed2
bgl do not bind parts of OpenGL that are not exposed in core profiles
2016-11-19 15:07:01 +01:00
a8dc3f4596
BLF: make blurry text an optional (disabled) feature
...
While trying to simplify text drawing, noticed no Blender code uses the blur feature. Hopefully scripts don't use it!
2016-10-15 19:40:41 -04:00
a96c9def6f
PyAPI: minor optimization for dictionary creation
...
Pass size when its known.
2016-07-31 17:22:04 +10:00
e97ab8347a
PyAPI: fix leak in unlikely case converting idprops fail
2016-07-31 16:59:08 +10: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
409316434c
Docs: add initial idprop.types API docs
2016-07-31 15:40:40 +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
cca57bf04c
PyAPI: Use module names on initializaton
...
No need to re-convert from C strings to PyUnicode.
2016-07-14 15:51:56 +10:00
0d4961cc52
Fix typo in bgl.Buffer report function
...
A GL_INT buffer was reported as GL_BYTE.
2016-07-02 18:38:05 +02:00
21fddf7d1c
C99/C++11: replace deprecated finite() by isfinite().
2016-05-17 21:39:16 +02:00
c12e1a09ec
BLF: use float vector passing color args
2016-04-22 20:02:41 +10:00
b8417501ab
Cleanup: suspicious use of commas
2016-03-04 16:38:41 +11: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
70dfb61300
Cleanup: remove _POSIX_C_SOURCE undefine
2015-10-20 14:06:29 +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
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
02b9921b75
bgl: fix implicit overflow
2015-09-10 03:59:18 +10:00
d4ca74c227
bgl: disable some defines not found in mesa 7
2015-09-10 03:54:40 +10:00
4e759d6735
Fixes T46060 Regenerated the full list of constants we should expose
2015-09-09 18:35:05 +02:00
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
42d65ef5cc
Add bool parser for PyArg_ParseTuple
...
Use for mathutils.bvhtree
2015-08-03 20:00:16 +10:00
03f00eb91d
Docs: doxy corrections
2015-07-31 23:44:37 +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
dc6153453a
Cleanup: comments (remove outdated & update)
2015-07-24 16:59:39 +10:00
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
ea3dae74d8
Cleanup: remove redundant __doc__ from bgl
2015-07-24 09:45:25 +10:00
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
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
616eb6818f
cleanup
2015-02-13 16:17:00 +11:00
2242022653
PyAPI: Replace importlib.reload, not 'imp'
2015-01-23 16:37:30 +11:00
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
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