Campbell Barton
ea606a7847
Merge branch 'master' into blender28
2017-10-06 21:25:33 +11:00
Campbell Barton
c454d816a9
Cleanup: style
2017-10-06 16:56:41 +11:00
Sergey Sharybin
63c472b4f9
Merge branch 'master' into blender2.8
2017-10-04 22:18:05 +05:00
Campbell Barton
08f728a3e9
Cleanup: redundant casts
2017-10-04 16:52:55 +11:00
Campbell Barton
92272f56e6
PyAPI: fast keyword parsing for __import__
...
No functional changes.
2017-10-04 15:54:41 +11:00
Sergey Sharybin
7fdb9e168d
Merge branch 'master' into blender2.8
2017-09-28 16:13:09 +05:00
Campbell Barton
1f18523edf
Cleanup: switch fall-through warning
2017-09-28 13:41:54 +10:00
Germano
5c6e3ff497
bgl module: extend gl_buffer_type_from_py_format_char function to work with more string formats
...
Only basic types of character codes were being used
2017-09-27 16:07:06 -03:00
Campbell Barton
cc8c064f11
Merge branch 'master' into blender2.8
2017-09-28 03:05:46 +10:00
Campbell Barton
6c98859b77
Cleanup: warning
2017-09-28 02:04:58 +10:00
Germano
2de5e14f53
bgl module: Interpret a buffer as a bgl.Buffer
...
Differential Revision: https://developer.blender.org/D2857
2017-09-27 11:20:00 -03:00
Sergey Sharybin
af170839af
Merge branch 'master' into blender2.8
2017-09-19 21:08:14 +05:00
Campbell Barton
60956397ca
Cleanup: BLI_utildefines prefix for header-only libs
...
This allows to have different macro headers without them sharing
similar names to regular C modules.
2017-09-19 20:16:05 +10:00
Campbell Barton
cb4884f50b
Merge branch 'master' into blender2.8
2017-08-23 20:16:47 +10:00
Campbell Barton
b9513706cb
Cleanup: mark VA_NARGS_COUNT as public
...
Was already used in two other headers, remove underscore prefix.
2017-08-23 20:16:17 +10:00
Campbell Barton
37cfa44222
Cleanup: move variadic defines to their own header
...
So we can use in headers without pulling in many other defines.
2017-08-23 20:16:17 +10:00
Campbell Barton
917d069cdb
Merge branch 'master' into blender2.8
2017-08-23 19:21:52 +10:00
Campbell Barton
55861cb234
PyAPI: avoid instantiating args twice in macro
...
Would cause problems if args included function calls.
2017-08-23 18:48:32 +10:00
Campbell Barton
bd935b5aed
Merge branch 'master' into blender2.8
2017-08-22 18:21:05 +10:00
Campbell Barton
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
Brecht Van Lommel
81a76469ca
Fix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet.
2017-08-21 19:05:17 +02:00
Campbell Barton
2530ae6c74
Merge branch 'master' into blender2.8
2017-08-20 21:22:00 +10:00
Campbell Barton
e27a59d411
Replace BLI_INLINE w/ Py_LOCAL_INLINE for Python
...
Recent inclusion caused build error with the BGE.
2017-08-20 21:14:33 +10:00
Campbell Barton
7497488149
Merge branch 'master' into blender2.8
2017-08-20 15:50:15 +10:00
Campbell Barton
46cf33bf01
PyAPI: Make use of PyC_LongAs... API
...
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.
Some inline exceptions are kept because they show useful details.
2017-08-20 15:49:10 +10:00
Campbell Barton
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
Campbell Barton
193d7d6333
Merge branch 'master' into blender2.8
2017-07-17 13:21:05 +10:00
Campbell Barton
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
Dalai Felinto
e5bf726f44
BGL: Remove deprecated enums
...
Note: The enums that are deprecated and supported are still there
2017-04-18 16:02:17 +02:00
Alexander Romanov
6f268ac55d
Merge branch 'master' into blender2.8
2017-04-13 13:02:39 +03:00
Alexander Romanov
a7b3047cef
Datablock ID Properties
...
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes |Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.
In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.
Original author: @artfunkel
Alexander (Blend4Web Team)
Reviewers: brecht, artfunkel, mont29, campbellbarton
Reviewed By: mont29, campbellbarton
Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne
Maniphest Tasks: T37754
Differential Revision: https://developer.blender.org/D113
2017-04-13 12:33:05 +03:00
Bastien Montagne
346964eb3f
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/editors/gpencil/drawgpencil.c
2017-04-10 16:53:12 +02:00
Jacques Lucke
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
Campbell Barton
3f818c7898
Merge branch 'master' into blender2.8
2017-03-20 09:32:40 +11:00
Campbell Barton
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
Campbell Barton
d863b5182e
Cleanup: use return args last and 'r_' prefix.
2017-03-18 09:39:36 +11:00
Mike Erwin
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
Mike Erwin
0e40f1bac4
OpenGL: remove GLU functions from Python API
...
Part of T49042
2017-03-13 14:08:03 -04:00
Campbell Barton
c1f43c9dc6
Cleanup: warnings
2017-03-02 00:36:33 +11:00
Brecht Van Lommel
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
Mike Erwin
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
Campbell Barton
a96c9def6f
PyAPI: minor optimization for dictionary creation
...
Pass size when its known.
2016-07-31 17:22:04 +10:00
Campbell Barton
e97ab8347a
PyAPI: fix leak in unlikely case converting idprops fail
2016-07-31 16:59:08 +10:00
Campbell Barton
2dfc954c4a
PyAPI: Add PyC_UnicodeAsByteAndSize
...
Read the string length from Python directly when assigning id-properties
2016-07-31 16:52:44 +10:00
Campbell Barton
409316434c
Docs: add initial idprop.types API docs
2016-07-31 15:40:40 +10:00
Campbell Barton
c885cea7bb
Cleanup: spelling
2016-07-16 17:48:57 +10:00
Campbell Barton
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
Campbell Barton
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
Thomas Szepe
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