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
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-03-31Cleanup: Remove remaining unused code for DispList "bevel_split"Hans Goudey
This was added in rB93aeb6b318a7, last changed in rB8f0a44a5d55d, and removed in rB51b796ff1528. I assume it was a way for curves to have split edges at corners. As far as I can tell it only ever worked in Blender Internal, and that has been gone for years. Another possible route here would be restoring this functionality, but it's generally preferrable to reduce complexity in this area of curve code than adding it back, especially in the context of other improvements planned related to curves in geometry nodes. Differential Revision: https://developer.blender.org/D9966
2021-03-23Curves: add taper mode optionOmar Emara
Currently, when a taper object is specified, the radius of the spline is ignored. This patch adds a new option to control how the taper object affect the effective radius of the spline. The option allow three modes of operation: - Override: The old method. The radius of the spline is ignored and overridden. - Multiply: The radius of the spline is multiplied by the taper radius. - Add: The radius of the spline is added to the taper radius. Ref D10779
2021-03-08Cleanup: use ofs instead of offs as an abbreviation for offsetCampbell Barton
Used for local structs/variables, since `ofs` is by far the most widely used abbreviation.
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
2021-02-17Cleanup: remove commented functionCampbell Barton
2021-02-17Fix T85664: 3D Viewport issues with curve poly splinesHans Goudey
Caused by cleanup in rBcdb3cbd64401, where an index was used to index `float *` instead of `float[3]`.
2021-02-13Cleanup: Simplify three functions in displist.cHans Goudey
A few related improvements to the three functions: - Reduce variable scope - Use for loops instead of while loops - Use const, bool instead of int - Generally make logic easier to read
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2021-01-19Fix T74755: Cap of curve doesn't have smooth shadingCampbell Barton
Copy the smooth setting when filling in curve caps. For drawing this doesn't change behavior as a single normal is used for all faces. The difference may be noticed when converting to a mesh or with modifiers applied.
2021-01-19Fix T84041: Bevel caps have invalid normalsCampbell Barton
Bevel caps always had incorrect normals, causing display glitches in some cases. It seems this never worked properly (at least 2.79 also had this bug). Use the projection vector as the normal.
2020-11-22Cleanup: Use const arguments in curve bevelHans Goudey
This makes it clear that only the final "r_data" is being changed. Also rename a variable to be less vague.
2020-11-22Cleanup: Improve readability of curve displist buildingHans Goudey
Just a few minor improvements: declare variables where they are initialized, decrease scope, expand some variable names, and use LISTBASE_FOREACH.
2020-11-22Cleanup: Reduce indentationHans Goudey
Having up to nine levels of indentation make this function hard to follow. Instead of indenting the rest of the loop for a simple special case, just continue.
2020-10-24Cleanup: Return early in some curve functionsHans Goudey
This commit uses continue in loops and returning early to reduce indentation in long functions, only where this results in a significant improvement. Also includes a few LISTBASE_FOREACH macros.
2020-10-22Fix T81967: Crash when using extrude on a text objectHans Goudey
Caused by rBa308607a5334, which mistakenly removed these lines.
2020-10-22Cleanup: Use LISTBASE_FOREACH macro in curve codeHans Goudey
These changes should result in more readable and undestandable code, especially where while loops were use instead of for loops. They are not comprehensive, and I skipped wherever the change was not obvious.
2020-10-19Spelling: MiscellaneousHarley Acheson
Corrects 34 miscellaneous misspelled words. Differential Revision: https://developer.blender.org/D9248 Reviewed by Campbell Barton
2020-10-07Refactor `BKE_id_copy_ex` to return the new ID pointer.Bastien Montagne
Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219.
2020-09-18Curves: Allow caps for all geometry typesHans Goudey
I think this wasn't allowed before because the section of a curve was built in multiple parts. But since rBe34d3e32dda7, the whole slice of a curve is built in one piece, so we can easily support curve caps for all geometry types, including the new custom profile option. Note that this also allows "caps" when the fill type is not full. They could easily be disabled by checking for "Full" fill type if that was preferred in the future. See the patch for images. Differential Revision: https://developer.blender.org/D8911
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-05-21Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-21Cleanup: spellingCampbell Barton
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-05-01Curve: Force pretesselate modifier to output a Mesh outputClément Foucault
This is to improve the case of T71055 where curves share the same batch cache when they shouldn't. This however, does not help to fix edit mode display. The real fix would be to have a similar handling to what the mesh modifiers do and duplicate the whole Curve data. But this is too much work/change for the 2.83 release. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7569
2020-05-01Curve: Force pretesselate modifier to output a Mesh outputClément Foucault
This is to improve the case of T71055 where curves share the same batch cache when they shouldn't. This however, does not help to fix edit mode display. The real fix would be to have a similar handling to what the mesh modifiers do and duplicate the whole Curve data. But this is too much work/change for the 2.83 release. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7569
2020-04-22Objects: add infrastructure for hair, pointcloud, volume modifiersBrecht Van Lommel
There is no user visible difference in standard builds, as there are no volume modifiers yet. When using WITH_NEW_OBJECT_TYPES some deform only modifiers are now available for hair and pointcloud objects. Differential Revision: https://developer.blender.org/D7141
2020-04-03Cleanup: split `BKE_anim.h` and `anim.c` into smaller piecesSybren A. Stüvel
The files are now split up into the following sections: - `BKE_anim_path.h` and `anim_path.c` for path/curve functions. - `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for animation visualization (mostly motion paths). - `BKE_duplilist.h` for DupliList function declarations. These were already implemented in `object_dupli.c`, so they were rather out of place being declared in `BKE_anim.h` in the first place. No functional changes.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-28Objects: make evaluated data runtime storage usable for types other than meshBrecht Van Lommel
This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. This previously caused a bug in T74283, that should be fixed now. Differential Revision: https://developer.blender.org/D6695
2020-02-28Revert "Objects: make evaluated data runtime storage usable for types other ↵Brecht Van Lommel
than mesh" This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a. Fix T74283: modifier display lost when moving object in edit mode. The cause is not immediately obvious so better to revert and look at this carefully.
2020-02-27Objects: make evaluated data runtime storage usable for types other than meshBrecht Van Lommel
This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. Differential Revision: https://developer.blender.org/D6695
2020-02-26Cleanup: reduce CDDM use, remove unused function callsCampbell Barton
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-10-15Fix scan-fill normal flipping for displist & mask fillingCampbell Barton
Missed from fix for T70594 which reversed the normals, Resolves T70809
2019-08-25Curve: remove tessface calculation when calculating modifiersCampbell Barton
- All parts of the code that need tessface should calculate it on demand. - The check for tessloopnormal mask isn't correct (since this is loop data, not tessface data).
2019-08-24Transform: option to transform origins in object modeCampbell Barton
Currently supports mesh, armature, lattice, curve & metaballs. Access from pivot popover.
2019-08-22Cleanup: typo in last commitCampbell Barton
2019-08-21Cleanup: vertex coordinate access, naming & minor changesCampbell Barton
This also splits vertex access and allocation so it's possible to copy coordinates into an existing array without allocating it.
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-06-09Fix T65638: memory leak - modifiers on curves.Bastien Montagne
We need to tag the `mesh_eval` of curve as owned, when we generate one, otherwise freeing code would not free it.
2019-05-29Fix T65275: missing dereferenceJacques Lucke
2019-05-21Fix T64842: crash rendering files with bevel curvesBrecht Van Lommel
This is old logic that no longer makes sense in the new depsgraph, and causes issues when multiple threads try to modify the same bevel object. Differential Revision: https://developer.blender.org/D4913
2019-05-13Curve: Remove duplicated and confusing argumentSergey Sharybin
Curve function had two arguments: - for_render, which was originally supposed to be used to control whether viewport or render visibility for modifiers is to be used. - use_render_resolution, which sounds like it is supposed to control whether viewport or render resolution for curves is to be used. What is totally confusing is that those arguments were used interchangeably: sometimes use_render_resolution would control modifiers visibility. This commit makes it so there is one single argument for this. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D4850
2019-05-10Cleanup: Remove unused functionsSergey Sharybin
2019-05-10Cleanup: Remove old deprecated DerivedMesh functionsSergey Sharybin
Were ifdef-ed for a long time.
2019-04-24Fix T61184 linked curves with curve modifiers arent drawn correctlyClément Foucault
Force Displist to Mesh conversion if there is any modifier. This is until we find a better way to store the batches per objects. Also fix draw cache functions that were not returning final mesh edges.