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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-03-30 01:00:26 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-03-30 01:00:26 +0400
commitded03e34bf9a989f1ee4e0fe3e3f26f839394299 (patch)
tree6317864b52dd5fdc1d2f40a882ae8e9e57e5302b /source/blender/freestyle/intern/python/BPy_Convert.cpp
parent6dfcbf166b6892d52c14c0902a3d212ffed0b7f6 (diff)
* Added BPy_Chain_from_Chain_ptr().
* Changed BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ) to BPy_CurvePoint_from_CurvePoint_ptr( CurvePoint *cp ) so that it retains a CurvePoint pointer instead of a CurvePoint instance.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Convert.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp
index 4ae6ca53c89..8b26afd85a5 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp
@@ -13,6 +13,7 @@
#include "Interface1D/BPy_FEdge.h"
#include "Interface1D/BPy_Stroke.h"
#include "Interface1D/BPy_ViewEdge.h"
+#include "Interface1D/Curve/BPy_Chain.h"
#include "BPy_Nature.h"
#include "BPy_MediumType.h"
#include "BPy_SShape.h"
@@ -176,6 +177,14 @@ PyObject * BPy_ViewEdge_from_ViewEdge_ptr( ViewEdge* ve ) {
return py_ve;
}
+PyObject * BPy_Chain_from_Chain_ptr( Chain* c ) {
+ PyObject *py_c = Chain_Type.tp_new( &Chain_Type, 0, 0 );
+ ((BPy_Chain *) py_c)->c = c;
+ ((BPy_Chain *) py_c)->py_c.c = ((BPy_Chain *) py_c)->c;
+ ((BPy_Chain *) py_c)->py_c.py_if1D.if1D = ((BPy_Chain *) py_c)->c;
+ return py_c;
+}
+
PyObject * BPy_SShape_from_SShape( SShape& ss ) {
PyObject *py_ss = SShape_Type.tp_new( &SShape_Type, 0, 0 );
((BPy_SShape *) py_ss)->ss = new SShape( ss );
@@ -208,9 +217,10 @@ PyObject * BPy_IntegrationType_from_IntegrationType( int i ) {
return py_it;
}
-PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ) {
+PyObject * BPy_CurvePoint_from_CurvePoint_ptr( CurvePoint *cp ) {
PyObject *py_cp = CurvePoint_Type.tp_new( &CurvePoint_Type, 0, 0 );
- ((BPy_CurvePoint*) py_cp)->cp = new CurvePoint( cp );
+ ((BPy_CurvePoint*) py_cp)->cp = cp;
+ ((BPy_CurvePoint*) py_cp)->py_if0D.if0D = ((BPy_CurvePoint*) py_cp)->cp;
return py_cp;
}