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-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-14Fix T99239: weird behavior in Field on Domain nodeIliay Katueshenock
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-14Fix T99677: crash when convex hull node is used on empty meshJacques Lucke
Fundamental issue is that the attribute api returns none, because the custom data api returns null for a layer when the size of 0. This should be improved separately.
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-14GHOST/SDL: pass in utf8 buffer for keyboard eventsCampbell Barton
While GHOST/SDL doesn't support non-ASCII text input, use the UTF8 buffer to be consistent with all other back-ends. Move the conversion from SDL_KeyboardEvent to ASCII into a function. Also only lookup this value on key press (not release).
2022-07-14Fix build and warnings from previous commit.Chris Blackbourn
2022-07-14Fix T99684: Upgrade Averages Island Scale with options Scale UV and ShearChris Blackbourn
Differential Revision: https://developer.blender.org/D15421
2022-07-14GHOST/SDL: add support for the key repeat flagCampbell Barton
Now all ghost back-ends support the key repeat flag (accessed as WM_EVENT_IS_REPEAT from wmEvent.flag).
2022-07-13Docs: Fix out of order parametersAaron Carlisle
Fixes T99672
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-13Fix (studio-reported) bad remapping of libraries.Bastien Montagne
New remapper code would also fail in some cases when remapping libraries, similar to the issue yesterday, because ID_LI type had no mask value. That would fail to remap `parent` member of a library to NULL when deleting that parent, leading to a crash e.g. in Outliner tree building code. Reported by @JulienKaspar from Blender studio.
2022-07-13Documentation: Update Docs for Gizmojon denning
This patch updates the documentation for arguments regarding the `Gizmo` type. - Corrected `select_id` doc for draw_preset_ functions. `-1` indicates that no selection ID is to be written, but previous docs incorrectly specified `0` instead. - Added missing doc for `target` argument for `target_set_handler` function. Reviewed by: Aaron Carlisle (Blendify) Differential Revision: https://developer.blender.org/D14834
2022-07-13Expose option for fallback tools keymap in GizmoGroup typejon denning
This patch allows new GizmoGroup classes to support tool fallback keymap. With this patch, when new gizmo groups add `'TOOL_FALLBACK_KEYMAP'` to its `bl_options`, the fallback tools are added to the group. This allows a `WorkSpaceTool` (for example) to have selection be a fallback tool if the user LeftMouse drags away from other gizmos in the group. Reviewed by: Campbell Barton (campbellbarton) Differential Revision: https://developer.blender.org/D15154
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 T99654: Applying Mirror modifier breaks the erase toolAntonio Vazquez
The problem was the new generated strokes were copied from original and the location was offset to mirror, but the internal geometry data was not updated and the collision check done by brushes was not working. Now, the internal geometry data is recalculated when the modifier is applied.
2022-07-13Fix (studio-reported) issue in remapping code.Bastien Montagne
Not clearing runtime remapping data for the new ID as well as the old one can lead to false stale data there, wichi could e.g. make indirectly linked data be tagged as directly linked. This would generate an error report on file write when hapening on ShapeKey ID, since that type is not allowed to be directly linked.
2022-07-13Cleanup: logical order of axis defines, assign variables for readabilityCampbell Barton
2022-07-13Cleanup: use defines for camera axes for view frame fittingCampbell Barton
The values used for axes weren't in any meaningful order, use defines to improve readability.
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-12Fix: set dangling pointer to nullJacques Lucke
The data has been moved somewhere else, the span should not keep a pointer to it.
2022-07-12Cycles: Make not-compact BVH the default for embreeXavier Hallade
Measurements shown on average a 1.08x speedup for a 1.04x increase in memory usage which is an acceptable trade off for a default setting, although discoverability of such settings influencing memory usage could be improved. Reviewed By: brecht Differential Revision: https://developer.blender.org/D15429
2022-07-12Enable "copy to selected" for new Curves modifiersErik Abrahamsson
The operator bpy.ops.object.modifier_copy_to_selected() does not work for the new Curves objects. This is because it isn't added to BKE_object_supports_modifiers. Differential Revision: https://developer.blender.org/D15439
2022-07-12Curves: improve error checking in deform curves on surface nodeJacques Lucke
2022-07-12Fix: wrong node name in menuJacques Lucke
2022-07-12Fix: Memory leaks in indexer codeSebastian Parborg
Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D15376
2022-07-12Fix T99103: crash when displaying or rendering Grease Pencil objectKhoi Dau
On some hardware/systems, blender may crash when adding, rendering or displaying Grease Pencil objects. In `/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl`, line 35: ``` gpMaterialFlag gp_flag = floatBitsToInt(gp_mat._flag); ``` `gpMaterialFlag` is of type `uint`. This is a mismatched-type assignment that can cause crashes on some hardware/systems with GLSL that do not support implicit type casting. So use `floatBitsToUint` for type conversion. Differential Revision: https://developer.blender.org/D15433
2022-07-12Fix: missing geometry copy before modifying itJacques Lucke
A geometry component may reference read-only geometry. In this case it has to be copied before making changes to it. This was caused by rBb876ce2a4a4638142.
2022-07-12Cycles: fix and enable JIT oneAPI CentOS7 builds for drivers 23570+Xavier Hallade
The current specific CentOS7 workaround we have for AoT, which is to disable __FAST_MATH__ by using -fhonor-nans, now also fixes the compilation issue for JIT as well since at least driver 23570.
2022-07-12LibOverride: Fix some issues from.revealed by recent previous commit.Bastien Montagne
rB57097e9a8515 did not properly consider case where you have more than one override for a same reference linked ID. Also adds more security checks around shapekeys, since match between override and its linked reference is never ensured either way (fixes a crash reported by @Rik from Blender studio).
2022-07-12Cleanup: Use interpf instead of repeating the logicGermano Cavalcante
This makes the code clearer.
2022-07-12Fix T96238: shrinking to zero doesn't actually scales the radius to zeroGermano Cavalcante
Probably to prevent the radius of a point from being stuck at zero, the `Shrink/Fatten` curve operator sets a minimum value of `0.001` for all points being transformed. This is an inconvenience as these points may have been purposely set to zero on the panel. And it also doesn't follow the convention seen in other operators (which keep the value zero). So remove this limitation.
2022-07-12Fix T99261: partial LibOverride creation would not properly remap all needed ↵Bastien Montagne
data. When creating partial overrides, there may also be need to reamap usage of linked data towards already existing overrides, in newly created overrides.
2022-07-12Markers: Make delete confirmation depend on key usedRedMser
Add a 'Delete Confirmation' operator property to the 'Delete Marker' operator. This determines whether the user is asked to confirm the deletion or not. Defaults so that only {key X} ({key Backspace} for industry compatible keymap) prompts for deletion, whereas {key Del} does not show the confirmation popup. This also makes the default keymap for marker deletion consistent with the common delete operators (such as objects and keyframes). Reviewed By: sybren Differential Revision: https://developer.blender.org/D13818
2022-07-12UV: Box and lasso selection for partially intersecting edgesSiddhartha Jejurkar
In UV edge mode, box and lasso selections allow edge selections only when the entire edge is contained within the selection area. This doesn't consider any edges that partially overlap with the selection area. This is now fixed by adding a second pass, similar to how these operators work for edit-mesh selections. Now if both operators are unable to find any edges contained within the selection area, then they will perform a second pass which checks for edges that partially intersect with the selection area. Now edge selection in the UV editor matches edit-mesh edge-selection when drawing wire-frame. Resolves T99443. Ref D15362
2022-07-12Fix: Incorrect coordinates used in BLI_rct*_isect_segment functionsSiddhartha Jejurkar
Ref D15330.
2022-07-12Fix threading crash due to conflict in mesh wrapper typeSergey Sharybin
A mesh wrapper might be being accessed for read-only from one thread while another thread converts the wrapper type to something else. The proposes solution is to defer assignment of the mesh wrapper type until the wrapper is fully converted. The good thing about this approach is that it does not introduce extra synchronization (and, potentially, evaluation pipeline stalls). The downside is that it might not work with all possible wrapper types in the future. If a wrapper type which does not clear data separation is ever added in the future we will re-consider the threading safety then. Unfortunately, some changes outside of the mesh wrapper file are to be made to allow "incremental" construction of the mesh prior changing its wrapper type. Unfortunately, there is no simplified file which demonstrates the issue. It was investigated using Heist production file checked at the revision 1228: `pro/lib/char/einar/einar.shading.blend`. The repro case is simple: tab into edit mode, possibly few times. The gist is that there several surface deform and shrinkwrap modifiers which uses the same target. While one of them is building BVH tree (which changes wrapper type) the other one accesses it for read-only via `BKE_mesh_wrapper_vert_coords_copy_with_mat4()`. Differential Revision: https://developer.blender.org/D15424
2022-07-12Fix: crash when iterating over all attributesJacques Lucke
2022-07-12Cleanup: use array for internal _bpy methodsCampbell Barton
2022-07-12Tests: add test to ensure restricted py-driver execution is workingCampbell Barton
Add internal function (only used for testing at the moment) `_bpy._driver_secure_code_test`. Add test `script_pyapi_bpy_driver_secure_eval` to serves two purposes: - Ensure expressions that should be insecure remain so when upgrading Python or making any changes in this area. - Ensure new versions of Python don't introduce new byte-codes that prevent existing expressions from being executed (happened when upgrading from 3.7, see [0]). [0]: dfa52017638abdf59791e5588c439d3a558a191d
2022-07-12Python: add opcodes for safe py-driversCampbell Barton
The following opcodes have been added, see [0] for details: - LIST_TO_TUPLE: convert a list to a tuple, use for constructing lists/tuples in some cases. - LIST_EXTEND: use for constructing lists with unpacking. - SET_UPDATE: use for constructing sets with unpacking. - CONTAINS_OP: check if `a in b` generally useful. When writing tests these op-codes where needed for basic operations and can be safely supported. Add note why dictionary manipulation op-codes have been left out. Also restrict namsepace access to anything with an underscore prefix since these may be undocumented. [0]: https://docs.python.org/3.10/library/dis.html
2022-07-11Fix (studio-reported) crash in ID remapping code on rare cases.Bastien Montagne
Some ID types did not have a filter value, even though they would be used in remapping code, leading to missing remappings. In that specific case, shape keys would actually never be properly remapped. Reproducible in r1230 of `Heist/pro/animation_test/einar/einar_new_expression_shapes2.blend`,
2022-07-11Fix (unreported) crash in liboverride code on rare cases.Bastien Montagne
When dealing with 'embedded' IDs (and the like, e.g. shape keys), liboverride code could fail in case the reference linked data (e.g. a mesh) would not have a shapekey anymore, while the override mesh would still have one. Found while investigating another issue in Heist production file `Heist/pro/animation_test/einar/einar_new_expression_shapes2.blend`, r1230.
2022-07-11GPU: add BUIDTIME to WITH_GPU_SHADER_BUILDERJeroen Bakker
Adds a better name that describes when it is used. The GPU_SHADER_BUILDER is a buildtime tool for developers to pre-validate GLSL (and in the overseen future pre-compile to SpirV). We don't see that this needs to become a required step in the future so WITH_GPU_BUILDTIME_SHADER_BUILDER is more descriptive name.
2022-07-11GPU: Do not allow GPU Shader builder when USD is enabled.Jeroen Bakker
Linking GPU shader builder requires stubs for many functions of the USD library. We don't want to rely on other modules to update the stubs for a tool that is only used by GPU developers. This patch raises an error when both WITH_GPU_SHADER_BUILDER and WITH_USD are enabled. This reduces the maintenance of updating the stubs when USD API changes. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D15422
2022-07-11Fix T99218: light group add button should be disabled when name is emptyBrecht Van Lommel
Previously it was inactive but still clickable. Ref D15316