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-06Cleanup: pep8Campbell 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-02-19PyAPI: bpy.utils.execfile temporarily overrides the __main__ moduleCampbell Barton
This is needed to support Python 3.10's `typing.get_type_hints`, to access the name-space used when creating the class. Also added a docstring for execfile.
2021-02-16Fix reloading preferences ignoring 'script_directory'Campbell Barton
Reloading preferences didn't update Python's `sys.path` to account for the modified `script_directory`. This meant the operator to load settings from a previous version required a restart to initialize Python when this directory was set.
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
2021-02-04Presets: Cleanup preset namingNathan Craddock
Before committing D10224, bundled preset names that are lowercase need updating to title case for display in the UI. This changes several of the preset file names to title case, and fixes a couple of other naming issues in the preset names. A few strings in the code are also changed to reflect the new filename of the Blender keymap.
2020-12-10PyAPI: add bpy.utils.unescape_identifierCampbell Barton
Utility to perform the reverse of `bpy.utils.escape_identifier`
2020-10-02Cleanup: pep8, blank linesCampbell Barton
2020-09-14Fix T80694: Crash reloading scripts from the Python consoleCampbell Barton
Running `bpy.ops.script.reload()` from Python was crashing since the operator being called was it's self freed. Change the reload operator to defer execution - as supporting re-registration during execution is quite involved for a corner-case.
2020-07-17Cleanup: remove f-string use in favor of percentage for formattingCampbell Barton
2020-03-27Fix T66655: Add-on tool keymap not working after restartCampbell Barton
- Use addon keyconfig for registered tools so reloading the keymap doesn't clear them. - Ensure there is a default keymap, needed for addon keymaps to be available in the user keyconfig.
2020-01-28Error in last comment (redundant assignment)Campbell Barton
2020-01-28Fix T69213: App-Template doesn't run scripts in BLENDER_USER_SCRIPTSCampbell Barton
2020-01-27Fix T73409: error deleting preset saved on different drive than Blender installBrecht Van Lommel
2019-11-01Fix python error when trying to delete presetsSebastian Parborg
In some cases the default data paths for blender does not exist. For example on windows when using the portable install. This would lead to errors when trying to lookup default paths in is_path_builtin. Now we handle cases like this gracefully.
2019-10-31Cleanup: comments for is_path_builtinCampbell Barton
Also reduce scope of import.
2019-10-30Fix T59065: Blender default keyset is deletable by user!Sebastian Parborg
Previously, you could delete presets that were part of the blender default install. Now we check if the preset file resides in the bundled file paths. If so, prevent deletion of the preset. Reviewed By: Campbell Differential Revision: http://developer.blender.org/D4522
2019-08-15Fix T68014: Add-on's override Python built-in modulesCampbell Barton
Append addon paths to the sys.path to avoid name collisions with system modules.
2019-07-23Fix T63775: Toolbar icons ignore BLENDER_SYSTEM_DATAFILESCampbell Barton
The environment variable to locate system data-files was ignored by toolbar icons. Add bpy.utils.system_resource to match Blender's internal data-file access.
2019-06-19Fix T65398 - Fix frame rate base use in Python SMPTE functionsRichard Antalik
Differential Revision: https://developer.blender.org/D5064 Reviewed By: brecht
2019-06-13Cleanup: tweak logic for skipping modulesCampbell Barton
Startup is the special case, so match against this instead of 'modules'.
2019-05-09Fix bpy.utils.script_paths ignoring user_pref argCampbell Barton
2019-05-09Cleanup: unused args/vars/imports in modulesCampbell Barton
2019-03-17Cleanup: unused variablesCampbell Barton
2019-03-15Tool System: add tool registration APICampbell Barton
This mimics RNA style class registration, keeping the same internal data types. Currently there is a template which shows an example of adding a tool group with a keymap. Icon generation still needs to be exposed for general use.
2019-02-14Fix T61497: Old keymap causes error on startupCampbell Barton
When a keymap has an error loading, don't make it active since it will be partially loaded and not usable.
2019-01-05UI: Preferences Redesign Part 2Severin
(Part 1 was 00963afc14978b) Does the following changes visible to users: * Use panels and sub-panels for more structured & logical grouping * Re-organized options more logically than before (see images in D4148) * Use flow layout (single column by default). * New layout uses horizontal margin if there's enough space. * Change size of Preferences window to suit new layout. * Move keymap related options from "Input" into own section. * Own, left-bottom aligned region for Save Preferences button. * Adjustments of names, tooltips & icons. * Move buttons from header into the main region (except editor switch). * Hide Preferences header when opened in temporary window. * Use full area width for header. * Don't use slider but regular number widget for UI scale. * Gray out animation player path option if player isn't "Custom" Internal changes: * Rearrange RNA properties to match changed UI structure. * Introduces new "EXECUTE" region type, see reasoning in D3982. * Changes to panel layout and AZone code for dynamic panel region. * Bumps subversion and does versioning for new regions. RNA changes are documented in the release notes: https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Preferences_API Design & implementation mostly done by @billreynish and myself. I recommend checking out the screenshots posted by William: https://developer.blender.org/D4148#93787 Reviewed By: brecht Maniphest Tasks: T54115 Differential Revision: https://developer.blender.org/D4148
2018-12-21RNA: naming, user-preferences -> preferencesCampbell Barton
2018-11-28Tool System: remove custom tool registrationCampbell Barton
API is not ready for beta (likely to change).
2018-11-18PyAPI: add bpy.utils.execfileCampbell Barton
Wraps `importlib.util`, avoids duplicate preset loading calls.
2018-11-16WM: fix hard coded renameCampbell Barton
Currently the filenames are used when setting keymaps. This hard coded naming meant the preset and setting function need to be kept in sync. Prefer to not have hard coded replacements which need to be duplicated.
2018-11-13Keymaps: refactor loading of default keymap, fix bugs.Brecht Van Lommel
This refactors loading of key configurations to clear and refill existing ones, rather than adding a new one and then removing the old one. This fixes broken loading of non-default configurations after recent changes, and prepares for future changes to make it possible to dynamically change key configurations based on user preferences.
2018-11-09Keymap: skip loading the keymap preset in background modeCampbell Barton
Caused a crash on exit and isn't needed.
2018-11-09Keymap: move builtin keymaps from C to PythonBrecht Van Lommel
This should be purely an implementation change, for end users there should be no functional difference. The entire key configuration is in one file with ~5000 lines of code. Mostly avoiding code duplication and preserve comments and utility functions from the C code. It's a bit long but for searching and editing it's also convenient to have it all in one file. Notes: - Actual keymap is shared by blender / blender_legacy and stored in `keymap_data/blender_default.py` This only generates JSON-like data to be passed into `keyconfig_import_from_data`, allowing other presets to load and manipulate the default keymap. - Each preset defines 'keyconfig_data' which can be shared between presets. - Some of the utility functions for generating keymap items still need to be ported over to Python. - Some keymap items can be made into loops (marked as TODO). See: D3907
2018-10-18PyAPI: Support for custom tool registrationCampbell Barton
Added a module bpy.utils.toolsystem which only exposes ToolDef, to avoid scripts referencing bl_ui internals.
2018-07-12PyAPI: remove bpy.utils.register_moduleCampbell Barton
Remove bpy.utils.register_module() & logic tracked RNA classes.
2018-07-07Keymap: support for reading/writing keymaps as dataCampbell Barton
Instead of running code to create a keymap, store them as data. This allows for keymaps to share content as well as running transformations at load time.
2018-07-03Cleanup: pep8Campbell Barton
2017-09-14Fix T52442: bl_app_templates_system not workingCampbell Barton
Portable builds LOCAL files need to be treated as system instead of using as a fallback to USER templates.
2017-09-04PyAPI: Add bpy.utils.register_classes_factoryCampbell Barton
Avoids having boiler plate register/unregister functions.
2017-07-27Fix factory setup using user scripts path stillCampbell Barton
2017-07-25PyAPI: Skip user scripts w/ factory-startupCampbell Barton
Adds bpy.app.factory_startup, used to check if user scripts should be loaded.
2017-07-25PyAPI: utility for creating register, unregisterCampbell Barton
This simplifies creation of register, unregister functions that simply forward calls submodules.
2017-03-26Cleanup: line length, assignmentCampbell Barton
2017-03-26Cleanup: simplify script path assignmentCampbell Barton
2017-03-26PyAPI: debug-python check for missing class registerCampbell Barton
Moving to manual class registration means its easier to accidentally miss registering classes. Now detect missing class registration and warn when running with `--debug-python`
2017-03-25WM: Application TemplatesCampbell Barton
This adds the ability to switch between different application-configurations without interfering with Blender's normal operation. This commit doesn't include any templates, so its mostly to allow collaboration for the Blender 101 project and other custom configurations. Application templates can be installed & selected from the file menu. Other details: - The `bl_app_template_utils` module handles template activation (similar to `addon_utils`). - The `bl_app_override` module is a general module to assist scripts overriding parts of Blender in reversible way. See docs: https://docs.blender.org/manual/en/dev/advanced/app_templates.html See patch: D2565
2016-11-18Fix T50052: bpy.utils.unregister_module doesn't unregister classes of ↵Bastien Montagne
submodules in reload scenario. reload case would clear TypeMap before unregistering addons, which made all calls to unregister_module() to do absolutely nothing.
2016-06-28Cleanup: Python importsCampbell Barton
2016-05-13Fix script_paths(check_all=True) missing script pathsCampbell Barton
BLENDER_SYSTEM_SCRIPTS wasn't included in bpy.utils.script_paths()