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-07-02Cleanup: Use const variables for object's evaluated meshHans Goudey
Generally the evaluated mesh should not be changed, since that is the job of the modifier stack. Current code is far from const correct in that regard. This commit uses a const variable for the reult of `BKE_object_get_evaluated_mesh` in some cases. The most common remaining case is retrieving a BVH tree from the mesh.
2021-06-29Cleanup: Use function name for allocation stringsHans Goudey
This is simpler, more consistent, and takes up less space.
2021-06-29Curves: Avoid duplication of control points during evaluationHans Goudey
This commit avoids duplicating the deformed control point list twice by modifying the list in the object curve cache directly. For curves, the original control point data was duplicated into a local listbase, deformed, used to create the "bevel list" data, and then duplicated again for the object-level storage of deformed control points. Text objects and surface objects had a similar unnecessary duplication.
2021-06-29Cleanup: Avoid freeing curve evaluation data twiceHans Goudey
The curve bevel list was freed, and then freed again in a call to the function that recalulates it. The curve "anim path" data was freed only to be freed again in its calculation function as well. Also move the anim_path calculation directly after the bevel list creation to make its requirements more explicit.
2021-06-29Cleanup: Split curve and surface data evaluation functions, renameHans Goudey
Surface objects were already handled by an early return in the main "curve types" function. This commit splits them, renames the funtions to match (and be more consistent with other names), and sanitizes the checking of object types.
2021-06-29Cleanup: Order return arguments last, use r_ prefixHans Goudey
2021-06-28Cleanup: Replace paranoid check with assertHans Goudey
Every call to `BKE_displist_make_curveTypes` already checks the object type beforehand, there is no need to check it again. Also removed an outdated comment.
2021-06-28Cleanup: Remove unused "for_orco" argument to curve evaluationHans Goudey
`BKE_displist_make_curveTypes` had a `for_orco` argument that was always false in calls to the function. Removing it allows the curve displist and modifier evaluation code to become simpler. There are some related cleanups in rBdf4299465279 and rB93aecd2b8107.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-14Cleanup: Reduce indentation from redundant checkHans Goudey
2021-06-14Cleanup: Order return argument lastHans Goudey
2021-06-08Fix test failure caused by earlier cleanup commitHans Goudey
rB8cbff7093d65 neglected to move the "pre-tesselation" modifier to the next before calculating the second part of the curve modifier stack.
2021-06-08Cleanup: Order return argument lastHans 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-06-07Cleanup: Make function staticHans Goudey
This was not used in any other file, and it's not likely to be used elsewhere in the future anyway.
2021-06-07Cleanup: Remove outdated/useless commentsHans Goudey
Some of the comments referenced code that was no longer there, or even defines that were removed. Other comments were more confusing and vague than helpful. Also adjust formatting in a few cases.
2021-06-07Cleanup: Remove unused function, make function privateHans Goudey
2021-06-07Cleanup: Decrease variable scopeHans Goudey
Also use const and bool in a few places.
2021-04-26Cleanup: Move displist.cc to C++Hans Goudey
This is a change split from the geometry nodes curves branch. Since curve object modifier evaluation happens in this file, moving it to C++ will be quite helpful to support the `GeometrySet` type. Other than that, the code in the branch intends to replace a fair amount of this file anyway, so I don't plan to do any further cleanup here. Differential Revision: https://developer.blender.org/D11078