Joseph Eagar
a3f4e93497
Merge branch 'master' into sculpt-dev
2021-11-08 13:16:18 -08:00
Hans Goudey
42df2a7b57
Cleanup: Grammar in comments
2021-11-07 23:20:29 -06:00
Julian Eisel
625b2f59f0
Fix GCC warnings after own recent commit
...
Caused by 4e09fd76bc .
2021-11-05 15:32:11 +01:00
Julian Eisel
2986924301
Cleanup: Remove misleading comment
...
Python isn't doing any conversion here. We just do a regular lookup of
the given enum identifier in the RNA enum definition.
2021-11-05 15:32:11 +01:00
Julian Eisel
4e09fd76bc
Cleanup (UI): Add/use type for operator context enum
...
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX`
operator context enum. This adds type safety, allows the compiler to
produce better warnings and helps understanding what a variable is for.
Differential Revision: https://developer.blender.org/D13113
Reviewed by: Campbell Barton
2021-11-05 14:57:26 +01:00
Campbell Barton
82efcfc188
Correct assert checking gizmo type
2021-11-05 15:49:04 +11:00
Campbell Barton
c5ace142e6
Fix PyAPI integer conversion error handling
...
Non integer types raised an OverflowError, even when non-number
types were passed in.
Now the error from Python is kept.
2021-11-05 15:37:17 +11:00
Hans Goudey
efcf36f2e9
Fix T92532: Missing null checks in IDPropertyManager.update_from
...
Calling it with a None argument, or no arguments, or with a property
that is missing UI data for some reason would fail. There is no
particular reason why ensuring those things don't happen is helpful,
so just add null checks for safety.
Differential Revision: https://developer.blender.org/D13024
2021-11-02 07:59:10 -05:00
Aaron Carlisle
4e22a9ab9e
Cleanup: Clang format
2021-10-25 22:18:45 -04:00
Joseph Eagar
d294084432
Merge branch 'master' into sculpt-dev
2021-10-23 23:15:36 -07:00
Xavier Cho
62d64bec2a
Docs: Fixes and improvements in API documentation
...
Fixes several notable mistakes and missing information
regarding the API documentation (*.rst).
This will allow API stub generators like bpystubgen or
fake-bpy-module to produce more accurate result.
Differential Revision: https://developer.blender.org/D12639
2021-10-22 18:27:16 -04:00
Joseph Eagar
1d80f1a2b5
Merge branch 'master' into sculpt-dev
...
Also fixed bug with face set lasso
and face set from mask.
2021-10-20 09:20:19 -07:00
Joseph Eagar
656a922a65
Sculpt: bugfixes
...
* Fixed smooth bug with seam corners.
* Fixed crash.
2021-10-20 08:22:27 -07:00
Campbell Barton
b280699078
Cleanup: use elem macros
2021-10-20 11:16:43 +11:00
Joseph Eagar
38c47e8c03
Merge branch 'master' into sculpt-dev
2021-10-14 15:20:13 -07:00
Campbell Barton
fe958d7d99
Fix leak on exit when WITH_PYTHON_SAFETY is enabled
...
The lead only occurred when Python references were leaking as well.
2021-10-12 17:55:02 +11:00
Campbell Barton
cc6ca13852
Fix T90634: Gizmo.target_set_value() crash without a valid property
...
Raise an exception when target properties have not been set.
2021-10-11 20:19:19 +11:00
Campbell Barton
a6d34f4c3f
Cleanup: add utility functions to parse gizmos and target properties
2021-10-11 20:14:15 +11:00
Campbell Barton
bdd2a7f466
Doc: expand on docstring for PyC_Long_AsBool
2021-10-11 15:33:42 +11:00
Campbell Barton
4d71138738
Docs: note that message-bus subscribers are reset on file load
2021-10-09 00:56:00 +11:00
Sybren A. Stüvel
86643a4e73
Py doc: document msgbus subscriptions clearing on blendfile load
...
Document that `bpy.msgbus.subscribe_rna()`-registered messagebus
subscriptions will be cleared whenever a new blend file is loaded.
Passing `options={'PERSISTENT'}` has no influence on this behaviour.
2021-10-08 14:06:30 +02:00
Joseph Eagar
c2f2a8260c
Merge branch 'master' into sculpt-dev
2021-10-06 18:33:08 -07:00
Campbell Barton
df8f507f41
Cleanup: spelling in comments
2021-10-06 14:54:05 +11:00
Campbell Barton
f49dff97d4
Cleanup: spelling in strings
2021-10-03 12:13:29 +11:00
Joseph Eagar
7327e15630
Merge branch 'master' into sculpt-dev
2021-10-02 03:22:22 -07:00
Joseph Eagar
eb9a5e8f8b
Sculpt: more brush stuff
...
* Move more dyntopo settings to brush channels
* Implemented the unprojected radius hack in
the new brush system. I'm not really happy
with it, but doing it properly is going to
take some thought.
2021-09-24 02:38:20 -07:00
Campbell Barton
b659d1a560
Cleanup: spelling in comments
2021-09-23 22:08:02 +10:00
Joseph Eagar
87feba04dd
Sculpt: more brush engine stuff; do not test.
...
Pushing this commit early due to computer
weirdness
2021-09-19 01:11:35 -07:00
Joseph Eagar
627edd1efa
Merge branch 'master' into temp_bmesh_multires
2021-09-16 13:44:21 -07:00
Campbell Barton
0e329a967e
Fix memory leak if an error occurred assigning id-property sequence
2021-09-16 16:39:42 +10:00
Jon Denning
e0394761b9
GPUShader: Expose name for debugging & identifying shaders
...
Added optional `name` argument to `GPUShader` constructor
(defaults to `pyGPUShader`), and added `name` getter to `GPUShader`.
Ref D12393
Reviewed By: campbellbarton, jbakker
2021-09-13 16:16:45 +10:00
Sybren A. Stüvel
0467ff4053
Python: extra check on BPY_thread_save() to ensure proper GIL handling
...
Use `_PyThreadState_UncheckedGet()` to check that the current thread is
tracked by Python before checking whether it has the GIL. The latter
will abort when the former is false.
2021-09-10 14:58:02 +02:00
Sybren A. Stüvel
fe4286435c
Depsgraph: release GIL when evaluating the depsgraph
...
Evaluating the dependency graph potentially executes Python code when
evaluating drivers. In specific situations (see T91046) this could
deadlock Blender entirely. Temporarily releasing the GIL when evaluating
the depsgraph resolves this.
This is an improved version of
rBfc460351170478e712740ae1917a2e24803eba3b, thanks @brecht for the diff!
Manifest task: T91046
2021-09-10 11:03:54 +02:00
Sybren A. Stüvel
da50cd86a7
Cleanup: clarify comment about the use of _PyThreadState_UncheckedGet()
...
No functional changes.
2021-09-09 14:27:33 +02:00
Campbell Barton
3da09f4e29
Cleanup: remove newlines from logging text
...
Line endings are already added.
2021-09-09 16:26:15 +10:00
Germano Cavalcante
a131e3bec7
Fix GPU Buffer not allowing uint values greater than one byte
...
Error in format passed in `PyArg_Parse`
2021-09-08 20:28:00 -03:00
Hans Goudey
4e91cd5c11
Fix T91255: IDProperty UI as_dict() returns step as default value
...
Another typo in this section of code.
2021-09-08 15:46:02 -05:00
Campbell Barton
f9ccd26b03
Fix T87768: .path_resolve fails when requested property is None.
...
Add a version of RNA_path_resolve_full that returns true
when the path resolves to a NULL RNA pointer.
2021-09-03 21:58:52 +10:00
Campbell Barton
0950cfd9d5
PyAPI: add read-only 'is_valid' attribute to mathutils types
...
There was no convenient way to check if the owner
of a mathutils type was valid.
Added to support issue reported in T91111.
2021-09-03 21:21:44 +10:00
Germano Cavalcante
8849bed671
Revert "PyAPI: GPU Shader: add 'state' parameter to uniform sampler"
...
This reverts commit 2aad8fc7bc .
It was a commit without proper review.
A better API needs to be discussed.
2021-09-02 10:19:58 -03:00
Joseph Eagar
2b20931707
Merge branch 'master' into temp_bmesh_multires
2021-09-02 00:02:20 -07:00
Hans Goudey
4170668776
Cleanup: Grammar
2021-09-01 22:22:35 -05:00
Campbell Barton
011d3a95e0
Cleanup: de-duplicate logic in bpy keyframing logic
2021-09-02 11:41:01 +10:00
Campbell Barton
f8dd0d0dba
Cleanup: spelling in comments
2021-09-02 11:08:38 +10:00
Sergey Sharybin
083a8921ec
Fix strict warning about discarding const qualifier
...
Solved by using const qualifier for arguments which aren't mutable
in PyC functions.
Differential Revision: https://developer.blender.org/D12369
2021-09-01 17:00:08 +02:00
Germano Cavalcante
2aad8fc7bc
PyAPI: GPU Shader: add 'state' parameter to uniform sampler
...
Now you can choose the state of texture (as a filter and repetition) to
render it.
This is important as the original state is very limited.
2021-09-01 10:39:14 -03:00
Campbell Barton
93c6b12df5
Cleanup: use doxygen sections in py_capi_rna.c
2021-09-01 17:00:47 +10:00
Campbell Barton
89fa9aada5
Cleanup: use "pyrna_enum_*" prefix for RNA utility functions
2021-09-01 16:50:48 +10:00
Campbell Barton
1730829592
Cleanup: move RNA utility functions into a generic module
...
Avoid having to include bpy_rna.h for enum utility functions,
recently added to idprop_py_ui_api.c.
2021-09-01 16:33:42 +10:00
Hans Goudey
60fba8202c
Fix T91088: Assigning custom property value in python resets UI data
...
Assigning a new value to an IDProperty with the Python API would free
the entire contents of the existing property, which unfortunately
happened to include the UI data. The fix is to extract the UI data from
the existing property before freeing its contents. An alternative
would be adding another argument to `IDP_FreePropertyContent_ex`, but
this solution is clearer and doesn't increase complexity elsewhere.
2021-08-31 11:49:12 -05:00