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-20Curves: Remove use of CurveEval in sculpt brushesHans Goudey
This commit removes the use of PolySpline for resampling curves and replaces it with the length parameterization utility for that purpose. I didn't test performance, but I would expect the shrinking to be slightly faster because I reused some arrays to avoid allocating them for every curve. I noted some potential improvements in the "add curves" function. Differential Revision: https://developer.blender.org/D15342
2022-07-19UI Code Quality: Move eyedropper files to own folderJulian Eisel
Part of T98518
2022-07-19UV: add Snap Cursor to OriginTomek Gubala
Similar to snapping to the world origin in the 3D viewport. This can be found in the Shift+S pie menu and UV > Snap menu. Differential Revision: https://developer.blender.org/D15055
2022-07-19Cleanup: compiler warningBrecht Van Lommel
2022-07-19Fix error printed in console when running Shade Flat operatorBrecht Van Lommel
Only the Shade Smooth operator has autosmooth settings.
2022-07-19Fix T99643: Vertex Crease fails with symmetryGermano Cavalcante
Create a transform conversion type that only considers the Vertex Custom Data. This reduces the complexity of converting Meshes and slightly optimizes the transformation.
2022-07-19Cleanup: Remove compile option for curves objectHans Goudey
After becb1530b1c81a408e20 the new curves object type isn't hidden behind an experimental flag anymore, and other areas depend on this, so disabling curves at compile time doesn't make sense anymore.
2022-07-19Cleanup: Improve API and documentation of interface_view.ccJulian Eisel
File documentation was outdated and could use general improvement. Function names didn't really reflect the level they are operating on.
2022-07-19UI Code Quality: Move view related files to own folderJulian Eisel
Part of T98518.
2022-07-19Fix T99732: Crash on F3 in the dopesheetAmélie Fondevilla
Adding the `FCURVESONLY` filter in the filter function of the Grease Pencil dopesheet prevents calls to F-curves related functions to grease pencil channels, thereby fixing the crash. Reviewed By: antoniov, sybren Maniphest Tasks: T99732 Differential Revision: https://developer.blender.org/D15490
2022-07-19UI: Port view item features to base class, merge view item button typesJulian Eisel
No user visible changes expected. Merges the tree row and grid tile button types, which were mostly doing the same things. The idea is that there is a button type for highlighting, as well as supporting general view item features (e.g. renaming, drag/drop, etc.). So instead there is a view item button type now. Also ports view item features like renaming, custom context menus, drag controllers and drop controllers to `ui::AbstractViewItem` (the new base class for all view items). This should be quite an improvement because: - Merges code that was duplicated over view items. - Mentioned features (renaming, drag & drop, ...) are much easier to implement in new view types now. Most of it comes "for free". - Further features will immediately become availalbe to all views (e.g. selection). - Simplifies APIs, there don't have to be functions for individual view item types anymore. - View item classes are split and thus less overwhelming visually. - View item buttons now share all code (drawing, handling, etc.) - We're soon running out of available button types, this commit merges two into one. I was hoping I could do this in multiple smaller commits, but things were quite intertwined so that would've taken quite some effort.
2022-07-19UI: Add AbstractViewItem base classJulian Eisel
No user visible changes expected. Similar to rBc355be6faeac, but for view items now instead of the view. Not much of the item code is ported to use it yet, it's actually a bit tricky for the most part. But just introducing the base class already allows me to start unifying the view item buttons (`uiButTreeRow` and `uiButGridTile`). This would be a nice improvement.
2022-07-19Fix T97559: Undoing of NLA strip duplication requires two undo stepsColin Basnett
Fix the issue where undoing a "duplicate NLA strip" operation would require two undo steps. The cause of this was that the operator was not using the operator macro system to combine both the duplication and the translate operators into one. Instead, the old code was simply manually invoking invoking the translate operator after the duplicate operator had completed. This patch requires the default keymap to be modified to include the two new macro operators, `NLA_OT_duplicate_move` and `NLA_OT_duplicate_linked_move` in favour of the old keymap that simply called `NLA_OT_duplicate` and passed along a `linked` argument. `duplicate_move` and `duplicate_move_linked` are two different enough operations to justify having their own operators from user's point-of-view, especially since we cannot yet have different tool-tips based on an operator's settings. Reviewed By: sybren, mont29 Differential Revision: https://developer.blender.org/D15086
2022-07-19Curves: align surface and curves object in Empty Hair operatorJacques Lucke
Without this, symmetry does not work by default when the surface object was not at the same location as the 3d cursor.
2022-07-19Cleanup: quiet compiler warningsCampbell Barton
2022-07-19Fix T99794: regression from uv unwrap selectedChris Blackbourn
Restore only_selected_faces flag inadvertently changed by c0e453233132 Differential Revision: https://developer.blender.org/D15480
2022-07-19Fix Text Editor highlight of assert and asyncHenrik Dick
Due to the ordering of the checks, assert and async were not highlighted in the editor, even though they were in the list of keywords. Differential Revision: http://developer.blender.org/D15483
2022-07-18Context: implement an active_action property that returns a single action.Alexander Gavrilov
Although e.g. in the dopesheet there is no specific concept of active action, displaying panels requires singling out one action reference. It is more efficient and clearer to implement this natively in the context rather than using selected_visible_actions[0]. - In the Action Editor the action is taken from the header. - In the Dope Sheet the first selected action is chosen, because there is no concept of an active channel or keyframe. - In the Graph Editor the action associated with the active curve is used, which should also be associated with the active vertex. This case may be different from selected_visible_actions[0]. Differential Revision: https://developer.blender.org/D15412
2022-07-18Fix T99742: crash when generating rigify rigs, after recent changesJun Mizutani
Differential Revision: https://developer.blender.org/D15473
2022-07-17Fix T99644: Anchored brush mode fails for negative brushesJoseph Eagar
The stroke code now supports raycasting the original mesh. This fixes anchored mode not working for negative brushes, which might move the mesh out of the initial mouse cursor position.
2022-07-17Sculpt: Fix scene spacing mode (phase 1)Joseph Eagar
The scene spacing code was failing to check if a raycast failed, which can happen when sculpting the edges of objects in negative mode. Note I removed what I suspect was a hack put in to fix this, spacing was clamped to 0.001 scene units. Scene spacing mode is actually quite broken, so it will be fixed in a series of phases.
2022-07-16Fix T99039: bpy.ops.sound.mixdown returns indecipherable errorColin Basnett
Fix for {T99039}. The problem was that `AUD_mixdown` and `AUD_mixdown_per_channel` were returning pointers to freed memory. Two key changes are made: 1. The return value of those functions now simply return a bool as to whether the operation succeeded, instead of an optional error string pointer. 2. The error string buffer is now passed into the function to be filled in case an error occurs. In this way, the onus of memory ownership is unamibiguously on the caller. Differential Revision: https://developer.blender.org/D15260
2022-07-15Cleanup: compiler warningsBrecht Van Lommel
2022-07-15Cleanup: VSE waveform drawingRichard Antalik
No functional changes.
2022-07-15Fix (unreported) LibOverride: invalid behaviors when creating (partial) ↵Bastien Montagne
overrides. The outliner would tagg all existing local IDs (for remap from linked reference data to newly created overrides) when creating a new override. This would become critical issue in case there is several existing copies of the same override hierarchy (leading to several hierarchies using the same override). Further more, BKE override creation code would not systematically properly remapp linked usages to new overrides one whithin the affected override hierarchy, leading to potential undesired remaining usages of linked data.
2022-07-15Render: camera depth of field support for armature bone targetsDamien Picard
This is useful when using an armature as a camera rig, to avoid creating and targetting an empty object. Differential Revision: https://developer.blender.org/D7012
2022-07-15Render: improve render border operator in image editorBrecht Van Lommel
* Snap border to pixels just outside the drawn border, to more easily select specific pixels by drawing a border inside them. * Support cropped border renders.
2022-07-15Cleanup: add utlity function to compute render resolutionBrecht Van Lommel
Instead of duplicating logic many times.
2022-07-15Fix T98061: uv resize with individual origins could break constrain to boundsChris Blackbourn
Fix unreported: Resize with Constrain To Bounds will now limit one shared scale value for both U and V instead of calculating separate scale values for each. To fix T98061, the individual origins (transdata->center) is now used when that mode is active. See also: 0e9367fc29bc Differential Revision: https://developer.blender.org/D15420
2022-07-15Cleanup: Use const pointers for ImageSaveOptions and ImageFormatDataJesse Yurkovich
Use const pointers to ImageSaveOptions and ImageFormatData for API parameters where appropriate. Differential Revision: https://developer.blender.org/D15400
2022-07-15Fix T79304: improve uv island calculation when in edge selection modeChris Blackbourn
Differential Revision: https://developer.blender.org/D15419
2022-07-15Cleanup: separate clipUVTransform into two different functionsChris Blackbourn
No functional changes. Prep for D15420 / T98061.
2022-07-14Fix `on_drag_start` handler not getting ID when dragging from OutlinerJulian Eisel
We would first invoke the dragging, and then set the drag data (like the ID or the dragged modifier), so the `wmDropBox.on_drag_start()` handler wouldn't be able to access this. This broke dragging some IDs from the Outliner, noticed in D15333. It's now possible to first create/request drag data, extend it, and then invoke the actual dragging. The normal function to start dragging returns `void` now instead of `wmDrag *`, so the drag data can't easily be modified after starting anymore.
2022-07-14Fix T99702: Gpencil Flip strokes did not support multiframe editAntonio Vazquez
This was a missing feature and this commit solves this.
2022-07-14Cleanup: remove redundant `event->val` check for 3D text insertionCampbell Barton
2022-07-14Cleanup: format, unused argumentCampbell Barton
2022-07-14Correct error with IME from d6fef73ef110eb43756b7b87c2cba80abae3b39fCampbell Barton
2022-07-14UI: translate tooltips coming from menu descriptionsDamien Picard
Many menus get their labels exported to the .po file, but then are not actually translated in the UI. Before: {F13283752} After: {F13283750} Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15417
2022-07-14Cleanup: Rename & refactor several F-curve functionsColin Basnett
Rename and refactor several F-curve key manipulation functions, and move them from `editors` to `blenkernel`. The functions formerly known as `delete_fcurve_key`, `delete_fcurve_keys`, and `clear_fcurve_keys` have been moved from `ED_keyframes_edit.h` to `BKE_fcurve.h` and have been renamed according to hierarchical naming rules. Below is a table of the naming changes. | From | To | | -- | -- | | `delete_fcurve_key(fcu, index, do_recalc)` | `BKE_fcurve_delete_key(fcu, index)` | | `delete_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_selected(fcu)` | | `clear_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_all(fcu)` | | `calchandles_fcurve()` | `BKE_fcurve_handles_recalc()` | | `calchandles_fcurve_ex()`| `BKE_fcurve_handles_recalc_ex()` | The function formerly known as `delete_fcurve_key` no longer takes a `do_fast` parameter, which determined whether or not to call `calchandles_fcurve`. Now, the responsibility is on the caller to run the new `BKE_fcurve_handles_recalc` function if they have want to recalculate the handles. In addition, there is now a new static private function called `fcurve_bezt_free` which sets the key count to zero and frees the key array. This function is now used in couple of instances of functionally equivalent code. Note that `BKE_fcurve_delete_keys_all` is just a wrapper around `fcurve_bezt_free`. This change was initially spurred by the fact that `delete_fcurve_keys` was improperly named; this was a good opportunity to fix the location and naming of a few of these functions. Reviewed By: sybren Differential Revision: https://developer.blender.org/D15282
2022-07-14UI: translate quick favorites menu operator namesDamien Picard
Some operator titles were not translated in the quick favorites menu. Before: {F13283724} After: {F13283725} Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15416
2022-07-14I18N: Allow translating newly added GP data names, and a missing Surface one.Damien Picard
2022-07-14Cleanup: simplify 3D text insert, remove checks for ascii escape codesCampbell Barton
3D text included checks for escape codes such as \n\r\b which have not been included in wmEvent.ascii since [0] (2009). Remove these and use more straightforward logic for overriding the events text input. [0] 66437a62a73966de8ccb673473ba69d6c1ed66a3
2022-07-14Cleanup: update & correct comments for event handlingCampbell Barton
- Remove references to `ISTEXTINPUT` as any keyboard event with it's utf8_buf set can be handled as text input. - Update references to the key repeat flag.
2022-07-14WM: Remove ASCII members from wmEvent & GHOST_TEventKeyDataCampbell Barton
The `ascii` member was only kept for historic reason as some platforms didn't support utf8 when it was first introduced. Remove the `ascii` struct members since many checks used this as a fall-back for utf8_buf not being set which isn't needed. There are a few cases where it's convenient to access the ASCII value of an event (or nil) so a function has been added to do that. *Details* - WM_event_utf8_to_ascii() has been added for the few cases an events ASCII value needs to be accessed, this just avoids having to do multi-byte character checks in-line. - RNA Event.ascii remains, using utf8_buf[0] for single byte characters. - GHOST_TEventKeyData.ascii has been removed. - To avoid regressions non-ASCII Latin1 characters from GHOST are converted into multi-byte UTF8, when building X11 without XInput & X_HAVE_UTF8_STRING it seems like could still occur.
2022-07-14Fix T99684: Upgrade Averages Island Scale with options Scale UV and ShearChris Blackbourn
Differential Revision: https://developer.blender.org/D15421
2022-07-13Cleanup: Do not use spaces in default data names.Bastien Montagne
Using white spaces in data names should not be encouraged in general, better not give wrong example here. Originally part of D15441.
2022-07-13Expose snap options in transform operatorsjon denning
This commit exposes snap options in transform operators. These options are needed for Python tools to control snapping without requiring the tool settings to be adjusted. The newly exposed options are: - `snap_elements` for choosing which element(s) of target the source geometry should snap to (ex: Face Raycast). - `use_snap_self`, `use_snap_edit`, `use_snap_nonedit`, `use_snap_selectable_only` for controlling target selection. - `use_snap_project` for controlling Face Raycast snapping. - `use_snap_to_same_target` and `snap_face_nearest_steps` for controlling Face Nearest snapping. Reviewed by: Campbell Barton (campbellbarton) Differential Revision: https://developer.blender.org/D15398
2022-07-13Fix T99653: "Align Active Camera to Selected" fails with ortho cameraCampbell Barton
There were two bugs, a regression in [0] and the object-data wasn't tagged for depsgraph updating. [0]: 19df0e3cfd5b9fed891ed81dd1123b2351605a7d
2022-07-13Fix T99659: Improve UV Island calculation with hidden faces.Chris Blackbourn
Simplify interface, regularize implementation and some light cleanup. See also: T79304 and D15419.
2022-07-12Cleanup: Use interpf instead of repeating the logicGermano Cavalcante
This makes the code clearer.