* freestyle_init.py: Removed all classes for wrapping extension types.

This allows users to test the types of those objects that are returned
by API functions, by means of usual Python idioms such as "type(I) is T"
and "isinstance(I, T)".

* Removed all occurrences of ViewVertex::castToTVertex() in the following
modules and rewrote the code segments using it by means of the "type(I)
is T" idiom mentioned above:

  ChainingIterators.py
  PredicatesU1D.py

* Replaced all occurrences of vector.Vec2, vector.Vec3, Vec2f and Vec3f
by Blender.Mathutils.Vector in the following modules:

  anisotropic_diffusion.py
  Functions0D.py
  shaders.py
  sketchy_topology_broken.py

* shaders.py: Fixed NameError's concerning math.pow().

* shaders.py: Added a Python equivalent of getFEdge function, defined
in source\blender\freestyle\intern\view_map\Functions0D.cpp as follows:

  FEdge* Functions0D::getFEdge(Interface0D& it1, Interface0D& it2) {
    return it1.getFEdge(it2);
  }

* shaders.py: Replaced fe.qi() by fe.viewedge().qi().

* contour.py: Fixed the import statement for freestyle_init.py.
This commit is contained in:
Tamito Kajiyama
2009-07-27 20:13:47 +00:00
parent fe5b6a556c
commit 9f79d8ae67
8 changed files with 150 additions and 619 deletions

View File

@@ -62,7 +62,7 @@ class pyViewMapGradientVectorF0D(UnaryFunction0DVec2f):
p = iter.getObject().getPoint2D()
gx = ReadCompleteViewMapPixelCF(self._l, int(p.x()+self._step), int(p.y()))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()))
gy = ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()+self._step))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()))
return Vec2f(gx, gy)
return Vector(gx, gy)
class pyViewMapGradientNormF0D(UnaryFunction0DDouble):
def __init__(self, l):
@@ -75,7 +75,7 @@ class pyViewMapGradientNormF0D(UnaryFunction0DDouble):
p = iter.getObject().getPoint2D()
gx = ReadCompleteViewMapPixelCF(self._l, int(p.x()+self._step), int(p.y()))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()))
gy = ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()+self._step))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()))
grad = Vec2f(gx, gy)
return grad.norm()
grad = Vector(gx, gy)
return grad.length