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-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-09-08Cleanup: correct PyModuleDef.m_slots referenceCampbell Barton
Changed in Python 3.5, match Python's internal name.
2022-09-07Cleanup: Tweak naming for recently added mesh accessorsHans Goudey
Use `verts` instead of `vertices` and `polys` instead of `polygons` in the API added in 05952aa94d33eeb50. This aligns better with existing naming where the shorter names are much more common.
2022-09-05Mesh: Remove redundant custom data pointersHans Goudey
For copy-on-write, we want to share attribute arrays between meshes where possible. Mutable pointers like `Mesh.mvert` make that difficult by making ownership vague. They also make code more complex by adding redundancy. The simplest solution is just removing them and retrieving layers from `CustomData` as needed. Similar changes have already been applied to curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of the pointers generally makes code more obvious and more reusable. Mesh data is now accessed with a C++ API (`Mesh::edges()` or `Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`). The CoW changes this commit makes possible are described in T95845 and T95842, and started in D14139 and D14140. The change also simplifies the ongoing mesh struct-of-array refactors from T95965. **RNA/Python Access Performance** Theoretically, accessing mesh elements with the RNA API may become slower, since the layer needs to be found on every random access. However, overhead is already high enough that this doesn't make a noticible differenc, and performance is actually improved in some cases. Random access can be up to 10% faster, but other situations might be a bit slower. Generally using `foreach_get/set` are the best way to improve performance. See the differential revision for more discussion about Python performance. Cycles has been updated to use raw pointers and the internal Blender mesh types, mostly because there is no sense in having this overhead when it's already compiled with Blender. In my tests this roughly halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million face grid). Differential Revision: https://developer.blender.org/D15488
2022-02-21Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-21Fix: Avoid potential use of dirty normalsHans Goudey
Instead of accessing the `CD_NORMAL` layer directly, use the proper API for accessing mesh normals. Even if the layer exists, the values might be incorrect due to a deformation. Related to ef0e21f0ae71d, 969c4a45ce09100e, and T95839.
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
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-24Cleanup: update clang-format so PyObject_HEAD indents properlyCampbell Barton
2021-06-07Cleanup: remove redundant cast, use const castsCampbell Barton
2021-06-01BMesh: remove checks for tessellating 2 sided facesCampbell Barton
2 sided faces aren't supported and will cause problems in many areas of Blender's code. Removing (implied) support for faces with fewer than 3 sides means the total number of triangles is known ahead of time. This simplifies adding support for multi-threading and partial updates to an existing tessellation - as the face and loop indices can be used to access the range of triangles associated with a face. Also correct outdated comments.
2021-02-18Cleanup: Python: naming mismatch in bvh.ray_cast.Jeroen Bakker
2021-02-12PyAPI: use PyModule_AddType utility functionCampbell Barton
2020-08-20Cleanup: use const variables where possible in the Python APICampbell Barton
2020-08-18Mesh: merge `mesh_create_eval_final_{view,render}` functionsSybren A. Stüvel
Functions `mesh_create_eval_final_view()` and `mesh_create_eval_final_render()` were doing the exact same thing, except for a hack introduced in d3eb9dddd6b4 (2012-10-08, Better fix for T32846: dupligroup messes up particle instancing on rendering) that appears to be no longer necessary. Besides that, these functions had confusing names. Their functionality changed over time, and whether to do for-render or for-viewport evaluation is now actually determined by the depsgraph evaluation mode. This means that the `..._render` function could evaluate a mesh with viewport settings, and vice versa. The functions are now merged into `mesh_create_eval_final()`, and the hack has been removed. The `OB_NO_PSYS_UPDATE` flag has been removed entirely (instead of keeping it around as deprecated flag), because it was always only temporarily set on objects during mesh evaluation and thus not saved to the blend file. No expected functional changes as far as users are concerned.
2020-08-13Cleanup: clang-formatCampbell Barton
2020-08-10Merge branch 'blender-v2.90-release'Germano Cavalcante
2020-08-10Fix T78113: Random explosions of cloth with self collisionGermano Cavalcante
The problem is caused by a lack of prediction in the `isect_line_segment_tri_v3` that incorrectly confirms some intersections of coplanar segments to the triangle. The solution is to use another algorithm to detect intersections. This also resulted in a slight improvement in the performance: - 1min 17sec to 1min 6sec in my test file Differential Revision: https://developer.blender.org/D8500
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-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-02-20Cleanup: use named unsigned types in the Python APICampbell Barton
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-12-20Cleanup: remove redundant 'char *' castsCampbell Barton
2019-10-16Cleanup: warnings building with Python 3.8Campbell Barton
2019-06-12Cleanup: spelling in commentsCampbell Barton
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-04-16Cleanup: trailing commasCampbell Barton
2019-03-29Cleanup: style, use braces for the Python APICampbell Barton
2019-03-28Cleanup: remove unused derivedmesh code.Brecht Van Lommel
2019-03-07Refactor CDData masks, to have one mask per mesh elem type.Bastien Montagne
We already have different storages for cddata of verts, edges etc., 'simply' do the same for the mask flags we use all around Blender code to request some data, or limit some operation to some layers, etc. Reason we need this is that some cddata types (like Normals) are actually shared between verts/polys/loops, and we don’t want to generate clnors everytime we request vnors! As a side note, this also does final fix to T59338, which was the trigger for this patch (need to request computed loop normals for another mesh than evaluated one). Reviewers: brecht, campbellbarton, sergey Differential Revision: https://developer.blender.org/D4407
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-26Cleanup: blank lines over doxy headersCampbell Barton
2018-12-27Fix T58734: bvhtree.fromObject - error ( returned NULL without setting an ↵Bastien Montagne
error) in blender 2.8. Would free evaluated mesh even when it was the one cached in runtime data by depsgraph evaluation! Also fixes the asserts about using non-eval object in some cases.
2018-12-07Update BVHTree.FromObject API, remove render argumentDalai Felinto
This information should come from the depsgraph.
2018-12-05Implement bvhtree.fromObjectDalai Felinto
Passing depsgraph instead of scene, since a scene does not fully define the state of object you want to use for the BVH. Also, mesh_create_eval_final_view and mesh_create_eval_final_render are pretty much the same, so mesh_create_eval_no_deform and mesh_create_eval_no_deform_render are as well. Issue reported on: T58734 Reviewers: sergey https://developer.blender.org/D4032
2018-09-27Cleanup: remove unused DerivedMesh code.Sebastian Parborg
Differential Revision: https://developer.blender.org/D3736
2018-09-03Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/intern/collision.c
2018-09-03Spelling fixes in comments and descriptions, patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3668
2018-04-16Depsgraph: remove EvaluationContext, pass Depsgraph instead.Brecht Van Lommel
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
2018-02-18Merge branch 'master' into blender2.8Campbell Barton
2018-02-18Cleanup: add 2d suffix to BLI filesCampbell Barton
Some of these API's can have 3D versions, explicitly name them 2D.
2017-10-29Merge branch 'master' into blender2.8Sybren A. Stüvel
2017-10-27Docs: clarify return value for BVH APICampbell Barton
2017-10-20Merge branch 'master' into blender2.8Campbell Barton
2017-10-20Cleanup: redundant castsCampbell Barton