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-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-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: 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-19Cleanup: spellingCampbell Barton
2022-09-16Cleanup: spelling in commentsCampbell Barton
2022-09-08Cleanup: correct PyModuleDef.m_slots referenceCampbell Barton
Changed in Python 3.5, match Python's internal name.
2022-05-06Cleanup: formatCampbell Barton
2022-05-05Docs: Clarify docs for BMesh methodsjon denning
The previous docs for `normal_update` methods of `BMVert`, `BMEdge`, `BMFace`, and `BMesh` were not clear on some behaviors. These behaviors are listed in D14370. This commit updates the docs to be clearer. Reviewed By: Blendify Differential Revision: https://developer.blender.org/D14370
2022-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-12Fix: BMesh Python API errors after vertex_normals additionHans Goudey
64cd927519748bbd50 didn't update the argument parsing strings, and updated the docstring of `from_object` incorrectly. Fixes T97025, T97213
2022-03-28Cleanup: use "num" as a suffix in: source/blender/pythonCampbell Barton
See T85728
2022-03-22Fix T96308: Mesh to BMesh conversion doesn't calculate vertex normalsHans Goudey
Currently there is a "calc_face_normal" argument to mesh to bmesh conversion, but vertex normals had always implicitly inherited whatever dirty state the mesh input's vertex normals were in. Probably they were most often assumed to not be dirty, but this was never really correct in the general case. Ever since the refactor to move vertex normals out of mesh vertices, cfa53e0fbeed7178c7, the copying logic has been explicit: copy the normals when they are not dirty. But it turns out that more control is needed, and sometimes normals should be calculated for the resulting BMesh. This commit adds an option to the conversion to calculate vertex normals, true by default. In almost all places except the decimate and edge split modifiers, I just copied the value of the "calc_face_normals" argument. Differential Revision: https://developer.blender.org/D14406
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-12-02Cleanup: move public doc-strings into headers for 'python'Campbell Barton
2021-11-30Cleanup: spelling in comments & stringsCampbell Barton
2021-10-03Cleanup: spelling in stringsCampbell 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-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-24Depsgraph: support flushing parameters without a full COW updateCampbell Barton
Avoid computationally expensive copying operations when only some settings have been modified. This is done by adding support for updating parameters without tagging for copy-on-write. Currently only mesh data blocks are supported, other data-blocks can be added individually. This prepares for changing values such as edit-mesh auto-smooth angle in edit-mode without duplicating all mesh-data. The benefit will only be seen when the user interface no longer tags all ID's for copy on write updates. ID_RECALC_GEOMETRY_ALL_MODES has been added to support situations where non edit-mode geometry is modified in edit-mode. While this isn't something user are likely to do, Python scripts may change the underlying mesh. Reviewed By: sergey Ref D11377
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-10Docs: remove deprecated parameter from bmesh docsCampbell Barton
The perimeter itself was removed but the documentation wasn't updated. Resolves T89013
2021-06-08PyAPI: use keyword only argumentsCampbell Barton
Use keyword only arguments for the following functions. - addon_utils.module_bl_info 2nd arg `info_basis`. - addon_utils.modules 1st `module_cache`, 2nd arg `refresh`. - addon_utils.modules_refresh 1st arg `module_cache`. - bl_app_template_utils.activate 1nd arg `template_id`. - bl_app_template_utils.import_from_id 2nd arg `ignore_not_found`. - bl_app_template_utils.import_from_path 2nd arg `ignore_not_found`. - bl_keymap_utils.keymap_from_toolbar.generate 2nd & 3rd args `use_fallback_keys` & `use_reset`. - bl_keymap_utils.platform_helpers.keyconfig_data_oskey_from_ctrl 2nd arg `filter_fn`. - bl_ui_utils.bug_report_url.url_prefill_from_blender 1st arg `addon_info`. - bmesh.types.BMFace.copy 1st & 2nd args `verts`, `edges`. - bmesh.types.BMesh.calc_volume 1st arg `signed`. - bmesh.types.BMesh.from_mesh 2nd..4th args `face_normals`, `use_shape_key`, `shape_key_index`. - bmesh.types.BMesh.from_object 3rd & 4th args `cage`, `face_normals`. - bmesh.types.BMesh.transform 2nd arg `filter`. - bmesh.types.BMesh.update_edit_mesh 2nd & 3rd args `loop_triangles`, `destructive`. - bmesh.types.{BMVertSeq,BMEdgeSeq,BMFaceSeq}.sort 1st & 2nd arg `key`, `reverse`. - bmesh.utils.face_split 4th..6th args `coords`, `use_exist`, `example`. - bpy.data.libraries.load 2nd..4th args `link`, `relative`, `assets_only`. - bpy.data.user_map 1st..3rd args `subset`, `key_types, `value_types`. - bpy.msgbus.subscribe_rna 5th arg `options`. - bpy.path.abspath 2nd & 3rd args `start` & `library`. - bpy.path.clean_name 2nd arg `replace`. - bpy.path.ensure_ext 3rd arg `case_sensitive`. - bpy.path.module_names 2nd arg `recursive`. - bpy.path.relpath 2nd arg `start`. - bpy.types.EditBone.transform 2nd & 3rd arg `scale`, `roll`. - bpy.types.Operator.as_keywords 1st arg `ignore`. - bpy.types.Struct.{keyframe_insert,keyframe_delete} 2nd..5th args `index`, `frame`, `group`, `options`. - bpy.types.WindowManager.popup_menu 2nd & 3rd arg `title`, `icon`. - bpy.types.WindowManager.popup_menu_pie 3rd & 4th arg `title`, `icon`. - bpy.utils.app_template_paths 1st arg `subdir`. - bpy.utils.app_template_paths 1st arg `subdir`. - bpy.utils.blend_paths 1st..3rd args `absolute`, `packed`, `local`. - bpy.utils.execfile 2nd arg `mod`. - bpy.utils.keyconfig_set 2nd arg `report`. - bpy.utils.load_scripts 1st & 2nd `reload_scripts` & `refresh_scripts`. - bpy.utils.preset_find 3rd & 4th args `display_name`, `ext`. - bpy.utils.resource_path 2nd & 3rd arg `major`, `minor`. - bpy.utils.script_paths 1st..4th args `subdir`, `user_pref`, `check_all`, `use_user`. - bpy.utils.smpte_from_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.smpte_from_seconds 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.system_resource 2nd arg `subdir`. - bpy.utils.time_from_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.time_to_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.units.to_string 4th..6th `precision`, `split_unit`, `compatible_unit`. - bpy.utils.units.to_value 4th arg `str_ref_unit`. - bpy.utils.user_resource 2nd & 3rd args `subdir`, `create` - bpy_extras.view3d_utils.location_3d_to_region_2d 4th arg `default`. - bpy_extras.view3d_utils.region_2d_to_origin_3d 4th arg `clamp`. - gpu.offscreen.unbind 1st arg `restore`. - gpu_extras.batch.batch_for_shader 4th arg `indices`. - gpu_extras.batch.presets.draw_circle_2d 4th arg `segments`. - gpu_extras.presets.draw_circle_2d 4th arg `segments`. - imbuf.types.ImBuf.resize 2nd arg `resize`. - imbuf.write 2nd arg `filepath`. - mathutils.kdtree.KDTree.find 2nd arg `filter`. - nodeitems_utils.NodeCategory 3rd & 4th arg `descriptions`, `items`. - nodeitems_utils.NodeItem 2nd..4th args `label`, `settings`, `poll`. - nodeitems_utils.NodeItemCustom 1st & 2nd arg `poll`, `draw`. - rna_prop_ui.draw 5th arg `use_edit`. - rna_prop_ui.rna_idprop_ui_get 2nd arg `create`. - rna_prop_ui.rna_idprop_ui_prop_clear 3rd arg `remove`. - rna_prop_ui.rna_idprop_ui_prop_get 3rd arg `create`. - rna_xml.xml2rna 2nd arg `root_rna`. - rna_xml.xml_file_write 4th arg `skip_typemap`.
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-05-17Merge branch 'blender-v2.93-release'Brecht Van Lommel
2021-05-17Fix T86278: vertex color baking not working with modifiersBrecht Van Lommel
As in the old Blender Internal baking code, this still relies on there being a good mapping to the original vertices.
2021-05-12PyAPI: remove deprecated & unused BMesh.from_object deform argumentCampbell Barton
Ref T85675
2021-03-24Cleanup: use new BLI_assert_unreachable macroCampbell Barton
2021-02-12PyAPI: use PyModule_AddType utility functionCampbell Barton
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-01-14Bmesh: Deprecate deform parameter of from_object()Omar Emara
The deform parameter of the Bmesh from_object method is deprecated, always assumed to be True, and will be removed in version 3.0. That is because the cases where it is False don't work correctly and are subject to memory leaks. One of the symptoms of the incorrect behavior is the application of constructive modifiers twice if the input object is an evaluated one, as demonstrated in D10053. Reviewed By: Brecht Differential Revision: https://developer.blender.org/D10086
2021-01-12Fix: Bmesh from_object applies modifiers twiceOmar Emara
The Bmesh from_object method applies modifiers twice when the input deform is enabled and the input depsgraph is a render one. The evaluated object already have modifiers applied, and mesh_create_eval_final() applies modifiers again. To fix this, the BKE_mesh_new_from_object() function is used instead. Reviewed By: Brecht Differential Revision: https://developer.blender.org/D10053
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-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-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-11-27Fix T71865: Separating mesh parts breaks shape keysCampbell Barton
This was an old bug which could be caused by saving after separating. Changes from 79b703bb635e made this fail reliably. Update shape key indices when they may be used again later.
2019-11-26Fix T71806: BMElem.copy_from(other) failedCampbell Barton
Don't modify the Python reference when copying custom-data.
2019-05-31Fix bmesh_to_mesh freeing possibly referenced verticesSergey Sharybin
Fixes Godot exporter issue reported in T65285.
2019-04-29Cleanup: comments (long lines) in pythonCampbell Barton
2019-04-20Cleanup: add missing macros to clang-formatCampbell Barton
2019-04-17ClangFormat: format '#if 0' code in source/Campbell 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-03-29Cleanup: style, use braces for the Python APICampbell Barton