Blender Git Loki

Git Commits -> Revision eb8964f

Revision eb8964f by Tamito Kajiyama (master)
August 20, 2014, 01:37 (GMT)
Fix T41464: Material Boundary bug in Freestyle.

The reported issue was caused by an old bug combined with another bug
introduced by recent Freestyle Python API updates.

The old bug was that a mutable reference to CurvePoint was treated as if
it were immutable. Iteration over CurvePoint objects is implemented by
the C++ CurvePointIterator class, whose dereference method
CurvePointIterator::operator*() returns a reference to a mutable data
member (probably originally intended for better performance). Hence the
returned reference may vary upon iteration over different CurvePoints.
This implementation detail was overlooked and the returned reference was
treated as immutable (which is the case in fact for other Interface0D
subclasses except for CurvePoint). This bug was surprisingly old as it
existed before the beginning of Freestyle integration into Blender.

The other bug was in the MaterialBoundaryUP0D predicate class that was
not properly handling the end of iteration. It is noted that when the
iter() and next() built-in functions are applied to Interface0DIterator,
it is no longer possible to reliably check the end of iteration by the
.is_end property of the iterator. Namely, the .is_end property works as
expected only when iteration is carried out in combination with the
conventional .increment() and .decrement() methods of the iterator. For
this reason the commit rBb408d8af31c9 was partly reverted to recover the
previous definition of MaterialBoundaryUP0D.

Commit Details:

Full Hash: eb8964fb7f19463acdf441592a29dbfc1ff3ab29
Parent Commit: 4b4ae83
Lines Changed: +16, -11

2 Modified Paths:

/release/scripts/freestyle/modules/parameter_editor.py (+9, -9) (Diff)
/source/blender/freestyle/intern/python/BPy_Convert.cpp (+7, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021