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-04Cleanup: spelling in commentsCampbell Barton
2022-07-04Cleanup: Rename curve segment count functionHans Goudey
`curve_segment_num` -> `segments_num`. The "curve" prefix is reduntant for a function in the curve namespace.
2022-07-02Revert "Start of Bevel V2, as being worked on with task T98674."Howard Trickey
This reverts commit 9bb2afb55e50f9353cfc76cf2d8df7521b0b5feb. Oops, did not intend to commit this to master.
2022-07-02Start of Bevel V2, as being worked on with task T98674.Howard Trickey
This is the start of a geometry node to do edge, vertex, and face bevels. It doesn't yet do anything but analyze the "Vertex cap" around selected vertices for vertex bevel.
2022-07-02BLI: improve span access to virtual arraysJacques Lucke
* Make the class names more consistent. * Implement missing move-constructors and assignment-operators.
2022-07-02BKE: fix wrong recently added assertJacques Lucke
2022-07-01Tracking: Image from Plane Marker operatorsSergey Sharybin
There are two operators added, which are available via a special content menu next to the plane track image selector: - New Image from Plane Marker - Update Image from Plane Marker The former one creates an image from pixels which the active plane track marker "sees" at the current frame and sets it as the plane track's image. The latter one instead of creating the new image data-block updates the image in-place. This allows to create unwarped texture from a billboard from footage. The intent is to allow this image to be touched up and re-projected back to the footage with an updated content. Available from a plane track image context menu, as well as from the Track menu. {F13243219} The demo of the feature from Sebastian Koenig: https://www.youtube.com/watch?v=PDphO-w2SsA Differential Revision: https://developer.blender.org/D15312
2022-07-01Add helper function to replace buffer of a single-frame imageSergey Sharybin
Very similar to BKE_image_add_from_imbuf with the exception that no new image data-block is created, but instead the given one is modified.
2022-07-01Fix possible wrong image color space when it is created from image bufferSergey Sharybin
From quick look it doesn't seem to be leading to real issues yet as the image buffers are created with the default roles, but valid color space is needed to be ensured for an upcoming development.
2022-07-01Fix image-from-imbuf resulting in invalid image configurationSergey Sharybin
The image which source is set to file is not expected to have empty file path. If it happens it becomes very tricky to save the image on exit using the standard quit dialog. This change makes it so if the image buffer does not have file path then the new image is set to the "generated" source and it behaves as if the image was created like so and was fully painted on. Additionally, mark image as dirty, so that quitting Blender after such image was added will warn about possible data loss.
2022-07-01Cleanup: Remove outdated commentsHans Goudey
Point clouds always use geometry_set_eval, and so do volumes.
2022-07-01Curves: Avoid initializing offsets when first allocatedHans Goudey
The offsets array that encodes the sizes of each curve must be filled anyway, or the curves will be in an invalid state. Calloc is unnecessary here. To make that situation clearer, fill the offsets with -1 in debug builds. Always set the first offset to zero though, since that can save some boilerplate in other areas.
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-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-30Cleanup: colon after params, move text into public doc-strings, spellingCampbell Barton
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-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 (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 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-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: spelling in commentsCampbell Barton
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-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-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-29VSE: Improved Retiming systemRichard Antalik
Patch implements better way to control playback speed than it is possible to do with speed effect. Speed factor property can be set in Time panel. There are 2 layers of control: Option to retime movie to match scene FPS rate. Custom speed factor to control playback rate. Since playback rate is strip property, it is now possible to manipulate strip as normal one even if it is retimed. To facilitate manipulation, some functions need to consider speed factor and apply necessary corrections to strip offset or strip start. These corrections may need to be float numbers, so start and offsets must be float as well. Sound strips now use speed factor instead of pitch. This means, that strips will change length to match usable length. In addition, it is possible to group movie and sound strip and change speed of meta strip.
2022-06-29Sculpt: Fix backwards normals in PBVH_GRIDS raycastingJoseph Eagar
Winding order of grid quads was backwards.
2022-06-28Fix: sampling points on mesh surface generates too many pointsJacques Lucke
2022-06-28Fix T98799: camera unselectable in camera view below a certain scalePhilipp Oeser
The camera frame (used for selection) was drawn outside the near clipping plane in those cases. This has been an issue before as seen in the following commits: - rB6e7e6832e87 - rB33d322873e6 - rB4f9451c0442 Remaining issue was that the code which ensure the frame isn't behind the near clipping plane was not taking into account the camera could be scaled (in Z). A caller of `BKE_camera_view_frame_ex` (namely `OVERLAY_camera_cache_populate`) applies scale (also on the depth) which does not play well with the way `BKE_camera_view_frame_ex` did it. Now take Z scale into account. Ref D15178
2022-06-27Fix T84369: Fluid: Missing cache invalidation when properties on non-domain ↵Germano Cavalcante
objects change The `DEG_OB_COMP_TRANSFORM` and `DEG_OB_COMP_GEOMETRY` relations between the **Domain** object and the **Flow**, **Effector** and **Force Field** objects are added in the `updateDepsgraph` callback of the Fluid modifier, more specifically in `DEG_add_collision_relations`. The node linked to these components is the `POINT_CACHE` whose assigned function is `BKE_ptcache_object_reset`. So include the `eModifierType_Fluid` modifier in outdated cache checks. Reviewed By: sergey, zeddb Maniphest Tasks: T84369 Differential Revision: https://developer.blender.org/D15210
2022-06-27Sculpt: Fix backwards normals in PBVH_GRIDS raycastingJoseph Eagar
Winding order of grid quads was backwards.
2022-06-27Cleanup: spelling in commentsCampbell Barton
2022-06-25Fix: crash when converting zero legacy curvesJacques Lucke
The issue was that the "radius" lookup below fails, because there is no curve data. Arguably, it should be possible to add attributes even when there is no data. However, the rules for that are a bit loose currently. A simple fix is to just not run the conversion code when there is nothing to convert.
2022-06-25Geometry Nodes: Field on Domain NodeHans Goudey
As described in T98943, this commit adds a node that can evaluate a field on a separate domain in a larger field context. This is potentially useful in many cases, to avoid relying on a separate capture attribute node, which can make it easier to build reusable fields that don't need geometry inputs. Internally, the node just evaluates the input field in the larger field context and then uses the generic domain interpolation, so the code is simple. One future optimization might be using the input selection to only evaluate part of the input field, but then the selection has to be interpolated as well, and that might not always be worth it. Differential Revision: https://developer.blender.org/D15289
2022-06-25Curves: Skip CurveEval in legacy curve conversionHans Goudey
Currently when converting from the legacy curve type to the new type, which happens during evaluation of every legacy curve object, the `CurveEval` type is used as an intermediate step. This involves copying all data twice, and allocating a bunch of temporary arrays. It's also another use of `CurveEval` that has to be removed before we remove the type. The main user difference besides the subtlety described below will be improved performance. **Invalid Handles and Types** One important note is that there are two cases (that I know of) where handles and handle types can be invalid in the old curve type. The first is animation, where animated handle positions don't necessary respect the types. The second is control points with a single aligned handle that didn't necessarily align with the other. In master (partially on purpose) the code corrects the first situation (which caused T98965). But it doesn't correct the second situation. It's trivial to correct for the second case with this patch (because of the eager calculation decided on in D14464), but this patch makes the choice not to correct for //either//. Though not correcting the handle types puts curves in an invalid state, it also adds flexibility by allowing that option. Users must understand that any deformation may correct invalid handles. Fixes T98965 Differential Revision: https://developer.blender.org/D15290
2022-06-25Geometry Nodes: Add Points NodeJohnny Matthews
This node takes a point count,a vector field, and float field and creates a pointcloud with n points at the positions indicated in the vector field with the radii specified in the float field.The node is placed in the "Point" menu. Differential Revision: https://developer.blender.org/D13920 Maniphest Task: https://developer.blender.org/T93044
2022-06-25Fix T98949: Deleting vertex group in geometry nodes affects othersHans Goudey
The vertex group indices stored in the weights need to be accounted for when the vertex group list on the mesh changes.
2022-06-25Cleanup: Remove unused argumentHans Goudey
2022-06-24Fix: Incorrect dirty normal tag after mesh translationHans Goudey
Mistake in 54182e4925de4ee. The dirty flag was always cleared, but we only want to clear it after translating a mesh if it normals were already non-dirty.
2022-06-24Fix T99058: geometry nodes ignore if subdivision surface modifier is disabledBrecht Van Lommel
It was looking up the last modifier in the stack, ignoring visibility, instead of mesh->runtime.subsurf_runtime_data set by the modifier evaluation and used by the drawing code.
2022-06-24Fix T98925: Editor panels are brokenRichard Antalik
Commit 277fa2f441f4 added channels region to unintended editors if sequencer was used in area. This caused issues with some editors having 2 tool regions and non functioning side panel. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D15253
2022-06-23Cleanup: Make function staticHans Goudey
2022-06-23Mesh: Add an explicit "positions changed" functionHans Goudey
We store various lazily calculated caches on meshes, some of which depend on the vertex positions staying the same. The current API to invalidate these caches is a bit confusing. With an explicit set of functions modeled after the functions in `BKE_node_tree_update.h`, it becomes clear which function to call. This may become more important if more lazy caches are added in the future. Differential Revision: https://developer.blender.org/D14760
2022-06-23Animation: Add function to remove all FCurves from an ActionColin Basnett
Add a `BKE_action_fcurves_clear(action)` function, which removes all the Action's FCurves, and expose it as `ActionFCurves.clear()` in RNA. This is more ergonomic than calling `remove` on f-curves until the list is empty. Reviewed By: sybren Differential Revision: https://developer.blender.org/D14660
2022-06-23Cleanup: Clang tidyHans Goudey
Mainly duplicate includes and else after return.
2022-06-22Cleanup: remove unused sculpt texture cache generationBrecht Van Lommel
This has not been used since 5505697ac in 2010.
2022-06-22Fix T98956: Crash removing some builtin attributesHans Goudey
For example, the "id" attribute is stored as a named attribute. If it doesn't exist already, `layer_index` was uninitialized, causing issues with `CustomData_free_layer`. The fix is to use the generic function to free a named layer in that case. Eventually the other case will go away as T95965 is finished.