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-03-22Curve: Validation message split from nurb_check_validLaurynas Duburas
Split retrieval of translated text for the "invalid" messages for NURBS curves from the actual calculation, which is a lower-level function. Also fixes an issue where "At least two points required" would always display in the "Active Spline" panel. Differential Revision: https://developer.blender.org/D14315
2022-03-11Curve: Improve NURBS knot generation modesLaurynas Duburas
This patch enables all 8 combinations of Nurbs modes: Cyclic, Bezier and Endpoint. Also removes restriction on Bezier Nurbs order. The most significant changes are mode combinations bringing new meaning. In D13891 is a scheme showing NURBS with same control points in a modes, and also further description of each possible case. Differential Revision: https://developer.blender.org/D13891
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-12-02Cleanup: Rename curve struct fieldsHans Goudey
These existing names were unhelpful at best, actively confusing at worst. This patch renames them to be consistent with the terms used to refer to the values in the UI. - `width` -> `offset` - `ext1` -> `extrude` - `ext2` -> `bevel_radius` Differential Revision: https://developer.blender.org/D9627
2021-07-19Cleanup: Remove unused function, unused declarationHans Goudey
2021-06-28Curve: Add functions to retrieve const access to spline listHans Goudey
While the const correctness of `ListBase` is quite limited, it's helpful to have a way to retrieve the `Nurb` list from curve object data without casting away const from the curve.
2021-06-28Cleanup: Use const argumentsHans Goudey
2021-06-16Cleanup: Fix inconsistent parameter name warningHans Goudey
2021-06-07Cleanup: Use const arguments, return by valueHans Goudey
Also use Curve as an argument instead of Object, since the object was only used to retrieve the curve, and the calling code is already working with curve data.
2021-04-13Cleanup: redundant struct declarationsCampbell Barton
2021-04-09Cleanup: use our own code style for doxy-gen comment blocksCampbell Barton
2021-04-09Cleanup: use const for BKE_where_on_path and related structsCampbell Barton
2021-04-08Fix T81707: Spline IK Joints "Floating" above curveSebastian Parborg
The issue was that where_on_path uses a resampled curve to get the data from the curve. This leads to disconnects between the curve the user sees and the evaluated location data. To fix this we simply use the actual curve data the user can see. The older code needed a cleanup either way as there were hacks in other parts of the code trying to work around some brokenness. This is now fixed and we no longer need to clamp the evaluation range to 0-1 or make helper functions to make it do what we actually want. Reviewed By: Campbell, Sybren Differential Revision: http://developer.blender.org/D10898
2021-04-01Curve: Remove 'CU_2D' flag used for nurbsGermano Cavalcante
This fixes T86440 As the CU_2D flag is set for nurbs, a Curve can have 2D nurbs mixed with 3D. But the UI does not allow this mixing. It updates all nurbs to 2D or 3D when set. So remove this specific flag for nurbs. This may break old files, since 2D curves with mixed 3D are now set as 3D. Differential Revision: https://developer.blender.org/D10738
2021-04-01Cleanup: Use const arguments in curve codeHans Goudey
2021-02-20Python: Add to_curve method to the object APIOmar Emara
This patch adds a to_curve method to the Object ID. This method is analogous to the to_mesh method. The method can operate on curve and text objects. For text objects, the text is converted into a 3D Curve ID and that curve is returned. For curve objects, if apply_modifiers is true, the spline deform modifiers will be applied and a Curve ID with the result will be returned, otherwise a copy of the curve will be returned. The goal of this addition is to allow the developer to access the splines of text objects and to get the result of modifier applications which was otherwise not possible. Reviewed By: Brecht Differential Revision: https://developer.blender.org/D10354
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-10-15Fix T81743: Changed behaviour in RGB Curves node interpolationSybren A. Stüvel
Restore the old `correct_bezpart()` (pre-rBda95d1d851b4) function as `BKE_curve_correct_bezpart()`, and use that where the old behaviour was desired (that is, curve maps like used by the RGB Curves shader node). The new (post-rBda95d1d851b4) function is also renamed to `BKE_fcurve_correct_bezpart()` to avoid confusion.
2020-10-09Revert "CleanUp: Introduce `eMeshBatchDirtyMode` enum"Jeroen Bakker
This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-07CleanUp: Introduce `eMeshBatchDirtyMode` enumJeroen Bakker
It used to be an `int mode`.
2020-09-16Cleanup: use uint8_t for various flags in curvesJacques Lucke
Previously, it was kind of a mess. In different places it was using `char`, `short` and `int`. The changed properties are flags that are operated upon using bit operations. Therefore, the integer type should be unsigned. Since we only use 2 bits of these flags, `uint8_t` is large enough. Especially note the change I had to make in `RNA_define.h` to make this work. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8844
2020-09-03Object: add BKE_object_obdata_to_type utility functionCampbell Barton
Move functionality to get the object type from an ID into it's own function.
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-02Cleanup: pass const matricesCampbell Barton
Also order return matrices last.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-06-13Cleanup: use const arguments to deform functionsCampbell Barton
This changes curve deform code not to set the objects inverse matrix, this shouldn't cause problems as it's not used elsewhere afterwards.
2020-06-13Cleanup: comments, use bool return valueCampbell Barton
2020-06-13Modifier: skip edit-mesh conversion for armature, curve & latticeCampbell Barton
This is an improvement over 2.7x which converted edit-mesh to mesh (CDDM) for all 3 modifiers. Overall this increases performance in edit-mode by around 15-20%.
2020-06-12Cleanup: split object data deform functions into their own filesCampbell Barton
Move armature/curve functions into their headers, they were previously in BKE_lattice.h
2020-05-26Curves: Implement Handles for selected points onlyAntonio Vazquez
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves. I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel.. Reviewed By: fclem, #user_interface, billreynish, Severin Differential Revision: https://developer.blender.org/D7754
2020-05-15Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-15Fix T76563: Transforming an auto-aligned point won't set it alignedCampbell Barton
When local origins are used or a single control point is selected, change the handle types from auto to aligned.
2020-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653
2020-04-30Cleanup: Fix compiler warningAntonio Vazquez
2020-04-16Object: only apply smooth/flat to the active object in paint modesCampbell Barton
Also some minor improvements: - Only run once per object data instance. - Correction for mesh smooth flag being used on curves. - Move curve operation into utility function.
2020-03-06Cleanup: Fix forward declaration of headersDalai Felinto
2020-03-06Cleanup: Curve: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2020-02-20Cleanup: declatatuons for functions that don't existCampbell Barton
2020-02-04Improve error message converting nurb to bezierPhilipp Oeser
BKE_nurb_type_convert now takes r_err_msg and is more specific in the error message... ref T71672. Maniphest Tasks: T71672 Differential Revision: https://developer.blender.org/D6275
2019-11-22UI: Changes to Graph Editor selection and transformJulian Eisel
When introducing "drag-all-selected" support all over Blender, we figured this wouldn't work well with the Graph Editor selection/transform behavior. Hence, William and I worked on the following changes, although we used this chance to improve the behavior in general too. For more info see T70634. * Handles now always move with the key, regardless if they are selected or not. * Selecting the key doesn't select the handles anymore, their selection is separate. * Multiple keys and handles can now be dragged. * Dragging a handle moves all selected handles **on the same side**. * Tweak-dragging any handle can never affect any keyframe location, only handles. * G/R/S should behave as before. * Changing the handle type with a key selected always applies the change to both handles. * Box selection with Ctrl+Drag now allows deselecting handles (used to act on entire triple only). * Box selection //Include Handles// option now only acts on visible handles, wasn't the case with Only Selected Keyframes Handles enabled. * Box selection //Include Handles// is now enabled by default in all bundled keymaps. The changes have been tested for some days by the animators here in the Blender Animation Studio. Some changes are based on their feedback. Also, this improves/adds comments for related code. Differential Revision: https://developer.blender.org/D6235 Reviewed by: Sybren Stüvel, William Reynish
2019-09-23Cleanup: remove unimplemented texture space rotation variablesBrecht Van Lommel
2019-09-23Cleanup: remove Mesh.bb and Curve.bb, no reason for these to be persistentBrecht Van Lommel
These were only strictly valid for texture space calculation, don't store them since they should not be used after that. Only store a flag to indicate if the auto texture space has been evaluated. In the future it might make sense to store bounding boxes at the mesh level to speed up bounding box computation for multiple objects using the same mesh, but then it will need to be implemented differently.
2019-09-11DNA: defaults for ID typesCampbell Barton
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-24Transform: option to transform origins in object modeCampbell Barton
Currently supports mesh, armature, lattice, curve & metaballs. Access from pivot popover.