Commit Graph

5245 Commits

Author SHA1 Message Date
Bastien Montagne 0215caeac2 Cleanup: fix typo. 2019-01-07 14:30:45 +01:00
Campbell Barton 6015a03255 Cleanup: naming for return args 2019-01-07 15:34:16 +11:00
Campbell Barton 07287ceda1 Fix T58964: drivers_remove fails w/ missing paths 2019-01-07 15:27:59 +11:00
Campbell Barton b4a77a351e Cleanup: add trailing commas to structs 2019-01-07 09:15:07 +11:00
Campbell Barton 9200dc0eb1 Cleanup: preprocessor indentation 2019-01-03 15:52:07 +11:00
Campbell Barton 72e2a0cfb6 Cleanup: py-gpu error checks
Move gpu initialization checks to the start of each function instead
of mixing with argument parsing.
2019-01-03 01:08:26 +11:00
Campbell Barton d07bc44a96 Revert file rename from T59773 fix
Mixing file rename with other changes should be avoided.

Using 'module_py_api' convention here
is in keeping with imbuf, idprop, blf & bmesh.
No reason for gpu to have a different convention.
2019-01-03 00:55:07 +11:00
mano-wii 945007b32e Fix T59773: Raise exception if the gpu module is used in backgound mode.
Instead of crashing, an error message is displayed if a function of the gpu module is called without a GPU context.

Reviewers: brecht, campbellbarton, JacquesLucke, mont29

Subscribers: abdelmatinboulbayam, amir.shehata

Differential Revision: https://developer.blender.org/D4143
2019-01-02 10:01:46 -02:00
Campbell Barton 1a208f0326 Cleanup: indentation, naming
Use rna naming conventions for unit-settings callbacks.
2019-01-02 17:07:47 +11:00
Campbell Barton 09f46ef6fa PyRNA: enum no longer returns first item when the value isn't found
This hides errors & makes it confusing to debug mistakes
when the enum items aren't correct.

Return an empty string instead.
2019-01-02 16:39:45 +11:00
Campbell Barton bcf0c71433 Cleanup: remove non-existing function declarations 2018-12-31 00:58:54 +11:00
Bastien Montagne b3e68a83f3 Fix T58734: bvhtree.fromObject - error ( returned NULL without setting an error) in blender 2.8.
Would free evaluated mesh even when it was the one cached in runtime
data by depsgraph evaluation!

Also fixes the asserts about using non-eval object in some cases.
2018-12-27 17:21:17 +01:00
Campbell Barton 63fcbfc3a7 RNA: naming, user-preferences -> preferences 2018-12-21 12:55:02 +11:00
Campbell Barton 5921656655 Merge branch 'master' into blender2.8 2018-12-20 12:24:37 +11:00
Campbell Barton 306bc5fd1a PyAPI: don't truncate enums in exception messages
Not necessary and confusing when only some of the items are displayed.

See: T59044
2018-12-20 12:20:34 +11:00
Campbell Barton 65bc931306 Cleanup: argument wrapping indentation 2018-12-20 08:03:48 +11:00
Campbell Barton d46d8e831c Merge branch 'master' into blender2.8 2018-12-19 10:28:26 +11:00
Campbell Barton 5c3953010d Cleanup: spelling 2018-12-19 10:18:15 +11:00
Jacques Lucke 2dee1772e1 Py Docs: documentation for draw_handler_add/remove 2018-12-18 12:31:37 +01:00
Campbell Barton 372fd07a8e Fix paste/append w/ local-view
Paste in local-view wasn't setting local-view bits.
2018-12-18 16:23:38 +11:00
Campbell Barton 4b545d1bbf Fix T58975: "@=" operator silently fails
D4083 by @artfunkel
2018-12-16 09:49:00 +11:00
Alexander Gavrilov de662e7cd3 NLA: insert keyframes correctly for strips with non-Replace mode.
NLA strips support using the keyframe values in a variety of ways:
adding, subtracting, multiplying, linearly mixing with the result
of strips located below in the stack. This is intended for layering
tweaks on top of a base animation.

However, when inserting keyframes into such strips, it simply inserts
the final value of the property, irrespective of these settings. This
in fact makes the feature nearly useless.

To fix this it is necessary to evaluate the NLA stack below the
edited strip and correctly compute the raw key that would produce
the intended final value, according to the mode and influence.

Differential Revision: https://developer.blender.org/D3927
2018-12-14 22:19:18 +03:00
Campbell Barton dd4c87cd04 Merge branch 'master' into blender2.8 2018-12-14 11:09:42 +11:00
Campbell Barton 6e2d9ef2db Cleanup: naming (mean -> median) see T47811 2018-12-14 10:54:11 +11:00
Campbell Barton 49490e5cfb Merge branch 'master' into blender2.8 2018-12-12 13:02:09 +11:00
Campbell Barton e757c4a3be Cleanup: use colon separator after parameter
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
2018-12-12 12:50:58 +11:00
Philipp Oeser eb83efb6d1 Implement BMesh.from_object
Fixes T59069

Reviewers: sergey, brecht

Maniphest Tasks: T59069

Differential Revision: https://developer.blender.org/D4065
2018-12-11 15:20:48 +01:00
Dalai Felinto e7c3f7ba6f Update BVHTree.FromObject API, remove render argument
This information should come from the depsgraph.
2018-12-07 11:55:00 -02:00
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 a5a86f3921 Cleanup: python doc-strings
Indentation & trailing space.
2018-11-14 09:26:53 +11: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