Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-10Python: extra check on `BPY_thread_save()` to ensure proper GIL handlingSybren A. Stüvel
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-10Depsgraph: release GIL when evaluating the depsgraphSybren A. Stüvel
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-09Cleanup: clarify comment about the use of `_PyThreadState_UncheckedGet()`Sybren A. Stüvel
No functional changes.
2021-09-09Cleanup: remove newlines from logging textCampbell Barton
Line endings are already added.
2021-09-09Fix GPU Buffer not allowing uint values greater than one byteGermano Cavalcante
Error in format passed in `PyArg_Parse`
2021-09-08Fix T91255: IDProperty UI as_dict() returns step as default valueHans Goudey
Another typo in this section of code.
2021-09-03Fix T87768: `.path_resolve` fails when requested property is None.Campbell Barton
Add a version of RNA_path_resolve_full that returns true when the path resolves to a NULL RNA pointer.
2021-09-03PyAPI: add read-only 'is_valid' attribute to mathutils typesCampbell Barton
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-02Revert "PyAPI: GPU Shader: add 'state' parameter to uniform sampler"Germano Cavalcante
This reverts commit 2aad8fc7bc2a45d5f749430c7cb9b82b9f6c9e49. It was a commit without proper review. A better API needs to be discussed.
2021-09-02Cleanup: GrammarHans Goudey
2021-09-02Cleanup: de-duplicate logic in bpy keyframing logicCampbell Barton
2021-09-02Cleanup: spelling in commentsCampbell Barton
2021-09-01Fix strict warning about discarding const qualifierSergey Sharybin
Solved by using const qualifier for arguments which aren't mutable in PyC functions. Differential Revision: https://developer.blender.org/D12369
2021-09-01PyAPI: GPU Shader: add 'state' parameter to uniform samplerGermano Cavalcante
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-01Cleanup: use doxygen sections in py_capi_rna.cCampbell Barton
2021-09-01Cleanup: use "pyrna_enum_*" prefix for RNA utility functionsCampbell Barton
2021-09-01Cleanup: move RNA utility functions into a generic moduleCampbell Barton
Avoid having to include bpy_rna.h for enum utility functions, recently added to idprop_py_ui_api.c.
2021-08-31Fix T91088: Assigning custom property value in python resets UI dataHans Goudey
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-31Cleanup: Reduce variable scopeHans Goudey
2021-08-31Fix: Output int for precision in UI data as_dict methodHans Goudey
This is stored internally and used as an integer, so there is no need to convert it to a float for "as_dict". This was just an oversight.
2021-08-31Cleanup: add CTX_data_pointer_set_ptr & CTX_data_list_add_ptrCampbell Barton
Many callers expanded a PointerRNA argument, so add a version of these functions that takes a PointerRNA.
2021-08-31PyDoc: Fix compliation warningAaron Carlisle
2021-08-30Docs: GPU Shader: improvementsGermano Cavalcante
Changes: - line break - enum highlighting - better description
2021-08-27Refactor IDProperty UI data storageHans Goudey
The storage of IDProperty UI data (min, max, default value, etc) is quite complicated. For every property, retrieving a single one of these values involves three string lookups. First for the "_RNA_UI" group property, then another for a group with the property's name, then for the data value name. Not only is this inefficient, it's hard to reason about, unintuitive, and not at all self-explanatory. This commit replaces that system with a UI data struct directly in the IDProperty. If it's not used, the only cost is of a NULL pointer. Beyond storing the description, name, and RNA subtype, derived structs are used to store type specific UI data like min and max. Note that this means that addons using (abusing) the `_RNA_UI` custom property will have to be changed. A few places in the addons repository will be changed after this commit with D9919. **Before** Before, first the _RNA_UI subgroup is retrieved the _RNA_UI group, then the subgroup for the original property, then specific UI data is accessed like any other IDProperty. ``` prop = rna_idprop_ui_prop_get(idproperties_owner, "prop_name", create=True) prop["min"] = 1.0 ``` **After** After, the `id_properties_ui` function for RNA structs returns a python object specifically for managing an IDProperty's UI data. ``` ui_data = idproperties_owner.id_properties_ui("prop_name") ui_data.update(min=1.0) ``` In addition to `update`, there are now other functions: - `as_dict`: Returns a dictionary of the property's UI data. - `clear`: Removes the property's UI data. - `update_from`: Copy UI data between properties, even if they have different owners. Differential Revision: https://developer.blender.org/D9697
2021-08-26PyAPI: GPU: expose clip distancesGermano Cavalcante
Now you can get a shader that uses Clip Planes and set the number of Clip Distanes with `gpu.state.clip_distances_set(value)`.
2021-08-26Fix issues with absolute time unitPhilipp Oeser
I think there are the following issues with {rB5fa6cdb77a98}: - if we introduce a PROP_UNIT_TIME_ABSOLUTE unit, shouldnt it be visible to RNA as well? - seems like a double entry sneaked into that commit? This is in preparation to use this for render time limit in cycles-x. ref. T90701 Maniphest Tasks: T90701 Differential Revision: https://developer.blender.org/D12315
2021-08-24Fix reporting Python reference leaks with WITH_PYTHON_SAFETYCampbell Barton
Error in f3e26c847b6ba0924cfd02641345164c54234425
2021-08-20DocPy: Cleanup missing newline resulting in wrong html generationAaron Carlisle
2021-08-19UI: Remove "Unfitted" Kerning Style OptionHarley Acheson
This patch removes the "Kerning Style" option for UI widget font drawing and uses only the current default of "Fitted", since the other option of "Unfitted" is just the result of truncation errors. see D12231 for much more information. Differential Revision: https://developer.blender.org/D12231 Reviewed by Campbell Barton
2021-08-17Docs: add API docs for gpu.capabilitiesnutti
Adds Python API documentations for gpu.capabilities module. Ref D12226
2021-08-17Cleanup: clang-formatCampbell Barton
2021-08-17Docs: add API docs for gpu.platformnutti
Adds Python API documentations for gpu.platform module. Ref D12222
2021-08-17Cleanup: compiler warningsCampbell Barton
2021-08-16PyAPI: GPUShader: make 'uniform_vector_*' less restrictedGermano Cavalcante
Buffers larger than required may be allowed without restriction.
2021-08-16PyAPI: GPU Buffer: Buffer protocol supportGermano Cavalcante
The code was commented due to lack of testing and short release deadline.
2021-08-16XR: Color Depth AdjustmentsPeter Kim
This addresses reduced visibility of scenes (as displayed in the VR headset) that can result from the 8-bit color depth format currently used for XR swapchain images. By switching to a swapchain format with higher color depth (RGB10_A2, RGBA16, RGBA16F) for supported runtimes, visibility in VR should be noticeably improved. However, current limitations are lack of support for these higher color depth formats by some XR runtimes, especially for OpenGL. Also important to note that GPU_offscreen_create() now explicitly takes in the texture format (eGPUTextureFormat) instead of a "high_bitdepth" boolean. Reviewed By: Julian Eisel, Clément Foucault Differential Revision: http://developer.blender.org/D9842
2021-08-13PyAPI: remove the .py extension requirement for startup registrationCampbell Barton
This was left over from when these scripts were loaded as modules, where their names needed to be compatible with Pythons module naming. Version patch existing files so text with register enabled without a `.py` extension wont start executing on startup. Resolves T89532.
2021-08-12RNA: include base types in RNA_struct_type_find_property searchCampbell Barton
Add RNA_struct_type_find_property_no_base for use in the rare situations when this isn't desired. Resolves T90617, where sequence strip sub-types weren't detecting properties that exist in the base "Sequence" types.
2021-08-12Cleanup: spelling in commentsCampbell Barton
2021-08-12Cleanup: use C++ style comments for disabled codeCampbell Barton
2021-08-11PyAPI: GPU: Expose builtin shadersGermano Cavalcante
Expose `3D_POLYLINE_SMOOTH_COLOR` and `3D_POLYLINE_FLAT_COLOR` builtins. Requested by addon developers.
2021-08-11PyAPI: report unreleased ID's with WITH_PYTHON_SAFETY enabledCampbell Barton
This would have made T88033 more straightforward to track down.
2021-08-10Fix T89253: template_list allows arbitrary data changesGermano Cavalcante
Blender forbids property changes in .draw() methods. But they weren't caught after a call to .template_list() with a custom list type. Support nested calls that disallow writes.
2021-08-09PyAPI: resolve build error with Python 3.10Campbell Barton
Resolves T89931
2021-08-09Cleanup: spelling in commentsCampbell Barton
2021-08-07PyDoc: Fix poll_message_set API documentation to consistent with Python stylenutti
Fix poll_message_set API documentation to consistent with Python style Reviewed By: Blendify Differential Revision: https://developer.blender.org/D12150
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-05Fix slicing with negative indicesCampbell Barton
Negative indices that remained negative after adding the sequence length caused incorrect slicing. With the default scene for example: bpy.context.scene.objects[-4:2] Gave a different result to: tuple(bpy.context.scene.objects)[-4:2] Clamp indices above zero so loops that step forward works as intended.
2021-08-05Fix T89450: Crash slicing BMEditSelSeqCampbell Barton
Slicing with indices greater than the length of the sequence would crash.
2021-08-05Cleanup: make formatAaron Carlisle