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-06-06UI: offset scale gizmos instead of scaling their shapeCampbell Barton
Scaling handles while dragging could be distracting, especially at extreme values where handles could become large on-screen. Now all gizmos are shown while scaling. GIZMO_GT_arrow_3d now now support changing their length while being dragged as well as negative lengths.
2022-06-05UI: align gizmo scale handles to both Y and Z axesCampbell Barton
This resolves a minor inconsistency displaying the scale gizmo handles since they're cubes it's noticeable when they're not axes aligned.
2022-06-05UI: show gizmo while transformingCampbell Barton
When interacting with translate/rotate/scale gizmo, show the gizmo while it's in use. There are some exceptions to this, as showing all scale gizmos while scaling causes the gizmos to become large & distracting so in this case only the gizmo being dragged is shown. Resolves T63743.
2022-06-03Cleanup: remove gizmo transform workaround which is no longer neededCampbell Barton
Now gizmos forward the original event to transform so assuming an LMB event is no longer needed.
2022-06-02VSE: Make time operations self-containedRichard Antalik
This patch makes it possible to manipulate strips without need to use update functions to recalculate effect and meta strips. Prior to this change function `SEQ_time_update_sequence` had to be used to update mainly effects and meta strips. This was implemented in a way that relied on sorted list of strips, which can't always be done and in rare cases this approach failed. In case of meta strips, `seqbase` had to be passed and compared with "active" one to determine whether meta strip should be updated or not. This is especially weak system that is prone to bugs when functions are used by python API functions. Finally, other strip types had startdisp` and `enddisp` fields updated by this function and a lot of code relied on these fields even if strip start, length and offsets are available. This is completely unnecessary. Implemented changes: All effects and meta strips are updated when strip handles are moved or strip is translated, without need to call any update function. Function `SEQ_time_update_sequence` has been split to `SEQ_time_update_meta_strip_range` and `seq_time_update_effects_strip_range`. These functions should be only used within sequencer module code. Meta update is used for versioning, which is only reason for it not being declared internally. Sequence fields `startdisp` and `enddisp` are now only used for effects to store strip start and end points. These fields should be used only internally within sequencer module code. Use function `SEQ_time_*_handle_frame_get` to get strip start and end points. To update effects and meta strips with reasonable performance, cache for "parent" meta strip and attached effects is added to `SequenceLookup` cache, so it shares invalidation mechanisms. All caches are populated during single iteration. There should be no functional changes. Differential Revision: https://developer.blender.org/D14990
2022-05-30Cleanup: Clang tidyHans Goudey
Mostly duplicate includes, also use nullptr, and using default member initializers.
2022-05-29Merge branch 'blender-v3.2-release'Germano Cavalcante
2022-05-29Fix (unreported): cyclic snap of curve handlesGermano Cavalcante
The logic of skipping selected handles was inverted and confusing.
2022-05-24Fix T98141: Strip rotation is limited to +/360 degreesRichard Antalik
This limiting prevented visual keyframing from working correctly and is not consistent with object rotation, so limiting is removed.
2022-05-20Cleanup: warnings, spelling, formattingCampbell Barton
Avoid multiple `sound.bl_rna.properties["channels"].enum_items` in the same line. Note we might want a way to avoid having to do this.
2022-05-19Merge branch 'blender-v3.2-release'Germano Cavalcante
2022-05-19Fix T98230: Automatic Constraint doesn't work if cursor is not movingGermano Cavalcante
The change was kind of intentional on {rB21e72496a629}. That commit made mouse movement to "select" the contraint in Auto Constraint a requirement. This deduplicated the code a bit, but this requirement is not comfortable for the first "selection" of the contraint. So the constraint "selection" is now done in two ways: - If there is no contraint, the "selection" is done immediately; - If there is already a constraint, the "selection" is delayed by 1 event to simulate a constraint cancellation if there is no mouse movement.
2022-05-18Cleanup: Move strip handle manipulation to time sectionRichard Antalik
2022-05-13Merge branch 'blender-v3.2-release'Sergey Sharybin
2022-05-13Fix crash toggling marker translate with marker offsetSergey Sharybin
The shortcut is G-G. Caused by loop argument "shadowing".
2022-05-12Cleanup: Refactor marker area clampingSergey Sharybin
Switch from a single function with a lot of branching at its top level to dedicated function calls with own documentation.
2022-05-12Cleanup: Remove redundant marker clamping code pathSergey Sharybin
Pattern is expected to be freely resized to any size, and the search area s to become bigger when needed. Remove confusing pattern size clamping which was actually clamping search area. There should be no functional changes.
2022-05-12Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-12Fix T96367: Crash snapping to instances on an objectCampbell Barton
In rare cases the mesh has not been evaluated when snapping, this fix just prevents the crash as is done elsewhere in Blender when the evaluated mesh isn't available, there is a separate report (T96536) about evaluation not working properly.
2022-05-11Fix cursor snap not acting on selected UVsGermano Cavalcante
Regression in rBd2271cf939.
2022-05-10Fix T50398: Constrain to Image Bounds failed with 2D cursor pivotChris Blackbourn
Use more robust logic for "Constrain to Image Bounds" when scaling UVs. Reviewed By: campbellbarton Ref D14882
2022-05-06Cleanup: spelling in comments, use doxygen commentsCampbell Barton
2022-05-04Transform: use a threshold for UV snappingGermano Cavalcante
Unlike 3Dview snapping, UV snapping is always done to the UV closest to the mouse cursor, no matter the distance. From the user's point of view, this appears to be an inconsistency (See {T93538}). Therefore, set a minimum distance for snapping and, as in 3D View and highlight the snap with a drawing of a circle. Release Note: https://wiki.blender.org/wiki/Reference/Release_Notes/3.3/Modeling Reviewed By: #uv_editing, campbellbarton Maniphest Tasks: T93538 Differential Revision: https://developer.blender.org/D13873
2022-05-03Fix T95752: crash 'Select Linked' after loopcut in multiobject editmodePhilipp Oeser
This was reported explicitly for originally being in face selectmode, but could also crash when in vertex selectmode (when doing multiple cuts). The reason here is that `MESH_OT_loopcut` switches to edge select mode (needed for `TRANSFORM_OT_edge_slide`, done in `ringsel_finish`), but was only doing this on the active object's editmesh, all other participating meshes would keep their selectmode which would now be out of sync with both the active object's editmesh and scene settings for these. This causes problems later in 'Select Linked'. Here, a mixture of objects are used. First the viewcontext is set up with the active object, then all participating objects are iterated (changing the viewcontext to another object), then `unified_findnearest` would use that changed viewcontext which would now contain the last object iterated. To repeat: this could now have a different selectmode than the active object which is later **again** used to get the nearest `BMElem` from in `EDBM_elem_from_selectmode`. So in the failing case, we could get an edge (but no face because of edge selectmode) from `unified_findnearest`, `EDBM_elem_from_selectmode` would return NULL though (edge provided, but in face selectmode), leading to the crash. To solve this I assume it is best to change selectmode on all participating meshes in multi-object editmode loopcut if necessary so these are always in sync for following operations. Alternatively, `Select Linked` (and probably lots more operators) would have to be tweaked to pay closer attention which object is really used to get selectmode from. Note the selectmode is actually set back from edge selectmode in certain cases (see `USE_LOOPSLIDE_HACK`), this patch changes that as well to act on all participating meshes. Maniphest Tasks: T95752 Differential Revision: https://developer.blender.org/D14791
2022-04-28Fix: Incorrect conversion from C bitfield syntaxHans Goudey
Recent cleanups 9a8669ac81b99b2 and 1c790555a02bfc3 incorrectly interpereted the bitfield width syntax as a default value. Also resolve two other compilation warnings.
2022-04-28VSE: Add option to limit timeline view heightRichard Antalik
When height is limited, it is defined by space occupied by strips, but at least channels 1 to 7 will be always visible. This allows it to easily overview timeline content by zooming out to maximum extent in Y axis and panning in X axis. More channels can be "created" on demand by moving strip to higher channel. When strip is removed and highest channel becomes empty, view will stay as is until it is moved down. Then new highest point is remembered and it is not possible to pan upwards until strip is moved to higher channel. Limiting takes into account height of scrubbing and markers area as well as scrollers. This means that when zoomed out to maximum extent, no strips are obstructed by fixed UI element. Fixes T57976 Reviewed By: Severin Differential Revision: https://developer.blender.org/D14263
2022-04-28VSE: Add precise drag and drop and strip previewsSebastian Parborg
This patch adds the drag and drop strip previews in the VSE. It also adds two new functions to the drag and drop API. 1. "draw_in_view" for callbacks that wants to draw elements in local viewport coordinates 2. "on_drag_start" that can be used for prefetching data only once at the start of the drag. Reviewed By: Julian, Campbell Differential Revision: http://developer.blender.org/D14560
2022-04-27Cleanup: Use bool, remove unnecessary struct keywordsHans Goudey
2022-04-27Snap: Use Map and unique_ptr for snap cacheHans Goudey
Use C++ types instead of GHash to make code easier to read and simpler. Differential Revision: https://developer.blender.org/D14758
2022-04-26Cleanup: unused return value warningCampbell Barton
2022-04-25Transform Snap Refactor: dedicate ghash to different SnapData typesGermano Cavalcante
Changes: - Remove `BLI_memarena` (Use `MEM_cnew` and `MEM_delete` to allocate cached data) - Implement `snap_object_data_mesh_free_ensure` and `snap_object_data_editmesh_free_ensure` and skip need to get original key Object for editmesh data - Use `BMEditMesh` as key for editmesh `Ghash` - Make a better distinction between `SnapObjectData`s. (`SnapData_Mesh` and `SnapData_EditMesh`)
2022-04-25Cleanup: Turn some 'eTFlag' into macrosGermano Cavalcante
Some of the enum values are a mixture of others and make it difficult for the IDE to identify them. Separating these values makes debugging easier.
2022-04-25Fix T97401: Snap options ignored for Nurbs surfacesGermano Cavalcante
The editing data of a `SURF`s is similar to that of Curves and should be supported for snapping. But unlike Curve objects, for snapping, only support the nurb points if the object is in edit mode. This matches the solution for Meshes and avoids having to create a kind of "boundbox" for the SURF nurb points.
2022-04-22Cleanup: spelling in commentsCampbell Barton
2022-04-21Fix T97490: snap to multiple objects with linked data can crashGermano Cavalcante
The problem is old. rB52be06301257 (fixed by rB4b35d6950d4f) just masked it. `Object->data`, on evaluated objects, is not a safe pointer to get objects with the same `BMEditData`. Use `Object->runtime.data_orig` instead.
2022-04-21Cleanup: VSE effect relationship checkingRichard Antalik
Use `SEQ_relation_is_effect_of_strip` for checking effect-input relationship where this is applicable.
2022-04-21VSE: Add frame selected operator for previewok what
This operator moves the view to show the selected visible strips. Reviewed By: ISS Differential Revision: https://developer.blender.org/D14222
2022-04-19Cleanup: Use correct capitalization of "F-Curve"Aaron Carlisle
2022-04-19Fix call of 'BLI_assert' instead 'BLI_assert_msg'Germano Cavalcante
Error in 5da02548e99ac67338cbdf2a5088261408f5e7bf
2022-04-19Cleanup: remove redundant 'DEG_get_original_object' callGermano Cavalcante
The `BMEditMesh` pointer is the same in the original or evaluated mesh. Also a clang-format was missed.
2022-04-19Transform: small optimization in snap to edit meshGermano Cavalcante
In some cases, selected elements do not contribute to snapping. So ignore these elements when creating the edit meshes bound box.
2022-04-19Fix assert on meshes without mloop in snap codeGermano Cavalcante
Meshes without loops are still valid for snapping.
2022-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-10Cleanup: missing-prototypes warningCampbell Barton
2022-04-09Fix T95276: Effect strip animation not updated when moving stripsRichard Antalik
Since effect strips can't be transformed directly, their selection had to be forced in order to process them. This often failed in more complicated scenarios, because there was no attempt to parse hierarchy completely. In worst case only one effect in chain would be selected. This code was marked by `XXX_DURIAN_ANIM_TX_HACK`. Instead solution described above, a collection of strips that depend on non effect strip position is built by function `query_time_dependent_strips_strips` and it is stored in `TransSeq`. In `flushTransSeq` this collection is iterated and transformation offset is applied to effect strip animation. Strips in collection should be consistent with true state of dependency and should be complete. Functional changes: - When 2-input effect strip changes position, animation is offset even if only handles are moved. This only applies to 2-input effect however. - Selection is not extended to include effect strips anymore. If effects are to be moved, they must be selected manually. This is because previously it was very hard to reorganize effects in chain, since moving first strip in chain would always select anywhere from 1 to n effects. So creating or filling gap in channel would almos always result in collision especially if their order in timeline doesn't perfectly represent their order in chain.
2022-04-06Cleanup: remove workaround to set treedata membersGermano Cavalcante
This workaround is not needed since 228f7f1c850897cac85b2c4b42cf9052976b7be1
2022-04-06BVH Utils: remove 'isolate' parameterGermano Cavalcante
This is an internal usage parameter. No functional changes.
2022-04-06BVH Utils: Remove '_allocated' members from 'BVHTreeFromMesh'Germano Cavalcante
The parameters indicating whether it is allocated are always `false` and it is up to the caller to free them. Also clang-format was triggered.
2022-04-06Refactor: remove cache parameters from `bvhtree_from_` functionsGermano Cavalcante
The `BVHCacheType bvh_cache_type` parameter defines specific `BVHTrees` that cannot be customized. So it doesn't make sense to pass this value to any `*bvhtree_from_[...]_ex` function as the `BVHTrees` created in these cases are custom and cannot be saved in the cache. This also resulted in a nice cleanup in the code. Differential Revision: https://developer.blender.org/D14479
2022-04-06Fix: Pass const arguments to object snappingHans Goudey