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
2022-11-11Merge branch 'master' into refactor-mesh-position-genericrefactor-mesh-position-genericHans Goudey
2022-11-08Merge branch 'blender-v3.4-release'Sergey Sharybin
2022-11-08Fix deprecation warnings about printf() on macOSSergey Sharybin
The new Xcode 14.1 brings the new Apple Clang compiler which considers sprintf unsafe and geenrates deprecation warnings suggesting to sue snprintf instead. This only happens for C++ code by default, and C code can still use sprintf without any warning. This changes does the following: - Whenever is trivial replace sprintf() with BLI_snprintf. - For all other cases use the newly introduced BLI_sprintf which is a wrapper around sprintf() but without warning. There is a discouragement note in the BLI_sprintf comment to suggest use of BLI_snprintf when the size is known. Differential Revision: https://developer.blender.org/D16410
2022-11-08PyAPI: add invalid objects check for RNA struct keys()/values()/items()Campbell Barton
2022-11-08Merge branch 'blender-v3.4-release'Campbell Barton
2022-11-08Fix invalid function signatures for PySequenceMethods callbacksCampbell Barton
Function casts hid casting between potentially incompatible type signatures (using int instead of Py_ssize_t). As it happens this seems not to have caused any bugs on supported platforms so this change is mainly for correctness and to avoid problems in the future.
2022-11-08Cleanup: correct type of RNA struct methodsCampbell Barton
Some BPy_StructRNA methods used BPy_PropertyRNA in their function signatures, while this didn't case any bugs, it could lead to issues in the future.
2022-11-08Cleanup: PyMethodDef formattingCampbell Barton
Missed these changes in [0]. Also replace designated initializers in some C code, as it's not used often and would need to be removed when converting to C++. [0] e555ede626dade2c9b6449ec7dcdda22b2585fd4
2022-11-07Cleanup: unify struct declaration style for Python types, update namesCampbell Barton
Use struct identifiers in comments before the value. This has some advantages: - The struct identifiers didn't mix well with other code-comments, where other comments were wrapped onto the next line. - Minor changes could re-align all other comments in the struct. - PyVarObject_HEAD_INIT & tp_name are no longer placed on the same line. Remove overly verbose comments copied from PyTypeObject (Python v2.x), these aren't especially helpful and get outdated. Also corrected some outdated names: - PyTypeObject.tp_print -> tp_vectorcall_offset - PyTypeObject.tp_reserved -> tp_as_async
2022-11-03Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-11-02Cleanup: spelling in commentsCampbell Barton
2022-11-01Cleanup: spelling in commentsCampbell Barton
2022-10-31GPU: Add placeholder for Vulkan backend.Jeroen Bakker
This patch adds a placeholder for the vulkan backend. When activated (`WITH_VULKAN_BACKEND=On` and `--gpu-backend vulkan`) it might open a blender screen, but nothing should be visible as none of the functions are implemented or otherwise crash on a nullptr. This is expected as this is just a placeholder. The goal is to add shader compilation +validation to this backend as one of the next steps so we can validate changes to existing shaders on OpenGL, Metal and Vulkan at the same time. Reviewed By: fclem Differential Revision: https://developer.blender.org/D16338
2022-10-21GPU: Add gpu.platform.backend_type_get function.Jeroen Bakker
Function returns the active GPU backend type.
2022-10-14Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-10-10UI: show the windowing environment in the "About" splashCampbell Barton
Show the windowing environment on non MS-Windows/Apple systems, since X11/WAYLAND are selected startup there was no convenient way for users to know which back-end was being used. Include the windowing environment in the About splash & system-info.txt since it will be useful for handling bug reports. This commit adds a private API call not intended for general use as I would like to be able to remove this later and it's only needed in the specific case of testing if Blender is using WAYLAND or X11 (which maybe be used via XWayland). Python scripts can already inspect the system to check which windowing environment used, the API call is mainly useful for troubleshooting.
2022-10-08Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-10-07Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-10-06Fix T101591: mathutils.geometry.intersect_line_line 2D vector errorCampbell Barton
Uninitialized stack memory was used when intersecting 2D vectors.
2022-10-05Fix order of include-guard & C++ extern blockCampbell Barton
2022-10-05Fix error in 6b76381e0a52cf15513087e470a4a4c07471acc6Campbell Barton
Missed flipping arguments for caller.
2022-10-04Cleanup: rename BKE_appdir_folder_id_version, improve doc-stringsCampbell Barton
Rename BKE_appdir_folder_id_version to BKE_appdir_resource_path_id_with_version because BKE_appdir_folder_id and BKE_appdir_folder_id_version didn't accept compatible arguments. Also add notes to GHOST_getSystemDir & GHOST_getUserDir that BKE_appdir_resource_path_id(..) should be used instead (in most cases).
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-10-03Cleanup: fix source comment/documentation typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D16071
2022-10-03Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-09-28Fix GC tracking error for instances of mathutils typesCampbell Barton
Mathutils types were always GC tracked even when it wasn't intended. Not having to track objects speeds up Python execution. In an isolated benchmark created to stress test the GC creating 4-million vectors (re-assigning them 100 times), this gives an overall ~2.5x speedup, see: P3221. Details: Since [0] (which added support for sub-classed mathutils types) tp_alloc was called which defaults to PyType_GenericAlloc which always GC tracked the resulting object when Py_TPFLAGS_HAVE_GC was set. Avoid using PyType_GenericAlloc unless the type is sub-classed, in that case the object is un-tracked. Add asserts that the tracked state is as expected before tracking & un-tracking, to ensure changes to object creation don't cause objects to be tracked unintentionally. Also assign the PyTypeObject.tp_is_gc callback so types optionally GC track objects only do so when an object is referenced. [0]: fbd936494495d0de54eef24a97957e000306785f
2022-09-28Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-09-28Cleanup: improve 2D convex hullChris Blackbourn
Improve correctness, API, comments, memory usage and performance of the 2D convex hull calculation. Pre-requisite for UV packing improvements. Differential Revision: https://developer.blender.org/D16055
2022-09-26Python: Add platform feature support methods to `gpu.capabilities` module.Jeroen Bakker
Depending on the actual platform, Blender will disable features that are known to have a faulty implementation. Add-on developers or users don't have the ability to check what is actually enabled. This patch will add the ability to check for * Compute shader support `gpu.capabilities.compute_shader_support_get()`. * SSBO support `gpu.capabilities.shader_storage_buffer_objects_support_get()`. * Image load/store `gpu.capabilities.shader_image_load_store_support_get()`.
2022-09-26Cleanup: remove redundant parenthesisCampbell Barton
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
2022-09-24BLF: Refactor of DPIHarley Acheson
Correction of U.dpi to hold actual monitor DPI. Simplify font sizing by omitting DPI as API argument, always using 72 internally. See D15961 for more details. Differential Revision: https://developer.blender.org/D15961 Reviewed by Campbell Barton
2022-09-23Merge branch 'refactor-mesh-selection-generic' into ↵Hans Goudey
refactor-mesh-position-generic
2022-09-23Cleanup: spelling in commentsCampbell Barton
2022-09-22PyGPU: Allow single bool in 'GPUShader.uniform_bool' methodGermano Cavalcante
As with the other uniform methods, a single value is expected.
2022-09-21Merge branch 'refactor-mesh-selection-generic' into ↵Hans Goudey
refactor-mesh-position-generic
2022-09-21PyAPI: disable IMB color management methods for stand-alone mathutilsCampbell Barton
Allow building a standalone mathutils without including imbuf.
2022-09-21Merge branch 'refactor-mesh-selection-generic' into ↵Hans Goudey
refactor-mesh-position-generic
2022-09-21Cleanup: spelling in commentsCampbell Barton
2022-09-19Merge branch 'refactor-mesh-selection-generic' into ↵Hans Goudey
refactor-mesh-position-generic
2022-09-19PyGPU: call 'GPU_shader_bind' in 'GPUShader.uniform_' methodsGermano Cavalcante
This simplifies python code. When we call a method like shader.uniform_float("color", (1,1,1,1)), we expect the shader's uniform to be updated regardless of whether the shader is bound or not. And `batch.draw()` already calls `GPU_shader_bind` inside. Differential Revision: https://developer.blender.org/D15929
2022-09-19Cleanup: spellingCampbell Barton
2022-09-19Cleanup: prefer 'arg' over 'params' for sphinx documentationCampbell Barton
While both are supported, 'arg' is in more common use so prefer it.
2022-09-18Build: limit Py_ENABLE_SHARED to modules using Python headersBrecht Van Lommel
And remove Python flags from nodes, no longer needed.
2022-09-17PyDoc: correct parameter doc-strings & exception messageCampbell Barton
2022-09-16Cleanup: spelling in commentsCampbell Barton
2022-09-15Merge branch 'refactor-mesh-selection-generic' into ↵Hans Goudey
refactor-mesh-position-generic