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-04-08PyAPI: ImBuf.copy now copies the underlying imbufCampbell Barton
Without this, copy wasn't useful.
2021-04-01Cleanup: clang formatCampbell Barton
2021-03-24Cleanup: use new BLI_assert_unreachable macroCampbell Barton
2021-03-18Cleanup: spellingCampbell Barton
2021-02-25PyAPI: expose imbuf.types.ImBuf, include in API docsCampbell Barton
Without this, the ImBuf type wasn't part of documentation.
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-02-17Python: gpu module: add new submodules and typesGermano Cavalcante
This commit extends the gpu python API with: ``` gpu.types.Buffer #"__init__", "to_list" gpu.types.GPUTexture #"__init__", "clear", "read", "format" gpu.types.GPUFrameBuffer #"__init__", "bind", "clear", "is_bound", "viewport", ("__enter__", "__exit__" with "GPUFrameBufferStackContext") gpu.types.GPUUniformBuf #"__init__", "update" gpu.state #"blend_set", "blend_get", "depth_test_set", "depth_test_get", "depth_mask_set", "depth_mask_get", "viewport_set", "viewport_get", "line_width_set", "line_width_get", "point_size_set", "color_mask_set", "face_culling_set", "front_facing_set", "program_point_size_set" ``` Add these methods to existing objects: ``` gpu.types.GPUShader #"uniform_sample", "uniform_buffer" ``` Maniphest Tasks: T80481 Differential Revision: https://developer.blender.org/D8826
2021-02-13Fix T85573: Building with Python 3.10a5 failsCampbell Barton
Replace deprecated _PyUnicode_AsString{AndSize} usage. T83626 still needs to be resolved before 3.10 is usable.
2021-02-12PyAPI: Use PyPreConfig & PyConfig for Python initializationCampbell Barton
Use Python 3.8's API for setting the initial configuration. This replaces a mix of our logic and direct calls to the Python API and has no user visible changes. Using the Python API makes the logic easier to follow and provides utilities such as `PyConfig_SetBytesArgv` that wasn't available in previous releases. Note that this uses Python's utf8/wchar_t conversions, which used to cause problems (see T31506). Since `Py_UTF8Mode` was set, the systems locale isn't used for decoding, allowing us to use Python's utility functions that call `Py_DecodeLocale` internally. Ref D10382
2021-02-12PyAPI: use PyModule_AddType utility functionCampbell Barton
2021-02-12PyAPI: remove Python 3.7x compatibility codeCampbell Barton
This removes Python version checks needed to build with 3.8+ and 3.7x. Ref D10381
2021-02-05Cleanup: use 'r_' prefix for return arguments, order lastCampbell Barton
2021-01-11Revert "Fix typo; Documentation; Expose layer for framebuffer attachament; ↵Germano Cavalcantemano-wii
Add framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask" This reverts commit 9db3d1951da15254efbbcf028176facb78118ec1. This was an accidental commit of the patch D8826
2021-01-11Fix typo; Documentation; Expose layer for framebuffer attachament; Add ↵Germano Cavalcantemano-wii
framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask
2021-01-04Fix imbuf.new & resize allowing zero & negative dimensionsCampbell Barton
2021-01-04Cleanup: remove unused optional argument to imbuf.newCampbell Barton
While this didn't cause any problems, it was incorrect.
2021-01-04Cleanup: use 'pragma once'Campbell Barton
Add explanations for cases the header-guard defines are still used.
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-12-09Fix another id-property name length checkCampbell Barton
Missed this in 6c9263d817b7b4dcd4d6e1f365d1db0a83de6e51
2020-12-09Fix off by one error in id-property name validationCampbell Barton
The Python API accepted a name with 64 bytes, clipping it to 63.
2020-12-09Revert "Fix T78823: Slash in custom property name does not work"Campbell Barton
This reverts commit cbae82ba960a0baaae6437b176a310f078ce07d8. This change introduced the following problems: - We could no longer reliably duplicate or use an existing custom property names. - We could no longer assume a bone or ID name can be used in a custom-property. - Importers that support custom properties (such as FBX) could fail with an exception creating custom properties.
2020-11-11Cleanup: clang-formatCampbell Barton
2020-11-11Cleanup: use preprocessor version check for PyTypeObject declarationCampbell Barton
While `tp_print` was deprecated, Python 3.8+ uses this for 'tp_vectorcall_offset' which wasn't stated in the comment from efd71aad4f22ec0073d80b8dd296015d3f395aa8. Instead of suppressing clang-tidy, use preprocessor a check since this properly represents the difference between Python versions.
2020-11-06Cleanup: use ELEM macro (>2 args)Campbell Barton
2020-11-02Cleanup: use logging for "Found bundled Python" messageCampbell Barton
This was added when Python was initially bundled so any problems finding Python could be investigated. Move this to use logging so we can show this information when needed.
2020-10-14Fix T81688: BPY_thread_save crashes with Python 3.9Campbell Barton
Calling PyEval_ReleaseLock() was crashing with Python 3.9 because it accessed the NULL pointer set by PyThreadState_Swap(). This happened when calling ViewLayer.update() for example. While the existing logic could be fixed by swapping the thread-state back before calling PyEval_ReleaseLock(), this depends on functions which are tagged to be removed by v4.0. Replace use of deprecated functions by calling PyEval_SaveThread(), instead of inlining the logic, using _PyThreadState_UncheckedGet() to prevent Python aborting. The call to PyEval_ThreadsInitialized has been removed as threads are now initialized with Python. This could be replaced with Py_IsInitialized() however it doesn't look like this is necessary. This is compatible with Python 3.7 & 3.9.
2020-10-14Cleanup: multi-line comment blocksCampbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-09Revert "Revert "BGL: Workaround broken bgl usage caused by GPU refactor""Clément Foucault
This reverts commit f23bf4cb109cb8f39f873c4f80acbec3f33b098c.
2020-10-08Revert "BGL: Workaround broken bgl usage caused by GPU refactor"Clément Foucault
This reverts commit f12b0373f322b710b9fa5cebb67bdf363ff90e9f.
2020-10-08BGL: Workaround broken bgl usage caused by GPU refactorClément Foucault
This directly adress the issues caused by rB536c2e0ec916. Since the state tracking is done at a lower level, using the bgl functions needs to be safegarded by the state manager. The current workaround is to bypass `apply_state` when inside a callback that used a `bgl` function. Related to T80730. This fix T81003. Also this fix the default blend equation for callbacks. Fixes T80169 T81289.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-22Fix T78823: Slash in custom property name does not workHans Goudey
Some characters: `'`, `"`, and `\`, can cause problems with RNA paths. Instead of using more complicated handling to deal with those cases, we can just prevent these characters from being used in custom property names. This commit checks for these characters to `idp_try_read_name`, where other checks like length are already done. Differential Revision: https://developer.blender.org/D8839
2020-09-12Cleanup: Remove GLEW dependencies outside of GL moduleClément Foucault
2020-08-20Cleanup: use const variables where possible in the Python APICampbell Barton
2020-08-17Cleanup: Pass 'FILE *' instead of 'void *' for BPY_python_backtraceCampbell Barton
This was committed as a temporary workaround in 82150f5641364 as release builds were failing (only debug builds worked). This adds `stdio.h` to the header which is now split into a file that contains more specialized functionality. Also move function body inside BPY_python_backtrace, removing PyC_StackPrint as we have PyC_StackSpit() for similar functionality that can be called from a debugger.
2020-08-17Cleanup: sort CMake path listsCampbell Barton
2020-08-07Cleanup: PyBGL, Clang-Tidy readability-function-size fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-function-size` rule in the `source/blender/python` module. It's just `BPyInit_bgl()` that's been split up into one or two smaller functions per OpenGL version. No functional changes.
2020-08-07Cleanup: Python, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/python` module. No functional changes.
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-06Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-06Workaround release builds failingCampbell Barton
Issue caused by e9c4325515aed.
2020-08-06Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-06Python: include Python stack trace in the crash logDaniel Bailey
This helps Python developers troubleshoot errors when Python causes a crash.
2020-08-06Cleanup: use doxy sections for py_capi_utils.cCampbell Barton
2020-07-27PyAPI: simplify syntax error reportsCampbell Barton
The result of syntax errors read poorly in reports, resulting in cryptic and unhelpful information. Change PyC_ExceptionBuffer_Simple only to extract the initial text, making syntax errors when entering invalid numeric expressions into buttons easier to follow.
2020-07-23Cleanup: update comments, remove disabled codeCampbell Barton
2020-07-23Cleanup: remove redundant static variable useCampbell Barton
This hasn't been needed since Python 3.7x.
2020-07-22Cleanup: minor changes to doxy sections and namingCampbell Barton
Use py_bl_math prefix instead of M_Math.