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
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-07-15 05:07:19 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-07-15 05:07:19 +0400
commit96e52b09da9c808a6d10526f2115178e8499ebec (patch)
treeb6336a0ecfe7d4d269ecdfd4c4f223f2588f638b /source/blender/freestyle/intern/view_map/Interface1D.h
parent8398730043faeb9af860ca7a408a5a4ba49b46f1 (diff)
soc-2008-mxcurioni: Reimplemented the Freestyle Python API's files to be correctly used as classes and not submodules. Added and integrated object lifecycle functions (__new__, __alloc__, __repr__) for the previous classes: BinaryPredicate0D, BinaryPredicate1D, Id, Interface0D, Interface1D. All of these classes were tested within Blender's Python interpreter with simple test cases and their getter/setters were corrected.
Interface0DIterator was modified to allow BPy_Interface1D to be instantiated: verticesBegin(), verticesEnd(), pointsBegin(float) and pointsEnd(float) are not pure virtual functions anymore. If they are called directly from BPy_Interface1D (instead of its subclasses), an error message is displayed.
Diffstat (limited to 'source/blender/freestyle/intern/view_map/Interface1D.h')
-rwxr-xr-xsource/blender/freestyle/intern/view_map/Interface1D.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h
index 96dd94c36f9..8c75afc73df 100755
--- a/source/blender/freestyle/intern/view_map/Interface1D.h
+++ b/source/blender/freestyle/intern/view_map/Interface1D.h
@@ -139,11 +139,19 @@ public:
/*! Returns an iterator over the Interface1D vertices,
* pointing to the first vertex.
*/
- virtual Interface0DIterator verticesBegin() = 0;
+ virtual Interface0DIterator verticesBegin() {
+ cerr << "Warning: method verticesBegin() not implemented" << endl;
+ return Interface0DIterator();
+ }
+
/*! Returns an iterator over the Interface1D vertices,
* pointing after the last vertex.
*/
- virtual Interface0DIterator verticesEnd() = 0;
+ virtual Interface0DIterator verticesEnd(){
+ cerr << "Warning: method verticesEnd() not implemented" << endl;
+ return Interface0DIterator();
+ }
+
/*! Returns an iterator over the Interface1D points,
* pointing to the first point. The difference with
* verticesBegin() is that here we can iterate over
@@ -153,7 +161,11 @@ public:
* The sampling with which we want to iterate over points of
* this 1D element.
*/
- virtual Interface0DIterator pointsBegin(float t=0.f) = 0;
+ virtual Interface0DIterator pointsBegin(float t=0.f) {
+ cerr << "Warning: method pointsBegin() not implemented" << endl;
+ return Interface0DIterator();
+ }
+
/*! Returns an iterator over the Interface1D points,
* pointing after the last point. The difference with
* verticesEnd() is that here we can iterate over
@@ -163,7 +175,10 @@ public:
* The sampling with which we want to iterate over points of
* this 1D element.
*/
- virtual Interface0DIterator pointsEnd(float t=0.f) = 0;
+ virtual Interface0DIterator pointsEnd(float t=0.f) {
+ cerr << "Warning: method pointsEnd() not implemented" << endl;
+ return Interface0DIterator();
+ }
// Data access methods