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-21Fix T97497: NLA strip names are now properly contained within the strip boundsColin Basnett
Very easy fix, the bug seemed to be a result of a typo on the right-most margin. Old: {F13013777} New: {F13013782} Maniphest Tasks: T97497 Differential Revision: https://developer.blender.org/D14711
2022-04-21Fix T97465: Moving compositor BG image cannot be cancelledPhilipp Oeser
This was possible with the gizmo, but no using the operator (e.g. from the sidebar). Now store original offsets and reset to these on calcel (ESC or RMB). Maniphest Tasks: T97465 Differential Revision: https://developer.blender.org/D14704
2022-04-21Fix T95932: Auto-close text breaks outliner drag-n-dropCampbell Barton
Text inserted via TEXT_OT_insert would always have auto-close logic applies which interfered any insertion of literal strings containing brackets. Now auto-closing brackets is restricted to characters read from events from the operators invoke functions.
2022-04-21Cleanup: clang formatJacques Lucke
2022-04-21Cleanup: fix various warnings after recent commitJacques Lucke
2022-04-21Vertex paint: Fix debug compile error and aJoseph Eagar
few warnings.
2022-04-21Fix T97469: Sculpt colors crash in multiresolution or dynamic topology modes.Joseph Eagar
Sculpt paint tools now pop up an error message if dynamic topology or multires are enabled. Implementation notes: * SCULPT_vertex_colors_poll is now a static function in sculpt_ops.c. It is now used solely by the legacy color attribute conversion operators (SCULPT_OT_vertex_to_loop_colors and SCULPT_OT_loop_to_vertex_colors) and should be deleted when they are. * There is a new method, SCULPT_handles_colors_report, that returns true if the sculpt session can handle color attributes; otherwise it returns false and displays an error message to the user.
2022-04-21Commit D14179: Revamp Vertex Paint With C++Joseph Eagar
- Verrtex paint mode has been refactored into C++ templates. It now works with both byte and float colors and point & corner attribute domains. - There is a new API for mixing colors (also based on C++ templates). Unlike the existing APIs byte and float colors are interpolated identically. Interpolation does happen in a squared rgb space, this may be changed in the future. - Vertex paint now uses the sculpt undo system. Reviewed By: Brecht Van Lommel. Differential Revision: https://developer.blender.org/D14179 Ref D14179
2022-04-21Text Editor: add Python 3.10 soft keywords to `builtinfunc` listJon Denning
Python 3.10 has added "soft keywords" [0] to their list of identifiers. This patch adds these soft keywords to the list of builtin functions that the text editor searches for when highlighting Python code. The only soft keywords that Python 3.10 current has are: `match`, `case`, and `_`, but more will likely be added in future versions. Currently, the `_` soft keyword is ignored from highlighting. It is a wildcard matching pattern when used with `case` (similar to `default` for `switch`es in C/C++), but `_` is far more often used in other contexts where highlighting the `_` might seem strange. For example, ignoring elements when unpacking tuples (`_, g, _, a = color`). This patch also updates the commented Python code for creating the list of keywords, for convenience. Before: {F13012878} After: {F13012880} Example from PEP-636 [1] Note: These soft keywords are only reserved under specific contexts. However, in order for the text editor to know when the keywords are used in the appropriate contexts, the text editor would need a full-blown Python grammar [2] parser. So, for now, these keywords are simply added in along with the other keywords in order to highlight them in the text editor. [0]: https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords [1]: https://peps.python.org/pep-0636/#matching-specific-values [2]: https://docs.python.org/3/reference/grammar.html Ref D14707
2022-04-21Fix typo in previous commitRichard Antalik
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-20Cleanup: Rename CD_MLOOPCOL to CD_PROP_BYTE_COLORHans Goudey
The "PROP" in the name reflects its generic status, and removing "LOOP" makes sense because it is no longer associated with just mesh face corners. In general the goal is to remove extra semantic meaning from the custom data types.
2022-04-20PBVH: Pass Mesh to extract internals.Jeroen Bakker
More mesh data is required when extracting the UV seams. This is an API change for to support this future enhancement.
2022-04-20Cleanup: spelling in commentsCampbell Barton
2022-04-20UI: Fix typo in Apply Parent Inverse tooltipNate Rupsis
There's a small typo in the tool tip for applying the Parent Inverse. This patch fixes that typo old: {F13010751} new: {F13010749} Reviewed By: Blendify Maniphest Tasks: T97437 Differential Revision: https://developer.blender.org/D14693
2022-04-20Mesh: Avoid unnecessary normal calculation and dirty tagsHans Goudey
This is mostly a cleanup to avoid hardcoding the eager calculation of normals it isn't necessary, by reducing calls to `BKE_mesh_calc_normals` and by removing calls to `BKE_mesh_normals_tag_dirty` when the mesh is newly created and already has dirty normals anyway. This reduces boilerplate code and makes the "dirty by default" state more clear. Any regressions from this commit should be easy to fix, though the lazy calculation is solid enough that none are expected.
2022-04-19Fix: Assert when sculpting empty curvesHans Goudey
2022-04-19Fix: Uninitialized paint brush when using byte textures.Jeroen Bakker
This is a fix for the 3d texturing brush.
2022-04-19Refactor: Move mesh face dot tag out of MVertHans Goudey
Continuing the refactors described in T93602, this commit moves the face dot tag set by the subdivision surface modifier out of `MVert` to `MeshRuntime`. This clarifies its status as runtime data and allows further refactoring of mesh positions in the future. Before, `BKE_modifiers_uses_subsurf_facedots` was used to check whether subsurf face dots should be drawn, but now we can just check if the tags exist on the mesh. Modifiers that create new new geometry or modify topology will already remove the array by clearing mesh runtime data. Differential Revision: https://developer.blender.org/D14680
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-18Fix T97002: Preserve multi socket link orderLeon Schittek
Preserve multi socket link order when copying nodes or adding a new group input sockets by linking directly to multi inputs from the group input node's extension socket. This is done by also copying the `multi_input_socket_index` when the new links are created by copying existing or temporary links. Reviewed By: Hans Goudey Differential Revision: http://developer.blender.org/D14535
2022-04-18Cleanup: Move object_modifier.c to C++Hans Goudey
This allows using C++ only APIs/data structures, and potentially simplifies adding support to apply modifiers for the Curves object.
2022-04-18Cleanup: Clang tidyHans Goudey
- Inconsistent parameter names - Else after return - Braces around statements - Qualified auto - Also (not clang tidy): Pass StringRef by value, unused parameter
2022-04-18Fix T94559: Copying geometry node group does not copy animation dataAngus Stanton
Reimplement copy geometry node groups in C. The version implemented in Python could also manually copy the animation data, but it's more standard to do this with `BKE_id_copy_ex` and `LIB_ID_COPY_ACTIONS`. Differential Revision: https://developer.blender.org/D14615
2022-04-18Minor tweaks to labels/tooltips of override operation in the Outliner.Bastien Montagne
2022-04-17OBJ: further optimize, cleanup and harden the new C++ importerAras Pranckevicius
Continued improvements to the new C++ based OBJ importer. Performance: about 2x faster. - Rungholt.obj (several meshes, 263MB file): Windows 12.7s -> 5.9s, Mac 7.7s -> 3.1s. - Blender 3.0 splash (24k meshes, 2.4GB file): Windows 97.3s -> 53.6s, Mac 137.3s -> 80.0s. - "Windows" is VS2022, AMD Ryzen 5950X (32 threads), "Mac" is Xcode/clang 13, M1Max (10 threads). - Slightly reduced memory usage during import as well. The performance gains are a combination of several things: - Replacing `std::stof` / `std::stoi` with C++17 `from_chars`. - Stop reading input file char-by-char using `std::getline`, and instead read in 64kb chunks, and parse from there (taking care of possibly handling lines split mid-way due to chunk boundaries). - Removing abstractions for splitting a line by some char, - Avoid tiny memory allocations: instead of storing a vector of polygon corners in each face, store all the corners in one big array, and per-face only store indices "where do corners start, and how many". Likewise, don't store full string names of material/group names for each face; only store indices into overall material/group names arrays. - Stop always doing mesh validation, which is slow. Do it just like the Alembic importer does: only do validation if found some invalid faces during import, or if requested by the user via an import setting checkbox (which defaults to off). - Stop doing "collection sync" for each object being added; instead do the collection sync right after creating all the objects. Cleanup / Robustness: This reworking of parser (see "removing abstractions" point above) means that all the functions that were in `parser_string_utils` file are gone, and replaced with different set of functions. However they are not OBJ specific, so as pointed out during review of the previous differential, they are now in `source/blender/io/common` library. Added gtest coverage for said functions as well; something that was only indirectly covered by obj tests previously. Rework of some bits of parsing made the parser actually better able to deal with invalid syntax. E.g. previously, if a face corner were a `/123` string, it would have incorrectly treated that as a vertex index (since it would get "hey that's one number" after splitting a string by a slash), instead of properly marking it as invalid syntax. Added gtest coverage for .mtl parsing; something that was not covered by any tests at all previously. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14586
2022-04-16Mask by color now auto-creates aJoseph Eagar
color attribute if one does not exist, and no longer passes through to the translate tool on tweak grab.
2022-04-15UI: Improve wording for some USD export descriptionsHans Goudey
The HIG mentions that redundant words like "Enables" or "Activates" shouldn't be used for tooltips of boolean properties. In this case "When checked" was the redundant language that was implied by the checkbox itself-- convention is to just state what the property does when it's on. Also change a few conjugations to the imperative and simplify wording slightly, in order to be more consistent with language elsewhere in Blender, and to be a bit more direct. Differential Revision: https://developer.blender.org/D14644
2022-04-15Fix: Missing Null CheckWayde Moss
Introduced by my recent commit: {rB3acbe2d1e933} Lead to crash when insert_keyframe_direct() was called. Keyframing crashed for NLA special properties (influence, animated_time), driven properties, etc.
2022-04-15Cleanup: Clang tidyHans Goudey
2022-04-15PBVH Pixel extractor.Jeroen Bakker
This patch contains an initial pixel extractor for PBVH and an initial paint brush implementation. PBVH is an accelleration structure blender uses internally to speed up 3d painting operations. At this moment it is extensively used by sculpt, vertex painting and weight painting. For the 3d texturing brush we will be using the PBVH for texture painting. Currently PBVH is organized to work on geometry (vertices, polygons and triangles). For texture painting this should be extended it to use pixels. {F12995467} Screen recording has been done on a Mac Mini with a 6 core 3.3 GHZ Intel processor. # Scope This patch only contains an extending uv seams to fix uv seams. This is not actually we want, but was easy to add to make the brush usable. Pixels are places in the PBVH_Leaf nodes. We want to introduce a special node for pixels, but that will be done in a separate patch to keep the code review small. This reduces the painting performance when using low and medium poly assets. In workbench textures aren't forced to be shown. For now use Material/Rendered view. # Rasterization process The rasterization process will generate the pixel information for a leaf node. In the future those leaf nodes will be split up into multiple leaf nodes to increase the performance when there isn't enough geometry. For this patch this was left out of scope. In order to do so every polygon should be uniquely assigned to a leaf node. For each leaf node for each polygon If polygon not assigned assign polygon to node. Polygons are to complicated to be used directly we have to split the polygons into triangles. For each leaf node for each polygon extract triangles from polygon. The list of triangles can be stored inside the leaf node. The list of polygons aren't needed anymore. Each triangle has: poly_index. vert_indices delta barycentric coordinate between x steps. Each triangle is rasterized in rows. Sequential pixels (in uv space) are stored in a single structure. image position barycentric coordinate of the first pixel number of pixels triangle index inside the leaf node. During the performed experiments we used a fairly simple rasterization process by finding the UV bounds of an triangle and calculate the barycentric coordinates per pixel inside the bounds. Even for complex models and huge images this process is normally finished within 0.5 second. It could be that we want to change this algorithm to reduce hickups when nodes are initialized during a stroke. Reviewed By: brecht Maniphest Tasks: T96710 Differential Revision: https://developer.blender.org/D14504
2022-04-15Curves: initial geometry nodes support for curves objectsJacques Lucke
* Curves objects now support the geometry nodes modifier. * It's possible to use the curves object with the Object Info node. * The spreadsheet shows the curve data. The main thing holding this back currently is that the drawing code for the curves object is very incomplete. E.g. it resamples the curves always in the end, which is not expected for curves in general. Differential Revision: https://developer.blender.org/D14277
2022-04-15Object: Set Parent (Keep Transform Without Inverse)Wayde Moss
**Relevant to Artists:** This patch adds an option to the Parenting menu, `Object (Keep Transform Without Inverse)`, and Apply menu, `Parent Inverse`. The operators preserve the child's world transform without using the parent inverse matrix. Effectively, we set the child's origin to the parent. When the child has an identity local transform, then the child is world-space aligned with its parent (scale excluded). **Technical:** In both cases, the hidden parent inverse matrix is generally set to identity (cleared or "not used") as long as the parent has no shear. If the parent has shear, then this matrix will not be entirely cleared. It will contain shear to counter the parent's shear. This is required, otherwise the object's local matrix cannot be properly decomposed into location, rotation and scale, and thus cannot preserve the world transform. If the child's world transform has shear, then its world transform is not preserved. This is currently not supported for consistency in the handling of shear during the other parenting ops: Parent (Keep Transform), Clear [Parent] and Keep Transform. If it should work, then another patch should add the support for all of them. Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D14581
2022-04-14Fix T97135: Fix selection issues with parented masks in the MCEPhilipp Oeser
Box, Circle and Lasso select were not taking into account if a mask(point) was parented; selection was only succeeding in the original place. Now check coordinates from evaluated mask (points) instead while setting selection flags and DEG tagging still happens on the original ID. Maniphest Tasks: T97135 Differential Revision: https://developer.blender.org/D14651
2022-04-14Geometry Nodes: show used named attributes in nodesJacques Lucke
This adds a new node editor overlay that helps users to see where named attributes are used. This is important, because named attributes can have name collisions between independent node groups which can lead to hard to find issues. Differential Revision: https://developer.blender.org/D14618
2022-04-14Curves: fix some issues with operator to convert to particle systemJacques Lucke
Ref T97171. Differential Revision: https://developer.blender.org/D14637
2022-04-14Metal: GPU_PRIM_LINE_LOOP alternative implementations.Jason Fielder
Prefer using immVertex3f when 3D shaders are used for 2D rendering due to overhead of vertex padding in hardware. CPU overhead is negligible. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14494
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