Blender Git Commit Log
Git Commits -> Revision 7d8b132
Revision 7d8b132 by Sergey Sharybin (master) July 11, 2013, 10:45 (GMT) |
Move curve's boundbox and texspace calculation out of modifier stack There were several issues with how bounding box and texture space are calculated: - This was done at the same time as applying modifiers, meaning if several objects are sharing the same curve datablock, bounding box and texture space will be calculated multiple times. Further, allocating bounding box wasn't safe for threading. - Bounding box and texture space were evaluated after pre-tessellation modifiers are applied. This means Curve-level data is actually depends on object data, and it's really bad because different objects could have different modifiers and this leads to conflicts (curve's data depends on object evaluation order) and doesn't behave in a predictable way. This commit moves bounding box and texture space evaluation from modifier stack to own utility functions, just like it's was done for meshes. This makes curve objects update thread-safe, but gives some limitations as well. Namely, with such approach it's not so clear how to preserve the same behavior of texture space: before this change texture space and bounding box would match bevelled curve as accurate as possible. Old behavior was nice for quick texturing -- in most cases you don;t need to modify texture space at all. But texture space was depending on render/preview settings which could easily lead to situations, when final result would be far different from preview one. Now we're using CV points coordinates and their radius to approximate the bounding box. This doesn't give the same exact texture space, but it helps a lot keeping texture space in a nice predictable way. We could make approximation smarter in the future or add operator like "match texture space to object's bounding box". |
Commit Details:
Full Hash: 7d8b1325be157e254ad16948d7e7bf173d1e573c
SVN Revision: 58170
Parent Commit: 683db78
Lines Changed: +121, -67
6 Modified Paths:
/source/blender/blenkernel/BKE_curve.h (+6, -2) (Diff)
/source/blender/blenkernel/intern/curve.c (+98, -28) (Diff)
/source/blender/blenkernel/intern/displist.c (+3, -27) (Diff)
/source/blender/blenkernel/intern/object.c (+9, -4) (Diff)
/source/blender/editors/object/object_edit.c (+3, -2) (Diff)
/source/blender/editors/space_view3d/drawobject.c (+2, -4) (Diff)
/source/blender/blenkernel/intern/curve.c (+98, -28) (Diff)
/source/blender/blenkernel/intern/displist.c (+3, -27) (Diff)
/source/blender/blenkernel/intern/object.c (+9, -4) (Diff)
/source/blender/editors/object/object_edit.c (+3, -2) (Diff)
/source/blender/editors/space_view3d/drawobject.c (+2, -4) (Diff)