Commit Graph

5212 Commits

Author SHA1 Message Date
c1adf938e6 Timer: Generic BLI_timer with Python wrapper
There is a new `bpy.app.timers` api.
For more details, look in the Python API documentation.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3994
2018-11-26 20:25:15 +01:00
29f75dd7b8 Python API: restore bpy.app.autoexec_fail variables, some scripts use it. 2018-11-23 12:11:41 +01:00
4b06d0bf51 Python API: bpy.app.handlers.depsgraph_update_pre/post
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3978
2018-11-23 11:52:09 +01:00
f0b5a9da01 Cleanup: style, unused 2018-11-20 08:53:00 +11:00
3f59bdc1bd PyAPI: GPUOffscreen: Add context manager for the bind method to work with the with statement.
Differential Revision: https://developer.blender.org/D3918
2018-11-19 10:16:27 -02:00
6fe1b7158b Py API Docs: Fix wrong type 2018-11-19 10:29:10 +01:00
4fbde56f51 Py API: Fix documentation/actual behavior missmatch in gpu.matrix 2018-11-15 17:10:32 +01:00
4d04235d5f Py API Docs: Fix formatting 2018-11-15 16:54:29 +01:00
69a9bcc206 minor cleanup 2018-11-14 13:06:11 +01:00
61ecd3d24e minor cleanup 2018-11-14 13:06:10 +01:00
8778656692 minor api docs fix 2018-11-14 12:33:10 +01:00
92166ecd91 Py API: Remove GPUShader.transform_feedback_enable/disable
It couldn't really be used in the current implementation, so it is better to remove it instead of confusing everyone.
2018-11-14 12:27:09 +01:00
72369c638d Cleanup: python doc-strings
Indentation & trailing space.
2018-11-14 09:05:07 +11:00
dc6ba4f2ec Py API: fix parameter order in offscreen.draw_view3d 2018-11-13 16:23:31 +01:00
c8975b0fc7 Py API Docs: GPUVertFormat documentation 2018-11-13 15:25:51 +01:00
444f1fd423 Py API Docs: Cleanup 2018-11-13 15:25:51 +01:00
3f478f4260 Py API Docs: GPUIndexBuf documentation 2018-11-13 15:25:51 +01:00
6ae84ddc6e Py API Docs: GPUBatch documentation 2018-11-13 13:00:18 +01:00
d81d77d17c Merge branch 'master' into blender2.8 2018-11-11 16:35:44 +11:00
89c2ff31d9 PyAPI: update keyword list 2018-11-11 09:37:26 +11:00
0121258770 Merge branch 'master' into blender2.8 2018-11-10 10:57:35 +11:00
7efac2b0b0 PyAPI: add imports arg to BPY_execute_string
Allows for avoiding `__import__` in expressions,
was already supported for BPY_execute_string_as_* API calls.
2018-11-10 10:55:04 +11:00
Dalai Felinto
49a7bcafd9 gpu.offscreen, fix pydoc, example and rename modelviewmatrix > viewmatrix
Technically this is only the view matrix, not model view matrix.
And view layer was missing from the pydoc.
2018-11-09 13:54:38 -02:00
Dalai Felinto
88d621a68f BKE_id_is_in_gobal_main > BKE_id_is_in_global_main 2018-11-09 10:59:31 -02:00
64ec05b64d Cleanup: remove some useless BKE_library and BKE_main includes.
Makes it simpler to make some changes...

Also fix order of some includes (use alphabetical please).
2018-11-07 20:58:54 +01:00
4b2110fc86 Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'
That kind of implicit includes should really only be done when totally,
absolutely necessary, and ideally only with rather simple 'second-level'
headers.

Otherwise not being explicit with includes always end up biting in
unexpected ways...
2018-11-07 20:58:53 +01:00
Stefan Werner
9d0eac6ba5 Merge branch 'master' into blender2.8 2018-11-07 14:30:09 +01:00
Stefan Werner
2c5531c0a5 Cycles: Added Embree as BVH option for CPU renders.
Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag.
Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly.
There, Embree is off by default too and must be enabled with the WITH_EMBREE flag.

Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint.

TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache).

Differential Revision: https://developer.blender.org/D3682
2018-11-07 12:58:12 +01:00
a145c7dc62 Cleanup: No need to save/restor frame buffer twice 2018-11-06 15:46:07 +01:00
a8e9959e07 API Docs: gpu api introduction + examples 2018-11-05 19:28:28 +01:00
f667a250f4 Fix bpy.app, sentinel was removed by accident 2018-11-02 07:43:28 +11:00
c2bcde5c28 UI: show blocking popup when auto execution of scripts is disabled.
This is important information, and it was easily missed at the top/bottom of
the screen.

Ref T57197.
2018-11-01 19:44:03 +01:00
8d496c2f85 Cleanup: rename PyAPI VertBatch to Batch
Only used for internal functions, follow 'GPU_batch.h' naming.
2018-10-31 12:34:10 +11:00
b1d2db2c77 Fix leak in successive calls to Batch.program_set 2018-10-31 12:32:57 +11:00
205eac3038 PyAPI: add check for exceeding batch VBO limit 2018-10-31 12:11:38 +11:00
1a865b4ff0 Cleanup: batch Python API
Add utility function to raise an error.
2018-10-31 12:02:22 +11:00
756d1502e4 Fix missing error returns in batch API 2018-10-31 11:55:28 +11:00
974d158f3f PyAPI: GPU: improve GPUShader.from_builtin and GPUShader.code_from_builtin description. 2018-10-30 11:38:42 -03:00
f711c44b8d PyAPI: Support for 'None' string args from Python
This is needed because some RNA functions differentiate a NULL 'char *'
argument from an empty string.

Previously a NULL argument could be passed when the C definition
defined the default as NULL and the argument wasn't passed
which is a fairly hidden way of handling things.

Now strings use `PROP_NEVER_NULL` by default
which can be cleared for function arguments that allow None -> NULL.
2018-10-30 16:17:46 +11:00
c750ebe113 PyAPI: remove GPUVertFormat() creation from a list
We already have `attr_add` method,
best not have two ways to do the same thing.

See: D3830
2018-10-29 11:08:55 +11:00
41a284212a Cleanup: fix compiler warnings. 2018-10-28 17:46:51 +01:00
065d19e223 Fix parsing single int for uniform_int
This worked for float but not int.
2018-10-26 11:59:49 +11:00
6c86e1a781 PyAPI: draw handlers now store args in the capsule context
Was using the handlers custom-data which crashes
when Blender frees the screen data before Python removes the handler.
2018-10-26 09:30:17 +11:00
35991d9990 PyAPI: Temp workaround for crash removing cursor
Opening a new file frees the cursors,
add check if the cursor is still valid.

This leaks a Python reference, so a better solution is needed.
2018-10-26 08:49:10 +11:00
1d8ba9d618 PyAPI: Make GPUVertFormat() argument optional 2018-10-26 08:06:05 +11:00
6ed9fcbabc PyAPI: rename GPL VertBuf.attr_fill identifier to id
This is used elsewhere in the API and its a common abbreviation.
2018-10-25 20:34:23 +11:00
1a827e0564 Cleanup: move params into their own struct 2018-10-25 17:20:26 +11:00
ce08b07a89 PyAPI: take paint-cursor space/region type args 2018-10-25 16:27:13 +11:00
6d49b623e2 WM: space, region type filtering for paint cursor
Avoids calling poll on mouse-move for unrelated space/region types.
2018-10-25 16:06:47 +11:00
46587b3ccb PyAPI: support for Python paint cursors 2018-10-25 15:31:02 +11:00