Commit Graph

646 Commits

Author SHA1 Message Date
Jacques Lucke
884638494d Python API: Fix partial build
`gpu_extras` was always visible
2018-11-27 10:56:37 +01:00
Jacques Lucke
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
d203234dd0 Python API Docs: better titles.
The HTML title did not make it clear that these are docs for the API rather
than a general Blender documentation. Some of the page titles were also too
long and redundant.
2018-11-21 19:31:20 +01:00
Campbell Barton
3c8c976086 Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
Jacques Lucke
422992a135 Py API Docs: use new bind context manager in gpu examples 2018-11-19 14:32:51 +01:00
Jacques Lucke
78207eac9b Py API Docs: New custom shader example 2018-11-14 18:41:33 +01:00
Jacques Lucke
9caa587519 Py API Docs: Remove older GPUOffScreen example
I think this example does not belong into the api docs and certainly not in the place where it was until now.
Maybe this can become a template in Blender but personally I don't see much value in it as an "official example" because it is hard to see what is going on exactly.
There are a few other examples that show how to use the GPUOffScreen object now.
2018-11-13 16:43:17 +01:00
Jacques Lucke
3aa30406dd Py API Docs: New Example for off screen rendering 2018-11-13 16:38:12 +01:00
Jacques Lucke
15a5cc6ca0 Py API Docs: another use case for offscreen rendering 2018-11-12 17:54:51 +01:00
Jacques Lucke
406452ec5d Py API Docs: Another example for offscreen rendering 2018-11-12 17:17:59 +01:00
Jacques Lucke
ded780f13e Py API Docs: fix typos/wording
found by Omar Ahmad
2018-11-12 13:48:31 +01:00
Jacques Lucke
492dbae4d1 Py API Docs: Restructure gpu module introduction 2018-11-12 12:14:18 +01:00
Jacques Lucke
a4bfccc439 Py API Docs: More gpu module documentation 2018-11-09 19:20:55 +01: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
Campbell Barton
f12d2adc87 RNA: Object.select_set use boolean, only select
- Was setting active state, making it necessary to backup/restore
  active object in cases where this isn't needed.
  Existing scripts are explicitly setting the active object when needed.

- Use a boolean select arg (toggle selection wasn't used anywhere).

- Add an optional view layer argument since scripts should be able to
  operate outside the user context.
2018-11-08 08:54:55 +11:00
Jacques Lucke
b82eac8986 Py API Docs: improve 2D image example 2018-11-07 16:14:11 +01:00
Jacques Lucke
9a38526be0 Py API Docs: show gpu_extras module 2018-11-07 15:45:28 +01:00
Bastien Montagne
7b38df41ae Fix/cleanup RNA viewlayer API.
RNA's ViewLayer would present 'first level' of layer collection as a
list (collection property), when it is actually now only a single item,
same as the scene's master collection.

Note: did not try to update view_layer python tests, those are already
fully broken for quiet some time I guess (they still assume
view_layer.collections to be mutable e.g.)...
2018-11-06 17:20:49 +01:00
Bastien Montagne
a22167b9a2 Fix/Updated Object API example.
Was still 2.7x code... ;)
2018-11-05 20:42:00 +01:00
Jacques Lucke
a8e9959e07 API Docs: gpu api introduction + examples 2018-11-05 19:28:28 +01:00
Campbell Barton
ca8fee62ab Update gpu offscreen PyAPI example 2018-10-26 12:13:03 +11:00
Bastien Montagne
af58646467 Fix py API docgen script for new context members. 2018-10-19 20:13:50 +02:00
e65784a051 Python API: add loop triangles access, remove tessfaces.
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.

Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.

Details on porting code to loop triangles is in the release notes.

Differential Revision: https://developer.blender.org/D3539
2018-10-10 17:43:44 +02:00
Campbell Barton
6ebe211644 Cleanup: pep8 2018-09-27 09:41:18 +10:00
Dalai Felinto
a3020d5558 Fixup for gpu.types.GPUOffscreen.py example
Addressing the changes introduced on: 43fa51835adee390aa4bcb9fe3bda1034480b7cf
2018-09-21 13:34:53 -03:00
mano-wii
43fa51835a gpu.types.GPUOffscreen.py example file: Move the shader reference removal code to execute on __main__ 2018-09-21 13:26:23 -03:00
mano-wii
964bb28e21 gpu.types.GPUOffscreen.py example file: Delete the reference of the previous shader.
Strange that the `bpy.utils.register_class` utility does not remove the reference of the class with same name.
2018-09-21 12:36:38 -03:00
Dalai Felinto
fbc837b2f8 Updated gpu.types.GPUOffscreen.py example file
The image I get is a bit too dark, which is the same I get in the viewport
itself when there is no Display Device. So I believe for cases like this
we need to have color management on top of the buffer.

Also, on EEVEE it looks like it needs to clear some extra buffers. You can see
that, by rotating the camera view around.

That said, this is the first step to bring back fun addons
that use external offscreen buffers.

Note: When using gpu offscreen with POST_VIEW (as oppose to POST_PIXEL)
I get a crash with DST having 0xFF..
2018-09-20 22:21:19 +00:00
6b433f4eb3 Merge branch 'master' into blender2.8 2018-09-19 18:20:50 +02: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
Campbell Barton
83d4328ce7 PyDoc: add gpu.shader
Also some syntax corrections.
2018-09-15 10:35:03 +10:00
Campbell Barton
aacdd28edd PyDoc: add bpy.app.icons to docs 2018-09-13 19:21:08 +10:00
Campbell Barton
1c2358224f Merge branch 'master' into blender2.8 2018-09-13 16:35:09 +10:00
Campbell Barton
c062d360ca PyDoc: replace use of deprecated API call 2018-09-13 16:33:34 +10:00
Campbell Barton
a4e4dc1b75 Merge branch 'master' into blender2.8 2018-09-13 15:39:21 +10:00
Campbell Barton
ffe5b92325 PyDoc: disable ASAN exit code for doc building
Prevented docs from building on any minor issue when ASAN was enabled.
2018-09-13 15:37:30 +10:00
e0a4dc6a79 UI / Python: rename X-Ray to In Front, Draw to Display.
See T56648.
2018-09-06 13:26:46 +02:00
mano-wii
6d04e48539 Join the python modules gpu and _gpu into one.
Maybe it's still early to set the new drawing api for python.
But joining these two modules is an initial step.

```
>>> gpu.
        matrix
        select
        types
```
```
>>> gpu.types.GPU
                 Batch(
                 OffScreen(
                 VertBuf(
                 VertFormat(
```
The creation of a new offscreen object is now done by the `GPUOffscreen.__new__` method.

Reviewers: campbellbarton, dfelinto

Reviewed By: campbellbarton, dfelinto

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3667
2018-09-05 21:15:44 -03:00
Bastien Montagne
a43ebc63fa Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/collision.c
2018-09-03 17:44:36 +02:00
4da2acae3a Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3668
2018-09-03 16:55:01 +02:00
0d085790d1 Python / Cleanup: rename INFO_MT to TOPBAR_MT/VIEW3D_MT to reflect actual location. 2018-08-29 16:25:50 +02:00
Campbell Barton
590a6b5269 Cleanup: pep8 2018-08-28 21:01:22 +10:00
Campbell Barton
e9fb2feb2e UI: text keyword argument to label
Prepare for keyword only args
2018-08-28 12:34:51 +10:00
Andrew Hale
1e6a5eb087 Implement BMesh Operator string enumerators and docs generation.
Partial implementation of T56496 for review.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3635
2018-08-27 16:15:54 +02:00
Campbell Barton
f689c821f0 Documentation: fixes for building w/ 2.8
Note, bpy.app.icons needs to be supported eventually.
2018-08-17 00:02:36 +10:00
Campbell Barton
3730839958 Correct error in py doc generation 2018-08-14 22:18:46 +10:00
Aaron Carlisle
12acf1e4f8 Cleanup: Update some links to new wiki 2018-08-13 21:55:30 -04:00
Aaron Carlisle
0e7dd01944 PyDoc: remove old undocumented message 2018-08-13 21:43:51 -04:00
Aaron Carlisle
e040cfe15a PyDoc: Remove "API" from version 2018-08-13 20:53:45 -04:00
Aaron Carlisle
44871e0e0f Pydoc: Switch theme to sphinx_rtd_theme 2018-08-13 20:51:36 -04:00