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-04-14NLA: Keyframe Remap Through Upper StripsWayde Moss
Add a new operator, "Start Tweaking Strip Actions (Full Stack)", which allows you to insert keyframes and preserve the pose that you visually keyed while upper strips are evaluating, The old operator has been renamed from "Start Tweaking Strip Actions" to "Start Tweaking Strip Actions (Lower Stack)" and remains the default for the hotkey {key TAB}. **Limitations, Keyframe Remapping Failure Cases**: 1. For *transitions* above the tweaked strip, keyframe remapping will fail for channel values that are affected by the transition. A work around is to tweak the active strip without evaluating the upper NLA stack. It's not supported because it's non-trivial and I couldn't figure it out for all transition combinations of blend modes. In the future, it would be nice if transitions (and metas) supported nested tracks instead of using the left/right strips for the transitions. That would allow the transitioned strips to overlap in time. It would also allow N strips to be part of the (previously) left and right strips, or perhaps even N strips being transitioned in sequence (similar to a blend tree). Proper keyframe remapping through all that is currently beyond my mathematical ability. And even if I could figure it out, would it make sense to keyframe remap through a transition? //This case is reported to the user for failed keyframe insertions.// 2. Full replace upper strip that contains the keyed channels. //This case is reported to the user for failed keyframe insertions.// 3. When the same action clip occurs multiple times (colored Red to denote it's a linked strip) and vertically overlaps the tweaked strip, then the remapping will generally fail and is expected to fail. I don't plan on adding support for this case as it's also non-trivial and (hopefully) not a common or expected use case so it shouldn't be much of an issue to lack support here. For anyone curious on the cases that would work, it works when the linked strips aren't time-aligned and when we can insert a keyframe into the tweaked strip without modifying the current frame output of the other linked strips. Having all frames sampled and the strip non-time aligned leads to a working case. But if all key handles are AUTO, then it's likely to fail. //This case is not reported to the user for failed keyframe insertions.// 4. When using Quaternions and a small strip influence on the tweaked Combine strip. This was an existing failure case before this patch too but worth a mention in case it causes confusion. D10504 has an example file with instructions. //This case is not reported to the user for failed keyframe insertions. // 5. When an upper Replace strip with high influence and animator keys to Quaternion Combine (Replace is fine). This case is similar to (4) where Quaternion 180 degree rotation limitations prevent a solution. //This case is not reported to the user for failed keyframe insertions.// Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D10504
2022-04-14Animation: Select markers before/after current frameColin Basnett
Add operator to select markers left/right of the current frame (including the current frame). `bpy.ops.marker.select_leftright(mode='LEFT', extend=False)` `mode` can be either 'LEFT' or 'RIGHT'. The naming and defaults of the above variables match similar operators (e.g., `bpy.ops.nla.select_leftright`) This also adds a new sub-menu to the Marker menu found in animation editors, exposing both the new `bpy.ops.marker.select_leftright` operator as well as the `bpy.ops.marker.select_all` operator. Despite the name "Before Current Frame" and "After Current Frame", it also selects a marker that falls on the current from for both of the modes. This is to match the behavior found in the `nla.select_leftright` operator. RCS: https://blender.community/c/rightclickselect/OgmG/ Reviewed by: sybren, looch Differential Revision: https://developer.blender.org/D14176
2022-04-14View 3D: disable object mode selection cycling on first-clickCampbell Barton
Unlike regular selection cycling that is activated when clicking again in the same location, object mode would cycle to another object if the object that was selected happened to already be active. This made it impossible to click-drag to tweak the active object if there were other objects behind it as those would be activated first. Resolves T96752.
2022-04-14Cleanup: Further hair to curves renamingHans Goudey
These were missed in previous passes. Also remove some logic in `draw_hair.c` that was redundant after f31c3f8114616bb8964c8e7.
2022-04-14Keymap: restore key-shortcut to remove from local-viewCampbell Barton
Use Alt-Slash to remove objects from local-view (was M prior to [0]), following the convention of using Alt to perform the reverse of an action. Also remove the confirmation menu as this key as it can be undone and it's not likely to be pressed by accident. This can be useful to quickly subtract items from a complex selection with items that only become visible when entering local-view. The M key was originally used in 2.4x since moving between layers wasn't possible. Now moving between collections is possible in local-view the keys collided. [0]: cf5d582b77fbb7bf392a94248228846bfb774a15
2022-04-14Cleanup: Clang tidyHans Goudey
2022-04-13Rename Color Attributes domain from "Point" to "Vertex"Joseph Eagar
Addresses T97257, to make it consistent with regular attributes tab Review by: Julian Kaspar Differential Revision: https://developer.blender.org/D14631 Ref D14631
2022-04-13Fix some usages of 'GPU_shader_get_uniform_block'Germano Cavalcante
`GPU_shader_get_uniform_block` is marked as deprecated and the value returned does not match what `GPU_uniformbuf_bind` expects. Also, small typo fix in python error message. Differential Revision: https://developer.blender.org/D14638
2022-04-13Cleanup: Update icons_geom CMakeLists.txtDalai Felinto
2022-04-13Cleanup: Split paint_canvas into BKE and ED.Jeroen Bakker
The BKE part is needed for the 3d texture paiting brush to be part of blender kernel.
2022-04-13Fix T97207: Move to Collections Menu Grayed out when in Local ViewDalai Felinto
This behaviour was introduced in a687d98e6782 to bring the old obscure "M" operator to remove objects from the local view. In order to avoid the keymap clash with the Move to Collection operator, the Move to Collection was artificially restricted to work in local view. In retrospect, the "Remove from Local View" operator is in the menu anyways, so it didn't even need to have a shortcut (back in 2.79 the operator was not in a menu). The changes introduced here are: * No shortcut for "Remove from Local View" * No more restrictions to "Move/Link to Collection" from local view. Thanks for Philipp Oeser for digging the old commit that introduced this and for the rationale on the changes.
2022-04-13Cover some DNA files with C++ utility macrosSergey Sharybin
Solves compilation warning with Clang, and moves manipulation with DNA structures to the designed way for C++. The tests and few other places are update to the new code by Jacques. Ref T96847 Maniphest Tasks: T96847 Differential Revision: https://developer.blender.org/D14625
2022-04-13Curves: remove Test1 brushJacques Lucke
This was one of multiple placeholder brushes to simplify development. Having it is not necessary anymore. It was a brush that could add new curves according to a specific density. This functionality will be brought back as a new brush later. Ref T97255.
2022-04-13Fix T97152: Selection tools do nothing in particle hair editCampbell Barton
Regression in [0] which caused canceled PRESS events not to generate CLICK_DRAG. Resolve by checking for an active brush tool in poll instead of the PARTICLE_OT_brush_edit invoke function. [0]: 4d0f846b936c9101ecb76a6db962aac2d74a460a,
2022-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-13Cleanup: clang-formatCampbell Barton
2022-04-13Cleanup: avoid redundant float/int conversions in BLFCampbell Barton
Internally many offsets for BLF were integers but exposed as floats, since these are used in pixel-space, many callers were converging them back to integers. Simplify logic by using ints.
2022-04-13Cleanup: shadowed variable warningCampbell Barton
2022-04-12Fix (unreported) use-after-free case in Properties Editor ID remapping code.Bastien Montagne
Regression in rBa21bca0e20a051, found while investigating T97069.
2022-04-12Fix T95679: Outliner 'Unlink' directly on action misses DEG updatePhilipp Oeser
Animation would still play in the viewport. There are two ways to unlink an action from the Outliner: [1] `Unlink Action` on the Animation Data context menu. This does `outliner_do_data_operation` / `unlinkact_animdata_fn` and has the correct DEG update. [2] `Unlink` on the Action context menu This does `outliner_do_libdata_operation` / `unlink_action_fn` and was missing the DEG update. Now add the missing DEG update to the second case. Maniphest Tasks: T95679 Differential Revision: https://developer.blender.org/D14089
2022-04-12Fix Pushdown of an action from the Action Editor lacks immediate updatesPhilipp Oeser
The issue reported was that the recently introduced manual framerange of an action (see rB5d59b38605d6) was not having an immediate effect in case the action was pushed down from the Action Editor and only showed its effects after e.g. saving and reloading the file. However doing the same thing (pushing down the action) was working fine when done from the NLA. Now bring pushdown in sync (in terms of DEG update tagging) between the Action Editor and the NLA, meaning that now both the owner and the action are tagged when pushdown happens from the Action Editor as well. Fixes T96964. Maniphest Tasks: T96964 Differential Revision: https://developer.blender.org/D14564
2022-04-12Fix T97132: Create a color attribute automaticallyJoseph Eagar
for color filter tool instead of canceling.
2022-04-12Fix T97098: Color filter sharpening artifacts.Joseph Eagar
Color filter sharpening now clamps the output. The sharpening delta is now calculated from the difference of two levels of vertex averaging instead of one smooth iteration and the base color. TODO: Sharpen in a different color space; SRGB-linear has saturation artifacts. I tried HSL but it had value artifacts. I'd like to try LAB but we don't seem to have conversion functions for it (at least as far as I could see).
2022-04-12Cleanup: use _NUM suffix for space/region type rangesCampbell Barton
- Replace SPACE_TYPE_LAST with SPACE_TYPE_NUM (adding 1). - Rename RGN_TYPE_LEN to RGN_TYPE_NUM This makes it possible to tag space-type/region-type combinations with `bool tag[SPACE_TYPE_NUM][RGN_TYPE_NUM]` which reads more clearly than `bool tag[SPACE_TYPE_LAST + 1][RGN_TYPE_LEN]`.
2022-04-12Fix wrong key type for GSet in Grease Pencil same material selectionLukas Stockner
The type of the key was changed from string to integer in 66da2f537ae8, but the GSet was still being created for string keys. As long as the integers stay small enough, this even kind of works on little-endian systems, but of course it should use an integer hash instead.
2022-04-12Cleanup: clang-formatLukas Stockner
2022-04-12UI: Add support for showing socket descriptions in tooltipsLukas Stockner
Currently, hovering over a socket itself shows no tooltip at all, while hovering over its value field shows "Default value", which is not helpful. This patch therefore implements socket tooltips following the proposal at https://blender.community/c/rightclickselect/2Qgbbc/. A lot of the basic functionality was already implemented for Geometry Nodes, where hovering over the socket itself shows introspection info. This patch extends this by: - Supporting dynamic tooltips on labels, which is important for good tooltip coverage in a socket's region of the node. - Adding a function to setting a dynamic tooltip for an entire uiLayout, which avoids needing to set it manually for a wide variety of socket types. - Hiding the property label field in a tooltip when dynamic tooltip is also provided. If really needed, this label can be restored through the dynamic tooltip, but in all current cases the label is actually pointless anyways since the dynamic tooltip gives more accurate and specific information. - Adding dynamic tooltips to a socket's UI layout row if it has a description configured, both in the Node Editor as well as in the Material Properties. Note that the patch does not add any actual tooltip content yet, just the infrastructure to show them. By default, sockets without a description still show the old "Default value" tooltip. For an example of how to add socket descriptions, check the Cylinder node in the Geometry Nodes. Differential Revision: https://developer.blender.org/D9967
2022-04-11Fix T97097: Color Filter saturates colors that have no saturationJoseph Eagar
2022-04-11Fix T97096: Color filter brush was corrupting alpha.Joseph Eagar
2022-04-11Fix T85467: Mask transform center doesn't take parent Track into accountPhilipp Oeser
Coordinate checks in `spline_under_mouse_get` need to take place with the evaluated mask to get the right center. This is now more in line to how this is done in `ED_mask_point_find_nearest`. Note: similar issues are reported with box/circle/lasso selection in T97135, will tackle these separately though. Maniphest Tasks: T85467 Differential Revision: https://developer.blender.org/D14598
2022-04-11Curves Sculpting Icons: Snake Hook and Grow updatesDalai Felinto
This implements the icon for snake hook, as well as tweak the growth brush to make it bigger and with the triangles more distinct for better reading of the icon. Differential Revision: https://developer.blender.org/D14616
2022-04-11Fix setting key shortcuts for insert keyframe menu itemsCampbell Barton
It was not possible to assign a shortcut to menu items in the insert key-frame menu going back to version 2.7x. Doing so would replace the current key that opens the insert keyframe menu (I-key by default), instead of binding a key to insert a key-frame for the keying-set referenced by the menu item. Now each menu item can be bound to a key or added to the "Quick Favorites" menu, directly inserting a key-frame for the corresponding keying-set. Note that users must use the operator `anim.keyframe_insert_by_name` when setting up key-shortcuts as `anim.keyframe_insert` is only intended to launch the menu. Keymap Editor: When editing these key-map items in the key-map editor, the keying-set identifier must be used. At the moment the key-map editor doesn't support showing a drop-down list. The identifiers can be used from the tool-tip or the info editor. {F12994924} Details: Use `ANIM_OT_keyframe_insert_by_name` instead of `ANIM_OT_keyframe_insert_menu` for the insert keyframe popup menu to resolve the following issues binding keys to keying sets: - The index of the keying set isn't stable (adding/removing keying sets may change it). - Binding a key to items in the popup menu triggers a popup instead of inserting a key using the keying set from the menu item. While support for using the current operator could be improved, it will still only work for built-in keying sets, so I'd prefer to use an operator that is intended for key-bindings. Besides supporting binding keys to menu items there are no functional changes. Reviewed By: sybren Ref D14289
2022-04-11Cleanup: malformed C-style comment blocks, spellingCampbell Barton
- Missing star prefix. - Unnecessary indentation. - Blank line after dot-points (otherwise doxygen merges with the previous dot-point). - Use back-slash for doxygen commands. - Correct spelling.
2022-04-10Render: Add operators to add all used or remove all unused lightgroupsLukas Stockner
These operators build a list of all lightgroups that are used by the view layer's scene and either add all used lightgroups that are not part of the view layer yet or remove all lightgroups in the view layer that are not being used. Differential Revision: https://developer.blender.org/D14596
2022-04-10Fix T96942: disable Adjacent Faces margin for UVs and tangent space bakeMartijn Versteegh
Use the Extend method for these, as these do not work correctly. For UVs it's better to extend the UVs from the same face, and for tangent space the normals should be encoded in a matching tangent space. Later the Adjacent Faces method might be improved to support these cases. Ref T96977 Differential Revision: https://developer.blender.org/D14572
2022-04-10Cleanup: missing-prototypes warningCampbell Barton
2022-04-09Cleanup compilation warnings.Jeroen Bakker
Missing include statement.
2022-04-09Missing forward declaration.Jeroen Bakker
2022-04-09GPencil: Fix unreported error in Grab Brush for transformed layersAntonio Vazquez
If the layer was transformed the grab brush was not initialized as expected because it was using an untrasformed matrix.
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-09UDIM: Move UDIM grid controls to the Overlay panelJesse Yurkovich
This change moves the grid panel UI from the View tab up into the Overlay panel. Reasons to move to the Overlay panel include: - Consistency with the grid options in the 3D viewport - The grid has been drawn as an Overlay for quite some time already Additional changes that now make sense to have: - The grid responds to the main Overlay show/hide toggle - Adds a toggle to show/hide the grid which is consistent with overlays in general As before, these grid controls are only available for active UV edit sessions. Differential Revision: https://developer.blender.org/D11862
2022-04-08Add a utility for sampling segment indices and factors from arbitraryHans Goudey
lengths along a set of points. This can be used for the sample curves node, or finding new points along a curve when extending or shrinking it. This commit uses it in the snake hook brush as an example. The logic is similar to the uniform length sampling, but the next sample length is retrieved from the input instead of multiplication. For the sample node in the future, though this sort of sampling can be potentially done more efficiently for specific curve types besides poly curves, it's simpler, at least as a start, to work on a set of evaluated points that can be treated like a poly curve. Differential Revision: https://developer.blender.org/D14571
2022-04-08Painting: Canvas switcher for painting brushes/tools.Jeroen Bakker
This patch adds color attributes to TexPaintSlot. This allows an easier selection when painting color attributes. Previously when selecting a paint tool the user had to start a stroke, before the UI reflected the correct TexPaintSlot. Now when switching the slot the active tool is checked and immediate the UI is drawn correctly. In the future the canvas selector will also be used to select an image or image texture node to paint on. Basic implementation has already been done inside this patch. A limitation of this patch is that is isn't possible anymore to rename images directly from the selection panel. This is currently allowed in master. But as CustomDataLayers aren't ID fields and not owned by the material supporting this wouldn't be easy. {F12953989} In the future we should update the create slot operator to also include color attributes. Sources could also be extended to use other areas of the object that use image textures (particles, geom nodes, etc... ). Reviewed By: brecht Maniphest Tasks: T96709 Differential Revision: https://developer.blender.org/D14455
2022-04-08Fix lightgroup creation without a specified nameLukas Stockner
2022-04-08Cycles: Support adding Lightgroups from the object/world propertiesLukas Stockner
Currently, only Lightgroups that exist in the current view layer can be selected from object or world properties. The internal UI code already has support for search fields that accept unknown input, so I just added that to the API and use it for lightgroups. When a lightgroup is entered that does not exist in the current view layer (e.g. because it's completely new, because the view layer was switched or because it was deleted earlier), a new button next to it becomes active and adds it to the view layer when pressed. Differential Revision: https://developer.blender.org/D14540
2022-04-07Curves: improve Add menu for new curves objectJacques Lucke
The goal is to make the Add menu more convenient for the new curves object. The following changes are done: * Add `curves` submenu. * Add an `Empty Hair` operator that also sets the surface object. * Rename the old operator to `Random`. It's mostly for testing at this point. Differential Revision: https://developer.blender.org/D14556
2022-04-07Curves: operator to snap curves to surfaceJacques Lucke
This operator snaps the first point of every curve to the corresponding surface object. The shape of individual curves or their orientation is not changed. There are two different attachment modes: * `Nearest`: Move each curve so that the first point is on the closest point on the surface. This should be used when the topology of the surface mesh changed, but the shape generally stayed the same. * `Deform`: Use the existing attachment information that is stored for curves to move curves to their new location when the surface mesh was deformed. This generally does not work when the topology changed. The purpose of the operator is to help setup the "ground truth" for how curves are attached to the surface. When the ground truth surface changed, the original curves have to be updated as well. Deforming curves based on an animated surface will be done with geometry nodes independent of the operator. In the UI, the operator is currently exposed in curves sculpt mode in the `Curves > Snap Curves to Surface` menu. Differential Revision: https://developer.blender.org/D14515
2022-04-07Fix T96888: data transfer operator crash in certain situationPhilipp Oeser
The operator could crash in case the context "object" was overridden from python, but the "active_object" wasnt (and the active object was not a mesh). Reason for the crash is a mismatch in the operators poll function `data_transfer_poll` vs. `dt_layers_select_src_itemf` -- in the former, the overriden "object" was respected (and if this was a mesh, the poll was permissive), in the later it wasnt and only the "active_object" was used (if this was not a mesh, a crash would happen trying to get an evaluated mesh). Now rectify how the object which is used is being fetched -> use `ED_object_active_context` everywhere (see also rBe560bbe1d584). Maniphest Tasks: T96888 Differential Revision: https://developer.blender.org/D14552
2022-04-07Cleanup: pass the buffer length into `txt_insert_buf`Campbell Barton
Also remove redundant NULL check.
2022-04-07Cleanup: spelling in comments, minor reformatting changesCampbell Barton