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-01Fix T78553: Improve UV Straighten operator.temp-UV_straightenChris Blackbourn
Generalize the UV Straighten Operator to many more cases. Also, now splits by islands and prefers pins to mark the endpoints of the resulting line.
2022-07-01Cleanup(UV): Refactor UV StraightenChris Blackbourn
Move functionality into uvedit_line_update_get_flags. Prep for D15121
2022-07-01Cleanup: spelling in commentsCampbell Barton
2022-07-01Cleanup: remove unused argumentCampbell Barton
2022-07-01Fix: Correct attribute names in resample curves codeHans Goudey
2022-07-01Curves: Adjust "for each curve by type" utilityHans Goudey
The first change is reusing the same vector for all types. While we don't generally optimize for the multi-type case, it doesn't hurt here. The second change is avoiding calling the corresponding function if there are no curves of a certain type. This avoids creating attributes for types that aren't used, for example.
2022-07-01Cleanup: Add assert for customdata realloc sizeHans Goudey
This gives a more clear error than finding the error with the signed to unsigned conversion for size_t.
2022-07-01Cleanup: Add assert for unsupported legacy curve typeHans Goudey
2022-07-01Cleanup: Remove duplicate includeHans Goudey
2022-07-01Cleanup: Avoid assigning constructed VArray to referenceHans Goudey
This is clearer about what is actually happening (VArray is small enough to be a by-value type and is constructed on demand, while only the generic virtual array is stored).
2022-07-01Fix T99309: Duplicate elements deletes instance attributesHans Goudey
The node had incorrect handling of instance attributes. For the instance component, instead of using the instance domain over the point domain, it just looked through instances recursively when retrieving attributes. We never want to do that, since we only work on one geometry at a time. Instead, just switch out the instance domain for the point domain like the set position node.
2022-07-01COLLADA: Support for alpha color in vertex data.Gaia Clary
Many thanks to the original Author of this patch: Christian Aguilera The COLLADA importer was silently ignoring the alpha component in the vertex data. The `stride` variable holds the component count (3 for RGB; 4 for RGBA), and can be used for honouring the alpha channel in the vertex data. Test plan: - Open Blender. - Clear the scene. - Add a plane. - Enter **Vertex Paint** mode. - Switch to the **Erase Alpha** blending mode. - Select a tone of gray. - Turn strength down to less than 1 - Paint [some of] the vertices of the plane. - Export project as a COLLADA file (`.dae`). - Clear the scene. - Re-import the COLLADA file again. - Export the project again (with different name). **Without** this patch, the second exported project will have lost the alpha component in their vertex data: ```lang=xml, counterexample <float_array id="Plane-mesh-colors-Col-array" count="24">1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1</float_array> ``` **With** the patch, the first and the second exported projects retain the alpha values painted previously: ```lang=xml <float_array id="Plane-mesh-colors-Col-array" count="24">1 1 1 1 1 1 1 0.5490196 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.5490196</float_array> ``` Reviewed By: cristian64, SonnyCampbell_Unity Authored by: Christian Aguilera Differential Revision: https://developer.blender.org/D14246
2022-06-30EEVEE-Next: Add Film and RenderBuffers moduleClément Foucault
This modules handles renderpasses allocation and filling. Also handles blitting to viewport framebuffer and render result reading. Changes against the old implementation: - the filling of the renderpasses happens all at once requiring only 1 geometry pass. - The filtering is optimized with weights precomputed on CPU and reuse of neighboor pixels. - Only one accumulation buffer for renderpasses (no ping-pong). - Accumulation happens in one pass for every passes using a single dispatch or fullscreen triangle pass. TAA and history reprojection is not yet implemented. AOVs support is present but with a 16 AOV limit for now. Cryptomatte is not yet implemented.
2022-06-30Fix T90964: Strip can't be deleted if cursor is at bottom of timelineRichard Antalik
Caused by hard-coded width of markers region causing operator to pass through. Execute operator if there are no markers.
2022-06-30Fix build error with Alembic after 65166e145b4dJulian Eisel
2022-06-30Fix pointer to pointer passed where single pointer is expected (VSE versioning)Julian Eisel
2022-06-30Cleanup: Remove scene frame macros (`CFRA` et al.)Julian Eisel
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
2022-06-30Fix incorrect strip position if pitch was animatedRichard Antalik
Commit 302b04a5a3fc introduced new retiming system, that unified sound pitch animation with strip speed control. Because sound playback is handled in different way, this did not work as expected and old files were broken. In addition animation was not copied to new property. Revert length position and offset handling for sound strips so their position does not change and remap fcurves to new `speed_factor` property.
2022-06-30Fix T96429: outliner tooltip inconsistent with behavior when linking collectionsPatrick Huang
Previously, it would show "Link inside collection" but move between collections instead in some cases. Additionally there was no tooltip for the "Link before/ after/between collections" case. Behavior and tooltip should now be consistent in all cases. Differential Revision: https://developer.blender.org/D15237
2022-06-30Fix T99266: Crash when dragging file to VSE from file browserRichard Antalik
Crash happened because sequencer data was not initialized. Ensure data is initialized before adding strip.
2022-06-30Cleanup: colon after params, move text into public doc-strings, spellingCampbell Barton
2022-06-30GHOST: get/set cursor position now uses client instead of screen coordsCampbell Barton
Use client (window) relative coordinates for cursor position access, this only moves the conversion from window-manager into GHOST, (no functional changes). This is needed for fix a bug in GHOST/Wayland which doesn't support accessing absolute cursor coordinates & the window is needed to properly access the cursor coordinates. As it happens every caller to GHOST_GetCursorPosition was already making the values window-relative, so there is little benefit in attempting to workaround the problem on the Wayland side. If needed the screen-space versions of functions can be exposed again.
2022-06-30Cleanup: use "use_" prefix for boolean propertyCampbell Barton
2022-06-30Fix missing argument, avoid instancing function call in macroCampbell Barton
2022-06-30Fix T99133:animating multiply factor on video strips crashes blenderRichard Antalik
Crash caused by `effect_seq->len` being 0, so frame map was not built. Get length in timeline using handle positions.
2022-06-30Animation: Add GP layers in regular DopesheetAmélie Fondevilla
Grease Pencil animation channels are now also shown in the Dopesheet mode of the Dopesheet editor and in the Timeline. Grease pencil related events are now listened not only by container `SACTCONT_GPENCIL` (Grease Pencil Dopesheet), but also `SACTCONT_DOPESHEET` (main Dopesheet), and `SACTCONT_TIMELINE` (timeline). A new Animation Filter flag was added: `ANIMFILTER_FCURVESONLY`. For now this only filters out Grease Pencil Layer channels. **Implemented:** - Preview range set: now only considers selected Grease Pencil keyframes when `onlySel` parameter is true. Not only this allows the operator to work with grease pencil keyframes in main dopesheet, but it also fixes the operator in the Grease Pencil dopesheet. - Translation: allocation (and freeing) of specific memory for translation of Grease Pencil keyframes. - Copy/Paste: call to both Fcurve and GPencil operators, to allow for mixed selection. Errors are only reported when both the FCurve and GPencil functions fail to paste anything. - Keyframe Type change and Insert Keyframe: removed some code here to unify Grease Pencil dopesheet and main dopesheet code. - Jump, Snap, Mirror, Select all/box/lasso/circle, Select left/right, Clickselect: account for Grease Pencil channels within the channels loop, no need for `ANIMFILTER_FCURVESONLY` there. **Not Implemented:** - Graph-related operators. The filter `ANIMFILTER_FCURVESONLY` is naively added to all graph-related operators, meaning more-or-less all operators that used `ANIMFILTER_CURVE_VISIBLE`. - Select linked: is for F-curves channel only - Select more/less: not yet implemented for grease pencil layers. - Clean Keys, Sample, Extrapolation, Interpolation, Easing, and Handle type change: work on Fcurve-channels only, so the `ANIMFILTER_FCURVESONLY` filter is activated Graying out these operators (when no fcurve keyframe is selected) can be done with custom poll functions BUT may affect performance. This is NOT done in this patch. **Dopesheet Summary Selection:** The main summary of the dopesheet now also takes into account Grease Pencil keyframes, using some nasty copy/pasting of code, as explained [on devtalk](https://devtalk.blender.org/t/gpencil-layers-integration-in-main-dopesheet-selection-issue/24527). It works, but may be improved, providing some deeper changes. Reviewed By: mendio, pepeland, sybren Maniphest Tasks: T97477 Differential Revision: https://developer.blender.org/D15003
2022-06-30Curves: New tools for curves sculpt mode.Jacques Lucke
This commit contains various new features for curves sculpt mode that have been developed in parallel. * Selection: * Operator to select points/curves randomly. * Operator to select endpoints of curves. * Operator to grow/shrink an existing selection. * New Brushes: * Pinch: Moves points towards the brush center. * Smooth: Makes individual curves straight without changing the root or tip position. * Puff: Makes curves stand up, aligning them with the surface normal. * Density: Add or remove curves to achieve a certain density defined by a minimum distance value. * Slide: Move root points on the surface. Differential Revision: https://developer.blender.org/D15134
2022-06-30Normalize Weights: use valid default Subset for current contextNate Rupsis
For the Normalize Weights operator, dynamically set the default 'Subset' parameter so that it is applicable to the current context. When the user's last use of Normalize Weights was set to "Deform Pose Bones", and then tries to use the operator on a mesh without armature, Blender would try to use the previous opertor properties and show an error message. This is resolved by switching to `WT_VGROUP_ACTIVE` in such cases. Reviewed By: zanqdo, sybren Maniphest Tasks: T95038 Differential Revision: https://developer.blender.org/D14961
2022-06-30Constraints: rename and refactor custom space initialization.Alexander Gavrilov
Rename and simplify the function for initializing the custom space, avoiding the need for the calling code to be aware of the internals of bConstraintOb. This patch should not change any behavior. This was split off from D9732. Differential Revision: https://developer.blender.org/D15252
2022-06-30Fix numerical issues with plane track compositor node with empty inputSergey Sharybin
No changes in the interface, but avoids spam in the console about inability to find a solution for homography transform from singularity.
2022-06-30Fix (unreported) liboverride resync creating garbage data in some cases.Bastien Montagne
Regression caused by the introduction of partial resync in February 2022 (rB1695d38989fd482d3c). Code was missing adding some existing overrides to the mapping in some specific cases, causing resync to create 'new' ones instead of re-using existing ones. This commit also adds a basic resync testcase that illustrates this issue.
2022-06-30Revert "Revert "LibOverride: Handle dependencies in both directions in ↵Bastien Montagne
partial override cases."" This reverts commit rB31d80ddeaad, and fixes issue introduced in rBf0b4aa5d59e3 by not doing the 'reversed dependency check' in resync case. Rational here are: * Supporting reversed dependency in a reliable, coinsistent way in resync is likely to be a nightmare, if even possible at all. * Needs for such reversed dependency in resync should be close to 0% of cases, as long as users remain reasonable with their organization of their assets (it could only become a problem in extreme bad practice and corner cases, like a geometry object being added as a child of a rig in a completely new, otherwise un-overridden collection, in partial override context). This decision may need to be re-evaluated later in case we go more towards a very highly partial-override workflow, but even then I would expect current solution to work fine in all reasonable use cases.
2022-06-30Fix T99290: Wrong color management of plane track image previewSergey Sharybin
Always consider images as "View as Render" for the plane track image drawing.
2022-06-30Fix C++ STL importer unused function result warningIyad Ahmed
Fix unused function result warnings for usages of `fread` in the C++ .stl importer, by actually using the returned error code. Reviewed By: sybren Differential Revision: https://developer.blender.org/D15189
2022-06-30Fix T99196: sculpt_update_object calls paint updates for nonpaint toolsJoseph Eagar
Specifically BKE_texpaint_slots_refresh_object was being called, which causes cycles to reset at strange times (like moving the mouse cursor in pose, boundary and various other tools). This (along with some code that checks if the pbvh pixels need to be rebuilt) is only run if is_paint_mode (which used to be needs_colors) is true.
2022-06-30Sculpt: Fix a few bugs revealed by SCULPT_TOOL_NEEDS_COLOR name changeJoseph Eagar
* Color attributes are no longer auto-created when painting an image. * Workbench shading type is no longer automatically changed to Attribute for image paint.
2022-06-30Cleanup: Renamed SCULPT_TOOL_NEEDS_COLOR to SCULPT_tool_is_paintJoseph Eagar
Old name is confusing since SCULPT_TOOL_PAINT can paint on images too, and it's planned for smear to as well.
2022-06-30Fix T98886: PBVH_GRIDS ignores face smooth flag on first gpu buildJoseph Eagar
2022-06-30Cleanup: formatCampbell Barton
2022-06-30Cleanup: spelling in commentsCampbell Barton
2022-06-30Cleanup: quiet warning, remove punctuation in descriptionCampbell Barton
2022-06-30Transform Snap: nearest face snap mode, snapping options, refactoring.jon denning
This commit adds a new face nearest snapping mode, adds new snapping options, and (lightly) refactors code around snapping. The new face nearest snapping mode will snap transformed geometry to the nearest surface in world space. In contrast, the original face snapping mode uses projection (raycasting) to snap source to target geometry. Face snapping therefore only works with what is visible, while nearest face snapping can snap geometry to occluded parts of the scene. This new mode is critical for retopology work, where some of the target mesh might be occluded (ex: sliding an edge loop that wraps around the backside of target mesh). The nearest face snapping mode has two options: "Snap to Same Target" and "Face Nearest Steps". When the Snap to Same Object option is enabled, the selected source geometry will stay near the target that it is nearest before editing started, which prevents the source geometry from snapping to other targets. The Face Nearest Steps divides the overall transformation for each vertex into n smaller transformations, then applies those n transformations with surface snapping interlacing each step. This steps option handles transformations that cross U-shaped targets better. The new snapping options allow the artist to better control which target objects (objects to which the edited geometry is snapped) are considered when snapping. In particular, the only option for filtering target objects was a "Project onto Self", which allowed the currently edited mesh to be considered as a target. Now, the artist can choose any combination of the following to be considered as a target: the active object, any edited object that isn't active (see note below), any non- edited object. Additionally, the artist has another snapping option to exclude objects that are not selectable as potential targets. The Snapping Options dropdown has been lightly reorganized to allow for the additional options. Included in this patch: - Snap target selection is more controllable for artist with additional snapping options. - Renamed a few of the snap-related functions to better reflect what they actually do now. For example, `applySnapping` implies that this handles the snapping, while `applyProject` implies something entirely different is done there. However, better names would be `applySnappingAsGroup` and `applySnappingIndividual`, respectively, where `applySnappingIndividual` previously only does Face snapping. - Added an initial coordinate parameter to snapping functions so that the nearest target before transforming can be determined(for "Snap to Same Object"), and so the transformation can be broken into smaller steps (for "Face Nearest Steps"). - Separated the BVH Tree getter code from mesh/edit mesh to its own function to reduce code duplication. - Added icon for nearest face snapping. - The original "Project onto Self" was actually not correct! This option should be called "Project onto Active" instead, but that only matters when editing multiple meshes at the same time. This patch makes this change in the UI. Reviewed By: Campbell Barton, Germano Cavalcante Differential Revision: https://developer.blender.org/D14591
2022-06-29Geometry Nodes: Only calculate mesh to volume bounds when necessaryHans Goudey
In "size" voxel resolution mode, calculating the bounds of the mesh to volume node's input mesh isn't necessary. For high poly this can take a few milliseconds, so this commit skips the calculation unless we need it for the "Amount" mode. Differential Revision: https://developer.blender.org/D15324
2022-06-29Geometry Nodes: UV Unwrap and Pack Islands NodesAleksi Juvani
This commit adds new Unwrap and Pack Islands nodes, with equivalent functionality to the existing Unwrap and Pack Islands operators. The Unwrap node uses generic boolean attributes to determine seams instead of looking at the seam flags in the mesh geometry. Unlike the Unwrap operator, the Unwrap node doesn't perform aspect ratio correction, because this is trivial for the user to implement with a Vector Math node if it is desired. The Unwrap node implicitly performs a Pack Islands operation upon completion, because the results may not be generally useful otherwise. This matches the behaviour of the Unwrap operator. The nodes use the existing Vector socket type, and do not introduce a new 2D Vector type (see T92765). Differential Revision: https://developer.blender.org/D14389
2022-06-29Attributes: Use attribute renaming function for generic mesh layersMartijn Versteegh
The RNA API in rna_mesh.c has a function to rename generic customdata layers. However for customdata layers which are attributes (i.e. not specialized types) the attribute renaming function needs to be used, as that can ensure unique names across domains. Differential Revision: https://developer.blender.org/D15310
2022-06-29Cleanup: Clang tidy, unused variable warningHans Goudey
2022-06-29Geometry Nodes: Add Mesh To Volume NodeErik Abrahamsson
This adds a Mesh To Volume Node T86838 based on the existing modifier. The mesh to volume conversion is implemented in the geometry module, and shared between the node and the modifier. Currently the node outputs a grid with the name "density". This may change in the future depending on the decisions made in T91668. The original patch was by Kris (@Metricity), further implementation by Geramy Loveless (@GeramyLoveless), then finished by Erik Abrahamsson (@erik85). Differential Revision: https://developer.blender.org/D10895
2022-06-29Spreadsheet: display byte colors as scene linear floatsBrecht Van Lommel
The compression as sRGB is mostly an implementation detail and showing the integers does not make it clear what the actual values are that will be used for computations in geometry nodes. This follows the general convention that colors in Blender are displayed and edited in scene linear floats. The raw sRGB bytes can still be viewed as a tooltip. Ref T99205 Differential Revision: https://developer.blender.org/D15322
2022-06-29LineArt: Shadow and related functionalities.Yiming Wu
This patch includes the full shadow functionality for LineArt: - Light contour and cast shadow lines. - Lit/shaded region selection. - Enclosed light/shadow shape calculation. - Silhouette/anti-silhouette selection. - Intersection priority based on shadow edge identifier. Reviewed By: Sebastian Parborg (zeddb) Differential Revision: https://developer.blender.org/D15109
2022-06-29UI: add tooltips for nodes to the shader node add menuArye Ramaty
These are based on the descriptions from the manual, with various changes. Differential Revision: https://developer.blender.org/D15309