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-06-02Cleanup: remove "<pep8 compliant>" from headersCampbell Barton
It can be assumed that all scripts comply with basic pep8 formatting regarding white-space, indentation etc. Also remove note in best practices page & update `tests/python/pep8.py`. If we want to exclude some scripts from make format, this can be done by adding them to `ignore_files` in: source/tools/utils_maintenance/autopep8_format_paths.py Or using `# nopep8` for to ignore for individual lines. Ref T98554
2022-05-03BPY types: add default Geometry Node poll functionKévin Dietrich
Contrary to `CompositorNodeCustomGroup` or `ShaderNodeCustomGroup`, `GeometryNodeCustomGroups` have to define their own poll function. This is because their is no predefined poll function for `GeometryNode`, and it may not be clear for addon developers why `GeometryNode` would be special here. This adds `GeometryNode` to `bpy_types.py` and defines such a function for it like for other builtin node types. Differential Revision: https://developer.blender.org/D14775
2022-04-19PyDoc: remove multiple `children` properties for Bone typeCampbell Barton
This doesn't cause any functional change as the RNA property of Bone wasn't overridden by the _GenericBone's property, however the `children` property was documented twice, causing a warning.
2022-04-06Cleanup: spelling & poor wording in code & commentsCampbell Barton
2022-04-06PyAPI: Add Context.path_resolve wrapper that supports context membersCampbell Barton
This avoids script authors using `eval("context.%s" % data_path)` to access paths starting from the context, which isn't good practice especially if the data_path isn't trusted. Now it's possible to resplve paths such as: context.path_resolve('active_object.modifiers[0].name')
2022-03-11PyAPI: use C/RNA API for Text.from_string/to_stringCampbell Barton
Use faster C code for getting the buffer from text.
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-14Python API: add "children_recursive" property to Object & CollectionCampbell Barton
This is a convenience property, already available for bones. Simplifies D13821 which in-lined this function.
2021-11-17cleanup: fix typos in comments and docsluzpaz
Followup to https://developer.blender.org/D10288 Reviewed By: Blendify Differential Revision: https://developer.blender.org/D10346
2021-10-14Python API: implement `PoseBone.children` via `Bone.children`.Alexander Gavrilov
Currently `PoseBone.children` is implemented by a linear scan of the list of armature bones. This is doubly inefficient, since not only is it scanning all bones, the `obj.data.bones` list is actually synthetic and generated from Bone children lists. Instead, use the `Bone.children` native RNA property. Differential Revision: https://developer.blender.org/D12727
2021-08-10Fix T90268: Mesh.from_pydata error using numpy array for edges/facesCampbell Barton
Technically not a bug but worth supporting.
2021-08-09Cleanup: use 'cls' for class methods first argumentCampbell Barton
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-07Fix T88899: `__file__` not set for `text.as_module()`Campbell Barton
2021-05-01Python GPU: Replace a few calls of the bgl module with gpuGermano Cavalcante
Concludes these files: [x]bpy_types.py [x]operator_modal_draw.py Reviewed By: fclem Differential Revision: https://developer.blender.org/D11129
2021-04-26DeprecationWarning fixErik Abrahamsson
This gets rid of a `DeprecationWarning` in bpy_types.py caused by invalid escape sequences. More info here: https://docs.python.org/3/library/re.html Reviewed By: mont29 Differential Revision: https://developer.blender.org/D10998
2021-03-06Cleanup: unused importsCampbell Barton
2021-03-05UI: minor changes to preset sortingCampbell Barton
- Only sort by the preset name (not it's directory). - Remove redundant string conversion. - Only call lower() once on the input. - Don't assign the lambda to a variable for single use.
2021-03-05Presets: Improve sort order of presetsAaron Carlisle
Pythons sort function does not sort naturally, to solve this a custom sort key is used. This issue is apparent when trying D10553
2021-02-04Fix T79822: Custom preset casing not preservedAnkur Deria
When adding a new preset the name would be converted to lower case and then displayed in the interface in title case. This was confusing because the name didn't reflect what was typed, and there are many cases when the name shouldn't be forced into title case (like 8K UHDTV for example). This commit leaves the custom preset names in the original casing, and removes the conversion of filenames to title case for preset lists. Differential Revision: https://developer.blender.org/D10224
2020-10-02Cleanup: pep8 (indentation, spacing, long lines)Campbell Barton
2020-10-02Cleanup: pep8, blank linesCampbell Barton
2020-09-12Fix T80697: children_recursive returns edit-bones from non edit-boneCampbell Barton
Bone.children_recursive would return edit-bones when in edit-mode irrespective of the type of the bone. Check the type of self instead of the existence of edit-bones.
2020-05-29PyAPI: use bpy_rna_types_capi.c to set type methodsCampbell Barton
Remove use of '_bpy' as an intermediate module to store functions which were then assigned in bpy_types.py.
2020-05-29Docs: replace warnings with note for complexity informationCampbell Barton
Reserve warnings for situations such as corrupt data which can cause crashes.
2020-02-13Py API: Add `orphans_purge` helper to `bpy.data`.Bastien Montagne
Much more convinient than trying to use outliner operator...
2020-02-04Fix T58842: Add-ons Import/Export entries disapear when enabling FilterPhilipp Oeser
Addons option This removes the 'use_owner' option feature from rB61c8ed40f5df. (this wasnt working well when addons are enabled and when switching workspaces) Now Addon filtering is just bypassed for Import/Export menus. (by introducing/setting bl_owner_use_filter = False) Maniphest Tasks: T58842 Differential Revision: https://developer.blender.org/D6740
2019-10-15Fix T70590: Python Gizmo API misses opacity & anti-aliasingCampbell Barton
Thanks to @mano-wii for finding root cause.
2019-10-10Fix T70617: mesh.from_pydata() misses first edge if there are facesCampbell Barton
2019-10-09Cleanup: typo, styleCampbell Barton
2019-10-09Docs: clarify Mesh.from_pydata edges argument usageCampbell Barton
Addresses T70617
2019-10-08UI: support passing a function to WorkSpace.status_text_set()Campbell Barton
This allows Python operators to draw icons and other UI elements into the status bar.
2019-09-16Revert "PyAPI: expose OperatorType.modal_keymap"Campbell Barton
This reverts commit b53ee963b16d817a6367bd7c73b866036868b2e2. Full support for defining modal enums and access through events is more involved, revert for now.
2019-09-16Cleanup: use fixed indent in PythonCampbell Barton
Reduce right-shift.
2019-09-16PyAPI: expose OperatorType.modal_keymapCampbell Barton
Support assigning modal keymaps once the operator is registered.
2019-09-11Armature: convert the length Python property of bones to a RNA property.Alexander Gavrilov
This allows accessing it from drivers and using it in UI, as demonstrated by adding it to the transform panel of 3D View. As an aside, properly mark transform-related properties of Bone read-only, as they can only be changed correctly in edit mode.
2019-07-30UI: add use_button option to popoversCampbell Barton
This is useful when popovers are launched from operators instead of as button popover types. Where the connection between the button and the popover is useful to keep.
2019-07-28Cleanup: pep8Campbell Barton
2019-07-08Fix T61401: Failure to register a `GizmoGroup` after unregistering itmano-wii
It does not seem right to rely on the python code to fix problems in the C code. But this already works like this with the other Python Classes.
2019-07-08Revert "Fix T61401: Failure to register a `GizmoGroup` after unregistering it"mano-wii
Problems with ClangFormat This reverts commit c1bcde0c0feaf8bcfbd3664a52c50611806538ac.
2019-07-08Fix T61401: Failure to register a `GizmoGroup` after unregistering itmano-wii
2019-05-09Cleanup: unused args/vars/imports in modulesCampbell Barton
2019-04-21Fix T63764: error when using library.users_id() functionBrecht Van Lommel
Fix suggested by Vilem Duha.
2019-04-18PyAPI: remove support for importing text blocks as modulesCampbell Barton
Allowing direct import of text blocks isn't especially useful, instead add `text.as_module()` script authors can do this explicitly if it's needed. Now the text "Register" option executes instead of loading as a module. This removes the need to keep track of the current Main, and C code to override Python's import & reload.
2019-02-07Fix object.users_collection not including scene collections.Brecht Van Lommel
2019-01-16Expose batch IDs deletion in python API.Bastien Montagne
Follow-up to previous commit.
2018-12-20Fix T58937: Appended menus to VIEW3D_MT_editor_menus are not displayedCampbell Barton
2018-12-04Fix error reloading scriptsCampbell Barton
Operator.is_registered needs to use RNAMeta class.
2018-11-28Use collection and instance terminology in Python APISergey Sharybin
This follows naming convention agreed on in T56648.
2018-11-09Py API Docs: Warnings for some properties that are slower to access than ↵Jacques Lucke
expected.