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-08-03Attribute Math: Improve performance of mixer in some casesIliay Katueshenock
The `DefaultMixer` for mixing generic data types has some issues: 1. The full buffer is always zeroed, even if only some is used. 2. Finalizing also works on all values, even if only some are used. 3. "mixing" doesn't allow setting the first value, requiring that everything is cleared beforehand. This commit adds the following functionality: 1. Constructor with the specified `IndexMask` for preliminary zeroing. 2. `set` method to overwrite the value. 3. `finalize` with the specified mask to process a subset of values. This is useful in situations where you want to use the DefaultMixer without having to overwrite all the values many times. A performance improvement was observed for NURBS curve evaluation and attribute interpolation from the point to curve domain of about 15% and 35% respectively (100,000 curves). Differential Revision: https://developer.blender.org/D15434
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-05-11Cleanup: use '_num' suffix, mostly for curves & spline codeCampbell Barton
Replace tot/amount & size with num, in keeping with T85728.
2022-05-04Curves: Use copied original data for invalid NURBS curvesHans Goudey
NURBS curves can be invalid when the order is less than the number of points, or in a few other situations. Currently the evaluated data of an invalid NURBS curve is empty. This is inconvenient because it requires checking for empty curves when it otherwise wouldn't be necessary. This patch replaces that fallback with copying the original data to the evaluated points. This makes conceptual sense too, as if the curve couldn't be evaluated-- which wouldn't necessarily delete it. Usually the UI protects against this happening, but it's currently possible to create an invalid curve with some operations like the delete geometry node. Differential Revision: https://developer.blender.org/D14837
2022-03-25Fix: Small fixes for NURBS evaluationHans Goudey
Clear the nurbs basis cache dirty flag when its evaluation finishes. Remove an incorrect assert that the evaluated size couldn't be zero. It can, when `check_valid_size_and_order` returns false.
2022-03-25Cleanup: Further renaming in new curves codeHans Goudey
A follow-up to e253f9f66d6f. Follow the policy from T85728 completely (using "num" as a prefix) and rename another function.
2022-03-24Cleanup: Adjust naming in new curves codeHans Goudey
Rename "size" variables and functions to use "num" instead, based on T85728 (though this doesn't apply to simple C++ containers, it applies here). Rename "range" to "points" in some functions, so be more specific. Differential Revision: https://developer.blender.org/D14431
2022-03-19BLI: move generic data structures to blenlibJacques Lucke
This is a follow up to rB2252bc6a5527cd7360d1ccfe7a2d1bc640a8dfa6.
2022-03-16Curves: Initial evaluation for curves data-blockHans Goudey
This patch adds evaluation for NURBS, Bezier, and Catmull Rom curves for the new `Curves` data-block. The main difference from the code in `BKE_spline.hh` is that the functionality is not encapsulated in classes. Instead, each function has arguments for all of the information it needs. This makes the code more reusable and removes a bunch of unnecessary complications for keeping track of state. NURBS and Bezier evaluation works the same way as existing code. The Catmull Rom implementation is new, with the basis function based on Cycles code. All three types have some basic tests. For NURBS and Catmull Rom curves, evaluating positions is the same as any generic attribute, so it's implemented by the generic interpolation to evaluated points. Bezier curves are a bit special, because the "handle" control points are stored in a separate attribute. This patch doesn't include generic interpolation to evaluated points for Bezier curves. Ref T95942 Differential Revision: https://developer.blender.org/D14284