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-09-14Cleanup: remove redundant braces from assert & raiseCampbell Barton
autopep8 v1.7 added a space after assert & raise, remove the braces as they aren't needed.
2022-09-05Cleanup: make formatBrecht Van Lommel
2022-09-05I18n: translate untitled file namesDamien Picard
When saving, the default file name is "untitled" regardless of selected language. This can be translated, like many graphical applications do. This applies to: - blend file - alembic file - collada file - obj file - usd file - rendered image - grease pencil export - subtitles export - other Python exports through ExportHelper Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15868
2022-08-27UV: bpy_extras.mesh_utils.mesh_linked_uv_islands raises error in edit modeChris Blackbourn
Maniphest Tasks: T86484 Differential Revision: https://developer.blender.org/D15778
2022-08-25PyAPI: return faces instead of indices from bmesh_linked_uv_islandsCampbell Barton
Return faces instead of face indices from bmesh_linked_uv_islands since BMesh indices aren't reliable when geometry is added/removed, where the faces will still be valid.
2022-08-25Cleanup: replace dict with set for bmesh_utils.bmesh_linked_uv_islandsCampbell Barton
Also correct doc-string syntax.
2022-08-25Fix T78406: create uv randomize islands operatorChris Blackbourn
Implement a new operator to randomize the scale, rotation and offset of selected UV islands.
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-06bpy_extras: Add utilities for getting ID referencesDemeter Dzadik
An alternate to D14839, implemented in Python and relying on bpy.data.user_map(). That function gives us a mapping of what ID is referenced by what set of IDs. The inverse of this would also be useful, which is now available from bpy_extras.id_map_utils.get_id_reference_map(). From there, we can use get_all_referenced_ids() to get a set of all IDs referenced by a given ID either directly or indirectly. To get only the direct references, we can simply pass the ID of interest as a key to the dictionary returned from get_id_reference_map(). Reviewed By: mont29 Differential Revision: https://developer.blender.org/D14843
2022-03-04Cleanup: unused Python variables & importsCampbell Barton
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-24Cleanup: Grammar: its self vs. itselfHans Goudey
2021-10-11Fix T91169: bpy_extras.io_utils.create_derived_objects -> duplis errorCampbell Barton
This function now takes a depsgraph and a list of objects to avoid inefficient O(n^2) iteration when extracting instances from all objects in the scene. Returning an object -> instance map. Note that keeping compatibility with the existing API wasn't practical in this case since instances can no longer be generated from the scene and it's objects.
2021-09-29Asset Browser: Initial Asset Catalog UIJulian Eisel
The Asset Browser now displays a tree with asset catalogs in the left sidebar. This replaces the asset categories. It uses the new UI tree-view API (https://wiki.blender.org/wiki/Source/Interface/Views#Tree-View). Buttons are displayed for adding and removing of catalogs. Parent items can be collapsed, but the collapsed/uncollapsed state is not stored in files yet. Note that edits to catalogs (e.g. new or removed catalogs) are only written to the asset library's catalog definition files when saving a .blend. In the "Current File" asset library, we try to show asset catalogs from a parent asset library, or if that fails, from the directory the file is stored in. See adaf4f56e1ed. There are plenty of TODOs and smaller glitches to be fixed still. Plus a UI polishing pass should be done. Important missing UI features: * Dragging assets into catalogs (WIP, close to being ready). * Renaming catalogs * Proper handling of catalogs in the "Current File" asset library (currently not working well). The "Current File" asset library is especially limited still. Since this is the only place where you can assign assets to a catalog, this makes the catalogs very cumbersome in general. To assign an asset to a catalog, one has to manually copy the Catalog ID (a random hash like number) to the asset metadata through a temporary UI in the Asset Browser Sidebar. These limitations should be addressed over the next few days, they are high priority. Differential Revision: https://developer.blender.org/D12670
2021-07-15Asset Browser: Python mixin utility for category-specific panelsSybren A. Stüvel
Using this mixin for a panel definition, it's possible to set in which categories the panel should appear. This is used by the Pose Library add-on.
2021-07-06Cleanup: pep8Campbell Barton
2021-06-24Fix failure when baking actions with Bendy BonesJulian Eisel
682a74e0909ba renamed Bendy Bones properties and replaced existing float properties with float-vector properties. This updates the property names used by the action baking operator (`NLA_OT_bake`).
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-05-20Merge remote-tracking branch 'origin/blender-v2.93-release'Sybren A. Stüvel
2021-05-20Fix T86193: Bake Action, wrong rotation order for bonesdreamertooth
Use bone rotation order to compute the baked rotation. This fixes a bug introduced in rB0e85d701c654, where the object rotation order was applied to the bone. Maniphest Tasks: T88359, T86193 Reviewed By: sybren, GuiltyGhost, #animation_rigging Differential Revision: https://developer.blender.org/D11282
2021-05-18WM: check missing space-data & constraints in poll functionsCampbell Barton
Without this, menu search prints many errors in some contexts.
2021-04-28Fix T85688: ExportHelper adds multiple file name extensionsCampbell Barton
Replace the existing extension instead of adding it.
2021-03-06Cleanup: unused importsCampbell Barton
2021-03-06Cleanup: unused variablesCampbell Barton
2021-02-21PyAPI: use postponed annotations to support Python 3.10Campbell Barton
Support Python 3.10a5 or 3.9x with support explicitly enabled. - Enable Python's postponed annotations for Blender's RNA classes types registered on startup. - Using postponed annotations has implications for how they are defined, since they must evaluate in the modules name-space instead of the classes name-space. See changes to annotations in `release/scripts`. - Use `from __future__ import annotations` at the top of the module to ensure the script will run with Python 3.10. - Old logic is kept since it could be used if PEP-649 is supported. Resolves T83626 Ref D10474
2021-02-21Cleanup: remove duplicate settings from operator_mesh_add templateCampbell Barton
Also move align items into the enum call as there is no need to have this accessible from the class.
2021-01-27Fix T81834: Images not properly duplicated in node_shader_utilsCampbell Barton
Oversight in fb10eaf6e8a4f959cd5d46fd1bb7e8fb26b67205
2020-12-29Fix T83749: Better handling of alpha in generic Nodes material wrapper for ↵Bastien Montagne
IO add-ons. Try to detect if a given image may have valid alpha data or not (based on number of channels and depth). This may be a bit doggy in theory, but in practice it should cover most fields as expected. We can always adjust the euristic here in other wrong cases appear. This will affect all import add-ons using that node shader wrapper (at least OBJ and FBX ones).
2020-12-22Animation: Bake Action, improved discontinuity filter for bonesSybren A. Stüvel
Perform the same filtering as e5528904f12104ee31e7b67b54f2a4b3f14cec1e introduced for object rotations, for bone rotations.
2020-12-18Fix mistake in Bake Action discontinuity fixSybren A. Stüvel
Fix mistake in e5528904f12 where one change accidentally wasn't included in the commit.
2020-12-18Fix T83351: Baked object rotation has discontinuitiesSybren A. Stüvel
Fix Euler discontinuities in the Bake Action operator, by explicitly using the previous Euler angles when converting from matrix to rotation. This basically follows the same approach as used in e4ca1fc4ea43, although the Euler Discontinuity Filter also performs single-channel filtering which the Bake Action operator doesn't.
2020-12-15Asset System: New Asset Browser editorJulian Eisel
This introduces the User Interface part of the Asset Browser, based on the design in T54642. Additions: * New Asset Browser (internally a sub-editor of the File Browser). * Navigation region showing asset categories. * Main region showing the assets of the selected asset library with previews. The assets may be stored over multiple .blends in the directory that's "mounted" as asset library in the Preferences. They will all be shown in this list. * Header with an asset library dropdown, allowing to choose the active asset library to show. Options are the "Current File" as asset library and all custom libraries. * Display popover, filter popover and search box (partially dummies, see T82680). * Sidebar showing the metadata of the currently active file (name, preview, description and tags), which can be edited for assets in the "Current File" asset library. (For others it will reset on reload.) * The sidebar includes a button to load a custom preview image from a file. * Make asset files draggable (with preview image). * If a library with invalid path is selected, a message is drawn in the main region to help the user understand what's wrong. * Operators to add and remove asset tags. Exposed in the sidebar. * "Only Assets" option for Link/Append. * Internal utilities for asset UI scripts. For screenshots or demo videos, please see D9725. Or the 2.92 release notes. Note that there are many things to be tweaked and polished in the Asset Browser UI still. For example, the filter and display popovers are mostly dummies. See T82680. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9725 Reviewed by: Brecht Van Lommel, Hans Goudey
2020-11-04Fix T63495: Add torus changes size each time when unit scale != 1.0Campbell Barton
This matches behavior in WM_operator_view3d_unit_defaults.
2020-10-02Cleanup: pep8, blank linesCampbell Barton
2020-09-17Shaders: add emission strength input to Principled BSDF nodeAlex Strand
This impacts I/O add-ons. OBJ, FBX and Collada have been updated, glTF not yet. Differential Revision: https://developer.blender.org/D4971
2020-09-16Fix T80684: Node shader wrapper: Tweak handling of alpha textures.Bastien Montagne
There is no ideal solution here, but we can assume by default that we should use the Alpha output from a texture used for transparency data. This will break people using a dedicated B&W texture for this alpha pass, but we cannot really handle all cases properly in this wrapper, we only try to support the most common ones to some extent.
2020-09-02Cleanup: improve internal function name in 'ngon_tessellate'Campbell Barton
2020-06-09Cleanup: remove debug prints in py.ops.nla.bake()Campbell Barton
2020-05-19Fix T74577: world_to_camera_view broken for off-axis projectionSebastian Parborg
The issue was that the projection would be inverted. So if you shifted 0.1 along the y axis, world_to_camera_view would act as if you had shited it -0.1 along the y axis.
2020-04-06Fix T74889 Baking to current action doesn't work properlySybren A. Stüvel
Before this commit, baking an action would only insert keys that are necessary (i.e. using `INSERTKEY_NEEDED`). When baking to the current Action, if there are no constraints that influence the final animation, there are no additional keys necessary. This makes it appear as if nothing happened. However, when baking to a new Action every additional frame is necessary and thus a key is added for every frame. @mont29 and I agreed that this behaviour is confusing, so this commit changes the behaviour such that baking to the current action and to a new action result in the same baked animation (that is, keyed on every frame).
2020-02-10Fix T73681: Python exception adding Empty objects via `object_data_add`Philipp Oeser
with "Enter Edit Mode" enabled It is valild to add Empties this way, but we cannot enter editmode on those.
2020-01-26Fix T73357: Multiple importers failJulian Eisel
Very stupid mistake in ba8de85299ff, registered property for wrong class. It should be registered for the PLY importer add-on only.
2020-01-22PLY Import: Hide empty operator properties sidebar in file browserJulian Eisel
The sidebar is empty for the PLY importer, so better to hide it.
2020-01-14Fix T69105: reset the action blend mode to Replace in Bake Action.Alexander Gavrilov
This can't be done in Tweak mode since the setting is stored in the tweaked strip, and the logic for finding it is not exposed to python.
2020-01-14Fix T57159: don't exit tweak mode in Bake Action if reusing the action.Alexander Gavrilov
2019-12-11Fix bpy.extras.object_data_add use without an active spaceCampbell Barton
2019-12-02Fix T71596: Bug in io_utils api breaking only on windows.Bastien Montagne
Stupid mistake, 'original' filepath is a blender-flavored one, with potentially weird things like the '//' relative 'header'... This can work on linux (also it could have broken in other places too), but on windows that is fully invalid path and python `os.path` library just generates empty result here. Simply using proper valid path instead fixes it...
2019-11-26Fix T71924: Baking quaternion keyframes gives discontinuous valuesCampbell Barton
2019-10-29Cleanup: remove unused object_image_guessCampbell Barton
This made sense when we had tex-face feature, since it's removed & unused, remove this function too. D6079 by @alm
2019-10-17Node shader wrapper: use 'Non-Color' profile for BW textures inputs.Bastien Montagne
All the single-value texture inputs of Principled BSDF node should use non-color colorspace profile, not sRGB one (issue raised in https://blender.stackexchange.com/questions/155617, thanks). That also revealed another issue - since those color space settings are stored at the image level itself, not the node one, we need to duplicate those image data-blocks when we use same picture for e.g. base color (sRGB) and specular (non-color) inputs... For now using a basic mechanism for that, might generate several extra, uneeded copies of the image ID, but that’s better than breaking custom settings and such. Note that while this will modify the behavior of the impporters using that node wrapper, no change should be needed in IO add-ons themselves.