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-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-10-07Cleanup: redundant parenthesisCampbell Barton
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-25Cleanup: remove redundant double parenthesisCampbell 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-08-25BLI_math: ensure non-negative matrices for mat3_to_quat calculationsCampbell Barton
Making the callers responsible for this isn't practical as matrices are often passed indirectly to a functions such as mat3_to_axis_angle, BKE_object_mat3_to_rot & BKE_pchan_mat3_to_rot. Or the matrix is combined from other matrices which could be negative. Given quaternions calculated from negative matrices are completely invalid and checking only needs to negate matrices with a negative determinant, move the check into mat3_to_quat and related functions. Add mat3_normalized_to_quat_fast for cases no error checking on the input matrix is needed such as blending rotations.
2022-08-24Fix Quaternion.rotate(matrix) with negative matricesCampbell Barton
Rotating a quaternion by a negative matrix gave an invalid result. Follow up fix for T94231 which negated negative matrices too.
2022-05-25Cleanup: use doxy sections for mathutils typesCampbell Barton
Also minor improvements & corrections to comments.
2022-03-28Cleanup: use "num" as a suffix in: source/blender/pythonCampbell Barton
See T85728
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-11Cleanup: correct exception messageCampbell Barton
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-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
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.
2020-11-19Fix error message prefix in `Quaternion.to_euler()`Sybren A. Stüvel
Fix copy-paste error of error message prefix, so that the Quaternion function no longer says it's a Matrix function error.
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-07-14PyAPI: support element multiplication for vector, matrix, quaternionsCampbell Barton
This was disabled during 2.8x for smooth porting of 2.7x scripts, Now '@' is used for matrix multiplication, support '*' to multiple vector elements. See T56276.
2020-06-22Python: support building again version 3.9 (unreleased)Campbell Barton
Resolves T78089, no functional changes.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-20Cleanup: use named unsigned types in the Python APICampbell Barton
2019-12-20Cleanup: remove redundant 'char *' castsCampbell Barton
2019-11-26PyAPI: add Quaternion.make_compatibleCampbell Barton
2019-11-15Docs: correct indent for to_swing_twist docstringCampbell Barton
2019-10-16Cleanup: warnings building with Python 3.8Campbell Barton
2019-09-22Mathutils: expose the swing + twist Quaternion decomposition to Python.Alexander Gavrilov
This decomposition is useful in rigging, and involves a math trick.
2019-08-16Cleanup: spellingCampbell Barton
2019-08-04Cleanup: spellingCampbell Barton
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-04-17Fix T63673: Wrong api documentation for Quaternion.dot(other)Jacques Lucke
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-29Cleanup: style, use braces for the Python APICampbell Barton
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-19Cleanup: add trailing commasCampbell Barton
Prevents clang-format merging into a single line.
2018-11-14Cleanup: python doc-stringsCampbell Barton
Indentation & trailing space.
2018-09-19Merge branch 'master' into blender2.8Campbell Barton
2018-09-19BLI_utildefines: rename pointer conversion macrosCampbell Barton
Terms get/set don't make much sense when casting values. Name macros so the conversion is obvious, use common prefix for easier completion. - GET_INT_FROM_POINTER -> POINTER_AS_INT - SET_INT_IN_POINTER -> POINTER_FROM_INT - GET_UINT_FROM_POINTER -> POINTER_AS_UINT - SET_UINT_IN_POINTER -> POINTER_FROM_UINT
2018-08-22Cleanup: styleCampbell Barton
2018-08-10Python: Add support for @ infix operator matrix multiplicationAndrew Hale
This differential revision implements the code for T56276 Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D3587
2018-07-16Fix T55527: creating a Quaternion without args should result in identityPhilipp Oeser
quaternion Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D3487
2018-06-26PyAPI: move deep-copy args check to py_capi_utilsCampbell Barton
2017-05-20CMake: Use GCC7's -Wimplicit-fallthrough=5Campbell Barton
Use to avoid accidental missing break statements, use ATTR_FALLTHROUGH to suppress.
2016-05-17C99/C++11: replace deprecated finite() by isfinite().Brecht Van Lommel
2015-10-24Cleanup: use quat to eul w/ mathutils APICampbell Barton
2015-10-23BLI_math: add mat3_normalized_to_* functionsCampbell Barton
Many uses of matrices for rotation keep them normalized, so no need to normalize each time.
2015-02-15missed this second last commitCampbell Barton