Commit Graph

8 Commits

Author SHA1 Message Date
ff110c17f7 Fixed argument checking in __init__ methods of Interface1D, Predicates,
Functions, and StrokeShader types.
2009-08-03 15:19:51 +00:00
6134a41270 Fixed typoes in error messages. 2009-07-31 21:44:59 +00:00
52f639277b Second attempt to fix a null pointer reference in deallocators of
built-in types (the first was in revision 21877).  When an exception
has raised within from the __init__ method of a user-defined class
derived from a built-in type (e.g., UnaryPredicate0D and
BinaryPredicate1D), some member variables of the base type are
left uninitialized, leading to a null pointer reference in the
"__dealloc__" function in the base type.  To avoid this, pointer
checking was added in the deallocators of those built-in types that
can be used to define a subclass by a user.
2009-07-26 20:20:25 +00:00
730fb1021c Made predicate and function types callable in the sense that
callable(I, T) returns True when I is an object of a type T or
of a subtype of T.  Also implemented a measure to avoid an
infinite loop when user-defined predicate and function classes
do not properly overload the __call__ method (including the
cases of directly instantiating the base classes such as
UnaryPredicate0D and BinaryPredicate1D).
2009-07-26 16:15:28 +00:00
0c7e5323e8 Improvements in error handling at Python-C++ boundaries. 2009-03-20 22:41:27 +00:00
Maxime Curioni
3010f2b753 soc-2008-mxcurioni: the native Python system now supports cross-language polymorphism for the following classes: BinaryPredicate0D (__call__), BinaryPredicate1D (__call__), UnaryPredicate0D (__call__), UnaryPredicate1D (__call__), StrokeShader (shade), ChainingIterator (init, traverse).
Other methods could easily be supported in the future. The method now works as planned for the contour style. For style modules with Python shaders, there still is a problem that I will fix right away.
2008-07-31 08:50:12 +00:00
Maxime Curioni
e4677c409d soc-2008-mxcurioni: add all predicate subclasses( BinaryPredicate1D, UnaryPredicate{0D,1D} ).
There is just one more class remaining to port (and probably the most important): Operators. After that, I'll be able to test whether Freestyle functions well without SWIG.
2008-07-28 22:53:42 +00:00
Maxime Curioni
a9789d90ae soc-2008-mxcurioni: renamed all Freestyle API related files with 'BPy_' prefix to avoid library name collision.
Included MediumType's initialization at proper time to avoid Blender's crash.
2008-07-23 07:56:08 +00:00