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-07-18Context: implement indexing for list properties in path_resolve.Alexander Gavrilov
The real RNA path_resolve method supports indexing lists, but the python version on the Context object does not. This patch adds the missing feature for completeness. Differential Revision: https://developer.blender.org/D15413
2022-07-15I18n: Add suport for labels from modifiers' subpanels.Bastien Montagne
Was a bit oif a struggle since those functions take a first string which is not our label, but should work fine now. Reported/detected as part of D15418.
2022-07-15blend_render_info: add check for negative BHead length (corrupt file)Campbell Barton
Without this check, corrupt files would raise a Python exception, now early exit with a useful error.
2022-07-14I18n: Fix regex for messages from `BKE_modifier_set_error`.Bastien Montagne
Signature of this function changed at some point, regex to extract messages from it was no longer working. Reported/detected as part of D15418.
2022-07-11Fix/Cleanup UI messages.Bastien Montagne
2022-06-19Update RNA Manual ReferencesAaron Carlisle
2022-06-14blend_render_info: minor improvements to file parsingCampbell Barton
- Stop once `ENDB` is reached, as files could include additional data. - Prevent the possibility of an infinite loop from malformed BHEAD blocks that could seek backwards in the file.
2022-06-13Cleanup: fix various typosBrecht Van Lommel
Found via codespell -q 3 -S ./intern,./extern -L ans,ba,bording,datas,eiter,fiter,hist,inout,lod,ot,parm,parms,pixelx,pres,te Contributed by luzpaz. Differential Revision: https://developer.blender.org/D15155
2022-06-07Fix T98527 : corrected label for Korean language in Blender preferencesJoseph Faulkner
Patch changes label from '한국 언어' to '한국어' Reviewed By: persun, PratikPB2123, mont29 Maniphest Tasks: T98527 Differential Revision: https://developer.blender.org/D15120
2022-06-07blend_render_info: Zstd support, skip redundant file reading & cleanupCampbell Barton
- Use a context manager to handle file handlers (closing both in the case of compressed files). - Seek past BHead data instead of continually reading (checking for 'REND'). - Write errors to the stderr (so callers can differentiate it from the stdout). - Use `surrogateescape` in the unlikely event of encoding errors so the result is always a string (possible with files pre 2.4x). - Remove '.blend' extension check as it excludes `.blend1` files (we can assume the caller is passing in blend files). - Define `__all__` to make it clear only one function is intended to be used.
2022-06-03Fix: Curves sculpt mode keymaps missing in preferencesHans Goudey
These changes make the curves sculpt mode keymap consistent with other modes. They now show up in the keymap, for potential editing of tool shortcuts, etc. I don't fully understand this system, but at least these changes should make it consistent. Differential Revision: https://developer.blender.org/D15112
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-31PyDoc: replace in-lined enum references with links where possibleCampbell Barton
Avoid in-lining large enums such as icons and event types, linking to them instead. This mitigates T76453, where long enums took a lot of space in the docs, this was a problem with `UILayout` where each icon argument would list all icons. [0] worked around the issue using CSS to scroll the list. However this has the draw-back where some items are clipped in a way that's not obvious, see: T87008. The reason this isn't a complete solution is that Python defined enums aren't written into their own pages which can be linked to, although currently there are no large Python enums included in the API docs. All in-lined enums are now under 20 items. [0]: 1e8f2665916c049748a3985a2fce736701925095
2022-05-23PyDoc: quiet output and minor cleanupCampbell Barton
Suppress printing unnecessary output when generating docs.
2022-05-23Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-23Fix float representation for Python API docsCampbell Barton
float_as_string(1000000) resulted in 1e+06.0 which isn't valid notation.
2022-05-20Include __init__.py in bl_console_utilsCampbell Barton
Failure to include this file caused script_load_modules test to fail.
2022-05-20Cleanup: move 'console' module to 'bl_console_utils.autocomplete'Campbell Barton
The name 'console' for a module was too generic, move into a sub-package of bl_console_utils, so other console utilities can be added without creating new top-level modules.
2022-05-19Cleanup: format, reduce line length & strip trailing spaceCampbell Barton
2022-05-18Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-18Fix T88792: WindowManager.clipboard missing in Python API docsCampbell Barton
Support RNA types using the Py/C-API PyGetSetDef defined properties. Currently `WindowManager.clipboard` is the only instance of this.
2022-05-09Merge branch 'blender-v3.2-release'Bastien Montagne
2022-05-09Tweak i18n messages extraction script to avoid unwanted messages.Bastien Montagne
Code would add a bit too often the identifier of an RNA class to translated messages, this is only needed if there is no valid label available for it.
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-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-26Cleanup: line length for Python scriptsCampbell Barton
2022-04-26Cleanup: autopep8Campbell Barton
2022-04-22Fix various typos and other UI messages issues.Bastien Montagne
2022-04-22Fix T97429: Translateable Unit Names Missing in the File.Bastien Montagne
Added some regex magic in i18n py module to also extract UI names from all of our units definitions. Those enum values are fully dynamically generated, so they cannot be extracted from RNA introspection.
2022-04-21Cleanup: explicitly disable autopep8 for rna_manual_referenceCampbell Barton
Currently the "exclude" option for autopep8 isn't as reliable as it should be since passing in absolute paths to autopep8 causes the paths not to match. See: D14686 for details. So explicitly disable autopep8 in this generated file (the generator has already been updated). Also use spaces for indentation otherwise autopep8 re-indents them. This seems like a bug in autopep8 since it's changing lines with autopep8 disabled. Use a workaround instead of looking into a fix since it's simpler for all our Python files to use spaces instead of tabs and there isn't much benefit mixing indentation for scripts.
2022-04-20Cleanup: run autopep8 with max-line-length=120 (missed a file)Campbell Barton
2022-04-20Cleanup: run autopep8 with max-line-length=120Campbell Barton
2022-04-20Cleanup: use autopep8 for bl_i18n_utils.settingsCampbell Barton
Disable autopep8 for some regex blocks that use indentation to signify regex grouping.
2022-04-20Cleanup: run autopep8 on release/scripts/modules/Campbell Barton
2022-04-19Fix missing C/Python methods in API docsCampbell Barton
The following methods weren't included in API docs. - BlendDataLibraries.load - BlendDataLibraries.write - Text.region_as_string - Text.region_from_string
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-11Update RNA to user manual referencesAaron Carlisle
2022-04-11Fix/workaround i18n script not finding some messages anymore.Bastien Montagne
For some reasons(c) some base classes (like `bpy.types.Modifier`) are not listed anymore by a call to `bpy.types.ID.__base__.__subclasses__()`, unless they are first accessed explicitely (e.g. by executing `bpy.types.Modifier` etc.).
2022-04-07Cleanup: remove incorrect commentSybren A. Stüvel
No functional changes.
2022-04-06Cleanup: spelling & poor wording in code & commentsCampbell Barton
2022-04-06Cleanup: use context.path_resolve instead of eval(..)Campbell 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-04-05Cleanup: fix various typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14443
2022-04-03Curves: Curve PenDilith Jayakody
This tool can be used to rapidly edit curves. The current set of functionalities for Bezier splines are as follows: The functionalities are divided into three versions of the operator: * Left-Click * Ctrl + Left-Click * Double Click All current functionalities and their defaults are as follows: * Extrude Point: Add a point connected to an existing point. Enabled for Left-Click. * Extrude Handle Type: Type of the handles of the extruded points. Can be either Vector or Auto. Defaults to Vector. * Delete Point: Delete existing point. Enabled for Ctrl + Left-Click. * Insert Point: Insert a point into a curve segment. Enabled for Ctrl + Left-Click. * Move Segment: Move curve segment. Enabled for Left-Click. * Select Point: Select a single point or handle at a time. Enabled for Left-Click. * Move point: Move existing points or handles. Enabled for Left-Click. * Close Spline: Close spline by clicking the endpoints consecutively. Defaults to True. * Close Spline Method: The condition for Close Spline to activate. Can be one of None, On Press or On Click. Defaults to On Click for Left-Click and None for the others. * None: Functionality is turned off. * On Press: Activate on mouse down. This makes it possible to move the handles by dragging immediately after closing the spline. * On Click: Activate on mouse release. This makes it possible to avoid triggering the Close Spline functionality by dragging afterward. * Toggle Vector: Toggle handle between Vector and Auto handle types. Enabled for Double Click on a handle. * Cycle Handle Type: Cycle between all four handle types. Enabled for Double Click on the middle point of a Bezier point. The keybindings for the following functionalities can be adjusted from the modal keymap * Free-Align Toggle: Toggle between Free and Align handle types. Defaults to Left Shift. Activated on hold. * Move Adjacent Handle: Move the closer handle of the adjacent vertex. Defaults to Left Ctrl. Activated on hold. * Move Entire: Move the entire point by moving by grabbing on the handle Defaults to Spacebar. Activated on hold. * Link Handles: Mirror the movement of one handle onto the other. Defaults to Right Ctrl. Activated on press. * Lock Handle Angle: Move the handle along its current angle. Defaults to Left Alt. Activated on hold. All the above functionalities, except for Move Segment and those that work with handles, work similarly in the case of Poly and NURBS splines. Reviewed By: HooglyBoogly, weasel, campbellbarton Differential Revision: http://developer.blender.org/D12155
2022-03-28Fix various UI messages issues.Bastien Montagne
2022-03-24Outliner: Remove list of library overrides from general display modesJulian Eisel
There is a dedicated Library Override display mode now, and showing these elsewhere just adds noise and makes the code problematic to maintain (since the same element hierarchy will be used in two entirely different contexts). The corresponding filter settings are removed too. Part of T95802. Reviewed by: Bastien Montagne Differential Revision: https://developer.blender.org/D14411
2022-03-15Cleanup: use single back-ticks in regular commentsCampbell Barton
Double back-ticks are used for RST literals.
2022-03-14Fix T96395: NDOF entries prevent loading of custom keymaps in 3.2Campbell Barton
Even though the default key-map didn't use NDOF types some key-maps did.
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-03-04Cleanup: unused Python variables & importsCampbell Barton