Commit Graph

5216 Commits

Author SHA1 Message Date
Sergey Sharybin
79312c1912 Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those:

- OB_RECALC* family of flags, which are rudiment of an old
  dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
  as a separate set since the graph itself did not handle
  particle systems.
- DEG_TAG_* which was used to tag IDs.

Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.

Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.

Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.

Fixes T58632: Particle don't update rotation settings
2018-12-07 11:37:38 +01:00
Dalai Felinto
80ffd7b459 Implement bvhtree.fromObject
Passing depsgraph instead of scene, since a scene does not fully define the
state of object you want to use for the BVH.

Also, mesh_create_eval_final_view and mesh_create_eval_final_render are pretty
much the same, so mesh_create_eval_no_deform and
mesh_create_eval_no_deform_render are as well.

Issue reported on: T58734

Reviewers: sergey
https://developer.blender.org/D4032
2018-12-05 07:58:58 -02:00
Campbell Barton
7e21c99d05 PyAPI: add load_factory_startup_post handler
Needed so we can apply changes to the startup file,
only in the case when it's load loaded from a user-saved startup.
2018-11-30 13:33:13 +11:00
Campbell Barton
7ec5a68091 Fix T58240: mathutils.noise.voronoi crash 2018-11-30 11:22:17 +11: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
Brecht Van Lommel
29f75dd7b8 Python API: restore bpy.app.autoexec_fail variables, some scripts use it. 2018-11-23 12:11:41 +01:00
Jacques Lucke
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
Campbell Barton
f0b5a9da01 Cleanup: style, unused 2018-11-20 08:53:00 +11:00
mano-wii
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
Jacques Lucke
6fe1b7158b Py API Docs: Fix wrong type 2018-11-19 10:29:10 +01:00
Jacques Lucke
4fbde56f51 Py API: Fix documentation/actual behavior missmatch in gpu.matrix 2018-11-15 17:10:32 +01:00
Jacques Lucke
4d04235d5f Py API Docs: Fix formatting 2018-11-15 16:54:29 +01:00
Jacques Lucke
69a9bcc206 minor cleanup 2018-11-14 13:06:11 +01:00
Jacques Lucke
61ecd3d24e minor cleanup 2018-11-14 13:06:10 +01:00
Jacques Lucke
8778656692 minor api docs fix 2018-11-14 12:33:10 +01:00
Jacques Lucke
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
Campbell Barton
72369c638d Cleanup: python doc-strings
Indentation & trailing space.
2018-11-14 09:05:07 +11:00
Jacques Lucke
dc6ba4f2ec Py API: fix parameter order in offscreen.draw_view3d 2018-11-13 16:23:31 +01:00
Jacques Lucke
c8975b0fc7 Py API Docs: GPUVertFormat documentation 2018-11-13 15:25:51 +01:00
Jacques Lucke
444f1fd423 Py API Docs: Cleanup 2018-11-13 15:25:51 +01:00
Jacques Lucke
3f478f4260 Py API Docs: GPUIndexBuf documentation 2018-11-13 15:25:51 +01:00
Jacques Lucke
6ae84ddc6e Py API Docs: GPUBatch documentation 2018-11-13 13:00:18 +01:00
Campbell Barton
d81d77d17c Merge branch 'master' into blender2.8 2018-11-11 16:35:44 +11:00
Campbell Barton
89c2ff31d9 PyAPI: update keyword list 2018-11-11 09:37:26 +11:00
Campbell Barton
0121258770 Merge branch 'master' into blender2.8 2018-11-10 10:57:35 +11:00
Campbell Barton
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
Bastien Montagne
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
Bastien Montagne
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
Jacques Lucke
a145c7dc62 Cleanup: No need to save/restor frame buffer twice 2018-11-06 15:46:07 +01:00
Jacques Lucke
a8e9959e07 API Docs: gpu api introduction + examples 2018-11-05 19:28:28 +01:00
Campbell Barton
f667a250f4 Fix bpy.app, sentinel was removed by accident 2018-11-02 07:43:28 +11:00
Brecht Van Lommel
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
Campbell Barton
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
Campbell Barton
b1d2db2c77 Fix leak in successive calls to Batch.program_set 2018-10-31 12:32:57 +11:00
Campbell Barton
205eac3038 PyAPI: add check for exceeding batch VBO limit 2018-10-31 12:11:38 +11:00
Campbell Barton
1a865b4ff0 Cleanup: batch Python API
Add utility function to raise an error.
2018-10-31 12:02:22 +11:00
Campbell Barton
756d1502e4 Fix missing error returns in batch API 2018-10-31 11:55:28 +11:00
mano-wii
974d158f3f PyAPI: GPU: improve GPUShader.from_builtin and GPUShader.code_from_builtin description. 2018-10-30 11:38:42 -03:00
Campbell Barton
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
Campbell Barton
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
Brecht Van Lommel
41a284212a Cleanup: fix compiler warnings. 2018-10-28 17:46:51 +01:00
Campbell Barton
065d19e223 Fix parsing single int for uniform_int
This worked for float but not int.
2018-10-26 11:59:49 +11:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
1d8ba9d618 PyAPI: Make GPUVertFormat() argument optional 2018-10-26 08:06:05 +11:00
Campbell Barton
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