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-14Fix T95700: Oject Info node does not work with GPU subdivided meshesKévin Dietrich
When GPU subdivision is enabled the mesh objects remain unsubdivided on the CPU side, and subdivision should be requested somewhat manually (via `BKE_object_get_evaluated_mesh`). When referencing an object, the Object Info node calls `bke::object_get_evaluated_geometry_set` which first checks if a Geometry Set is present on the object (unless we have a mesh in edit mode). If so it will return it, if not, the object type is discriminated, which will return a properly subdivided mesh object via `add_final_mesh_as_geometry_component`. The unsubdivided mesh is returned because apparently the check on the Geometry Set always succeeds (as it is always set in `mesh_build_data`). However, the mesh inside this Geometry Set is not subdivided. This adds a check for a MeshComponent in this Geometry Set, and if one exists, calls `add_final_mesh_as_geometry_component` which will ensure that the mesh is subdivided on the CPU side as well. Differential Revision: https://developer.blender.org/D14643
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-14Correct error in 405bff7fd8ed5df8d44a1362763fac7c00e2060bCampbell Barton
Was adding 1 to dietime twice in init_particle_interpolation.
2022-04-14Fix T68290: Baked particles don't render in final frameCampbell Barton
Particles baked into memory would never load the final frame because of an off-by-one error calculating the particles `dietime`. This value indicates the frame which the particle ceases to exist but was being set to the end-frame which caused this bug as the scenes end-frame is inclusive. While the last frame was properly written and read from memory, the `dietime` was set to the last frame causing all the particles to be considered dead when calculating the cached particle system.
2022-04-14Cleanup: Make curve deform argument optionalHans Goudey
The "dir" argument to `BKE_where_on_path` was only actually used in a few places. It's easier to see where those are if there isn't always a dummy argument.
2022-04-14Edit Mesh: Parallelize bounds calculation with deform modifiersHans Goudey
When displaying a deform modifier in edit mode, a cached array of positions is used. Parallelizing bounds calculation when that array exists can improve the framerate when editing slightly (a few percent). I observed an improvement of the min/max itself of about 10x (4-5ms to 0.4ms).
2022-04-14Cleanup: Declare variables where initializedHans Goudey
Also adjust comment formatting and use nullptr where the previous commit missed.
2022-04-14Cleanup: Move three mesh files to C++Hans Goudey
This will allow easier interaction with other areas also using C++ features, and a potential optimization to edit mesh bounding box calculation.
2022-04-14Curves: Avoid duplicating evaluated positions with all poly curvesHans Goudey
If all of the curves are poly curves, the evaluated positions are the same as the original positions. In this case just reuse the original positions span as the evaluated positions.
2022-04-14Fix: Curves: Add missing builtin attribute definitionHans Goudey
2022-04-14Fix: Use consistent type for nurbs order attributeHans Goudey
An 8 bit integer should be enough for now. We can change this if we ever want to allow increasing the order past 256.
2022-04-14Fix: Assert evaluating single point Bezier curveHans Goudey
Just return early in that case to keep the rest of the function simpler.
2022-04-13Fix T97278: wrong hair particle shape with kink spiralHallam Roberts
Revert change from 3da84d8b that incorrectly used M_PI_4. Differential Revision: https://developer.blender.org/D14636
2022-04-13Fix compilation error with MSVCSergey Sharybin
Caused by previous DNA change.
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-13Cleanup: Strict compiler warning in remesherSergey Sharybin
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-13Fix (unreported) collections not being append-reusable.Bastien Montagne
Related to T97289, appending collections would never re-use already appended one, since the flag was not set for this ID type...
2022-04-13Fix T97289: Linked collection assets disappear.Bastien Montagne
After appending, new link/append code would delete linked IDs, even if those where pre-existing. Note that this would actually lead to invalid memory access later in append code (ASAN crash).
2022-04-13Fix T97164: Voxel remesh only supports vertex floatJoseph Eagar
color attributes. Voxel remesher now supports all color attribute types.
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-12Cleanup: Remove reference to CD_NORMAL in poly custom dataHans Goudey
Vertex and face normals are not stored in custom data anymore, in both Mesh and DerivedMesh.
2022-04-12Cleanup: Correct wording in commentsHans Goudey
2022-04-12Fix T97069: Null collection object during layercollection resync when relinking.Bastien Montagne
We better handle NULL object pointers before doing layer collections resync, otherwise said resync process has to deal with those NULL pointers. By the look of it this mistake has been there since the origin of the remapping/relinking code. Also for safety (and optimization), do not perform layer collection resync from `libblock_remap_data_postprocess_object_update` when `libblock_remap_data_postprocess_collection_update` is called immediately afterwards. Also added same 'skip on NULL collection object pointer' check to `layer_collection_local_sync` as the one in `layer_collection_objects_sync`, since it's fairly hard to always guaranty there is no such NULL pointer when calling that code.
2022-04-12Cleanup: redundant logical notGermano Cavalcante
Overlooked at rB0ebcc711f. The logical not in this case was only applied to the left hand side of the comparison.
2022-04-12Cleanup: clang-formatLukas Stockner
2022-04-11Cleanup: Clarify a few comments in pbvh_intern.hJoseph Eagar
2022-04-11Cleanup: fix attribute.c incorrectly usingJoseph Eagar
CustomDataLayer.type to check for CD_FLAG_TEMPORARY instead of .flag.
2022-04-11Cleanup: use doxy-comments and `r_` prefix return argumentsCampbell Barton
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-10Mask: refactor mask_rasterize vector copying into a utility functionSimon Lenz
Add a separate scanline function scanfill_vert_add_v2_with_depth that adds a vertex from 2D coordinate array & the specified z-value. Ref D13460
2022-04-09Curves: Port tangent and normal calculation to the new data-blockHans Goudey
Port the "Normal" and "Curve Tangent" nodes to the new curves data-block to avoid the conversion to `CurveEval`. This should make them faster by avoiding all that copying, but otherwise nothing else has changed. This also includes a fix to move the normal mode as a built-in curve attribute when converting to and from `CurveEval`. The attribute is needed because the option is used implicitly in many nodes currently. Differential Revision: https://developer.blender.org/D14609
2022-04-09Fix T97133: Crash when creating a scene copyRichard Antalik
Crash happened in sequencer editor, because pointer to displayed channels was not set in `scene_copy_data`.
2022-04-09Fix: error in previous commitJacques Lucke
2022-04-09Curves: correctly initialize new attributesAngus Stanton
Previously, the new attributes were zero-initialized. However, sometimes the default has to be something else. The old behavior led to unexpected behavior in the Snap Curves to Surface operator in Deform mode, when the curves were not attached to the surface before. Differential Revision: https://developer.blender.org/D14588
2022-04-09Fix: Various fixes and cleanups in new curves codeHans Goudey
- Use "curve" instead of "spline" in comments - Use non-plural variable names - Tag topology dirty after resolution modified rather than positions - Reorder enum values to change which value is zero (and the default) - Remove a duplicate unused variable
2022-04-08Cleanup: CacheFile, use double precision for timeKévin Dietrich
Both the Alembic and USD libraries use double precision floating point numbers internally to store time. However the Alembic I/O code defaulted to floats even though Blender's Scene FPS, which is generally used for look ups, is stored using a double type. Such downcasts could lead to imprecise lookups, and would cause compilation warnings (at least on MSVC). This modifies the Alembic exporter and importer to make use of doubles for the current scene time, and only downcasting to float at the very last steps (e.g. for vertex interpolation). For the importer, doubles are also used for computing interpolation weights, as it is based on a time offset. Although the USD code already used doubles internally, floats were used at the C API level. Those were replaced as well. Differential Revision: https://developer.blender.org/D13855
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-08NLA: Remove Hold resetting between Hold_Forward BehaviorSybren A. Stüvel
Avoid Blender overwriting artist's choices. The automatic change from "Hold" (i.e. bidirectional extrapolation) to "Hold Forward" (i.e. only extrapolate forward in time) has been removed. This patch does not change strip evaluation. Between two strips, the first with `None` extrapolation and the next with `Hold`, neither strip will evaluate, which matches previous behavior. A future patch can change the evaluation behavior. Reviewed By: RiggingDojo, sybren Maniphest Tasks: T82230 Differential Revision: https://developer.blender.org/D14230
2022-04-08Fix: accidentally swapped value with itselfJacques Lucke
Found in T96889.
2022-04-08Fix T97150: Export GPencil to PDF or SVG crashes blenderAntonio Vazquez
The problem was the original file had some vertex weight information, but the weights array was empty, so the duplication was not done and the free memory crashed. To avoid this type of errors, now before duplicate weights the function checks the pointer and also the number of weights elements in the array to avoid the duplicatiopn of empty data.
2022-04-08Cleanup: Define new curves normal mode in DNAHans Goudey
Don't include the tangent mode for now, since that was never implemented for geometry nodes curves.
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-07Cleanup: remove unused mface tesselation code from modifier stackBrecht Van Lommel
This seems to serve no purpose anymore, I don't see anywhere that CD_MFACE is requested for modifier evaluation, and it's confusing to have this in this final normals computation function. Found while looking into D14579. Differential Revision: https://developer.blender.org/D14580
2022-04-07Fix T97035: crash transferring face corner dataBrecht Van Lommel
The mechanism to instance meshes when there are no modifiers did not take into account that modifiers might get re-evaluated from an operator that requests loop normals. Now check for that case and no longer use the instance then. In the future, a better solution may be to compute loop normals on demand as is already done for poly and vertex normals, but that would be a big change. Differential Revision: https://developer.blender.org/D14579
2022-04-07Cleanup: Return early in metaball tessellation codeHans Goudey
Also declare variables where initialized and use const.
2022-04-07Functions: optimize simple generated multi-functionsJacques Lucke
This implements two optimizations: * Reduce virtual function call overhead when a non-standard virtual array is used as input. * Use a lambda in `type_conversion.cc`. In my test setup, which creates a float attribute filled with the index, the running time drops from `4.0 ms` to `2.0 ms`. Differential Revision: https://developer.blender.org/D14585
2022-04-07Fix T97123: Applying modifier to multi-user: other objects were also convertedDalai Felinto
The first element of the iterator was not being tested against the flag. So in some cases it would lead to more objects been made into single-user than the active (or selected) ones.
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