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-07-20Cleanup: use single back-tick quoting in commentsCampbell Barton
While doxygen supports both, conform to our style guide. Note that single back-tick's are already used in a majority of comments.
2021-07-20Cleanup: use '#if 0' for disabling multiple linesCampbell Barton
2021-07-19Cleanup: minor correction to delaunay_2d_cdt doc-stringCampbell Barton
Use more conventional syntax for default arguments.
2021-07-18Update documentation string for mathutils.geometry.delaunay_2d_cdt.Howard Trickey
2021-07-18Make it optional to track input->output mapping in delaunay_2d_calc.Howard Trickey
Some uses of delaunay_2d_calc don't need to know the original verts, edges, and faces that correspond to output elements. This change adds a "need_ids" value to the CDT input spec, default true, which tracks the input ids only when true. The python api mathutils.geometry.delaunay_2d_cdt gets an optional final bool argument that is the value of need_ids. If the argument is not supplied, it is true by default, so this won't break old uses of the API. On a sample text test, not tracking ids save about 30% of the runtime. For most inputs the difference will not be so dramatic: it only really kicks in if there are a lot of holes.
2021-07-16Cleanup: sort struct declarationsCampbell Barton
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-15Library loading: Fix access of out-of-scope memory in py context managerSybren A. Stüvel
The `__enter__` function of the `bpy.data.libraries.load` context manager was storing a pointer to a stack-allocated variable, which was subsequently used in the `__exit__` function, causing a crash. This is now fixed. Thanks @Severin for the patch.
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-14Python API: Add functions to ensure and clear IDPropertiesHans Goudey
This adds id_properties_clear() and id_properties_ensure() functions to RNA structs. This is meant as an initial change based on discussion in review of D9697. However, they may be useful in other situations. The change requires refactoring the internal idproperties callback to return a pointer to the IDProperty pointer, which actually turns out to be quite a nice cleanup. An id_properties attribute could be added in the future potentially. Differential Revision: https://developer.blender.org/D11908
2021-07-08Docs: Fix minor incorrect syntax errorsnutti
This patch fixes the incorrect syntax in documentations. Reviewed By: Blendify Differential Revision: https://developer.blender.org/D11822
2021-07-05BMesh: remove redundant mesh-backups from EDBM_op_* APICampbell Barton
Using BMesh operators through the edit-mesh API created a full copy of the mesh so it was possible to restore the mesh in case one of the operators raised an error. Remove support for automatic backup/restore from the EDBM_op_* API's as it adds significant overhead and was rarely used. Operators that need this can use the BMBackup API to backup & restore the mesh in case of failure. Add warning levels to BMO_error_raise so operators can report problems without it being interpreted as a request to cancel the operation. For high-poly meshes creating and freeing a full copy is an expensive operation, removing this gives a speedup of ~1.77x for most operators except for "connect_verts" / "connect_vert_pair" which still uses this functionality.
2021-07-05Cleanup: spelling in commentsCampbell Barton
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-26Cleanup: full sentences in comments, improve comment formattingCampbell 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-24Fix linking code after own recent commit.Bastien Montagne
More stupid mistake in recent enhanced reports for file load code, rB82c17082ba0e left some read-after-free situations.
2021-06-24Cleanup: update clang-format so PyObject_HEAD indents properlyCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23Revert "Revert "Enhanced stats/reports for blendfile reading.""Bastien Montagne
This reverts commit rB3a48147b8ab92, and fixes the issues with linking etc. Change compared to previous buggy commit (rBf8d219dfd4c31) is that new `BlendFileReadReports` reports are now passed to the lowest level function generating the `FileData` (`filedata_new()`), which ensures (and asserts) that all code using it does have a valid non-NULL pointer to a `BlendFileReadReport` data. Sorry for the noise, it's always when you think a change is trivial and do not test it well enough that you end up doing those kind of mistakes...
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-21Docs: improve imbuf.write docstringCampbell Barton
The file path wasn't documented as being optional.
2021-06-17Revert "Fix T89204: slow repeated rendering with GPUOffscreen.draw_view3d"Brecht Van Lommel
This reverts commit d03b26edbdc3a9fe87fde44bd8db8c4a67a36757. There is some refresh issue that needs to be solved before this can be enabled.
2021-06-16Fix T89204: slow repeated rendering with GPUOffscreen.draw_view3dBrecht Van Lommel
Cache the GPUViewport so the framebuffers and associated textures are not reallocated each time.
2021-06-14Cleanup: rename id to owner_id for python id propertiesJacques Lucke
This is consistent with the naming in `PointerRNA`.
2021-06-14PyAPI: remove deprecated bpy.app.binary_path_pythonCampbell Barton
2021-06-14Edit Mesh: use params arg for update function, add calc_normals argCampbell Barton
Rename function EDBM_update_generic to EDBM_update, use a parameters argument for better readability. Also add calc_normals argument, which will have benefits when calculating normals and tessellation together is optimized.
2021-06-13Cleanup: missing includeCampbell Barton
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-10Add unit for time stored in secondsSergey Sharybin
Allows to define properties which will have proper units displayed in the interface. The internal storage is expected to be seconds (which matches how other times are stored in Blender). Is not immediately used in Blender, but is required for the upcoming feature in Cycles X (D11526) The naming does not sound very exciting, but can't think of anything better either. For test it probably easiest to define FloatProperty with subdtype of TIME_ABSOLUTE. Differential Revision: https://developer.blender.org/D11532
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-07Cleanup: remove redundant cast, use const castsCampbell Barton
2021-06-07Cleanup: use keyword only argument in bpy.props argument parsingCampbell Barton
No functional changes as logic elsewhere already ensured this. This just makes it obvious to anyone reading over the code that these arguments are keyword only.
2021-06-02Docs: formalize naming for generic callbacks in BKE_callbacks.hCampbell Barton
Add a doc-string explaining the purpose of each call back and how they should be used. Also add a currently unused callback 'POST_FAIL' that is to be used in cases the action fails - giving script authors, a guarantee that a call to `pre` will always have a matching `post/post_fail` call. - D11422: adds a callback that can use 'post_fail'. - T88696: proposed these conventions.
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-30Docs: clarify description and usage of 'bpy.app.version_file'Aaron Carlisle
Fixes T88669
2021-05-28Cleanup: use static set syntaxCampbell Barton
2021-05-27Fix incorrect BLI_snprintf usageCampbell Barton
Event though in practice this wasn't causing problems as the fixed size buffers are generally large enough not to truncate text. Using the result from `snprint` or `BLI_snprintf` to step over a fixed size buffer allows for buffer overruns as the returned value is the size needed to copy the entire string, not the number of bytes copied. Building strings using this convention with multiple calls: ofs += BLI_snprintf(str + ofs, str_len_max - ofs); .. caused the size argument to become negative, wrapping it to a large value when cast to the unsigned argument.
2021-05-21Cleanup: spellingLeon Zandman
Includes fixes to misspelled function names. Ref D11280
2021-05-18Fix T88365: GPUTexture.read returning a buffer with wrong sizeGermano Cavalcante
The pixel components were not being considered.
2021-05-18Fix T88345: Blender crash on GPUFrameBuffer creationGermano Cavalcante
Misuse of indexes. `color_attachements` has only color ones while `config` has color and depth.
2021-05-18Cleanup: use const casts in mathutils APICampbell Barton
2021-05-18PyAPI: allow any vector sequence for poly_3d_calc(..)Campbell Barton
Previously only vectors were accepted for the second point argument: mathutils.interpolate.poly_3d_calc()
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-17Mathutils: add a Matrix.LocRotScale constructor for combining channels.Alexander Gavrilov
Combining location, rotation and scale channels into a matrix is a standard task, so while it is easily accomplished by constructing and multiplying 3 matrices, having a standard utility allows for more clear code. The new constructor builds a 4x4 matrix from separate location, rotation and scale values. Rotation can be represented as a 3x3 Matrix, Quaternion or Euler value, while the other two inputs are vectors. Unneeded inputs can be replaced with None. Differential Revision: https://developer.blender.org/D11264
2021-05-15XR Controller Support Step 1: Internal Abstractions for OpenXR ActionsPeter Kim
Adds internal API for creating and managing OpenXR actions at the GHOST and WM layers. Does not bring about any changes for users since XR action functionality is not yet exposed in the Python API (will be added in a subsequent patch). OpenXR actions are a means to communicate with XR input devices and can be used to retrieve button/pose states or apply haptic feedback. Actions are bound to device inputs via a semantic path binding (https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-interaction-profiles), which serves as an XR version of keymaps. Main features: - Abstraction of OpenXR action management functions to GHOST-XR, WM-XR APIs. - New "xr_session_start_pre" callback for creating actions at appropriate point in the XR session. - Creation of name-identifiable action sets/actions. - Binding of actions to controller inputs. - Acquisition of controller button states. - Acquisition of controller poses. - Application of controller haptic feedback. - Carefully designed error handling and useful error reporting (e.g. action set/action name included in error message). Reviewed By: Julian Eisel Differential Revision: http://developer.blender.org/D10942
2021-05-15Cleanup: silence unused parameter warningsGermano Cavalcante
Introduced in rB48fa029dd11b.
2021-05-14Python GPU: New 'platform' moduleGermano Cavalcante
This module exposes the platform utils defined in the GPU module in C. This will be useful for porting existing code with `bgl` to `gpu`. Reviewed By: fclem, brecht, campbellbarton Maniphest Tasks: T80730 Part of D11147