[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15892] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python: soc-2008-mxcurioni: moved namespace collision resolution to the freestyle_init.py (for Curve, Material and Noise)

Maxime Curioni maxime.curioni at gmail.com
Thu Jul 31 13:59:15 CEST 2008


Revision: 15892
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15892
Author:   mxcurioni
Date:     2008-07-31 13:59:06 +0200 (Thu, 31 Jul 2008)

Log Message:
-----------
soc-2008-mxcurioni: moved namespace collision resolution to the freestyle_init.py (for Curve, Material and Noise)

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp

Added Paths:
-----------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Material.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Material.h

Removed Paths:
-------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_FrsMaterial.h

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp	2008-07-31 11:54:17 UTC (rev 15891)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp	2008-07-31 11:59:06 UTC (rev 15892)
@@ -1,7 +1,7 @@
 #include "BPy_Convert.h"
 
 #include "BPy_BBox.h"
-#include "BPy_FrsMaterial.h"
+#include "BPy_Material.h"
 #include "BPy_Id.h"
 #include "BPy_IntegrationType.h"
 #include "BPy_Interface0D.h"
@@ -188,9 +188,9 @@
 	return py_vs;
 }
 
-PyObject * BPy_FrsMaterial_from_Material( Material& m ){
-	PyObject *py_m = FrsMaterial_Type.tp_new( &FrsMaterial_Type, 0, 0 );
-	((BPy_FrsMaterial*) py_m)->m = new Material( m );
+PyObject * BPy_Material_from_Material( Material& m ){
+	PyObject *py_m = Material_Type.tp_new( &Material_Type, 0, 0 );
+	((BPy_Material*) py_m)->m = new Material( m );
 
 	return py_m;
 }

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h	2008-07-31 11:54:17 UTC (rev 15891)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h	2008-07-31 11:59:06 UTC (rev 15892)
@@ -76,7 +76,7 @@
 PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D );
 PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D );
 PyObject * BPy_IntegrationType_from_IntegrationType( int i );
-PyObject * BPy_FrsMaterial_from_Material( Material& m );
+PyObject * BPy_Material_from_Material( Material& m );
 PyObject * BPy_Nature_from_Nature( unsigned short n );
 PyObject * BPy_MediumType_from_MediumType( int n );
 PyObject * BPy_SShape_from_SShape( SShape& ss );

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp	2008-07-31 11:54:17 UTC (rev 15891)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp	2008-07-31 11:59:06 UTC (rev 15892)
@@ -3,7 +3,7 @@
 #include "BPy_BBox.h"
 #include "BPy_BinaryPredicate0D.h"
 #include "BPy_BinaryPredicate1D.h"
-#include "BPy_FrsMaterial.h"
+#include "BPy_Material.h"
 #include "BPy_Id.h"
 #include "BPy_IntegrationType.h"
 #include "BPy_Interface0D.h"
@@ -147,7 +147,7 @@
 	BBox_Init( module );
 	BinaryPredicate0D_Init( module );
 	BinaryPredicate1D_Init( module );
-	FrsMaterial_Init( module );
+	Material_Init( module );
 	Id_Init( module );
 	IntegrationType_Init( module );
 	Interface0D_Init( module );

Deleted: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp	2008-07-31 11:54:17 UTC (rev 15891)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp	2008-07-31 11:59:06 UTC (rev 15892)
@@ -1,407 +0,0 @@
-#include "BPy_FrsMaterial.h"
-
-#include "BPy_Convert.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-///////////////////////////////////////////////////////////////////////////////////////////
-
-/*---------------  Python API function prototypes for FrsMaterial instance  -----------*/
-static int FrsMaterial___init__(BPy_FrsMaterial *self, PyObject *args, PyObject *kwds);
-static void FrsMaterial___dealloc__(BPy_FrsMaterial *self);
-static PyObject * FrsMaterial___repr__(BPy_FrsMaterial *self);
-
-static PyObject * FrsMaterial_diffuse( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_diffuseR( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_diffuseG( BPy_FrsMaterial* self) ;
-static PyObject * FrsMaterial_diffuseB( BPy_FrsMaterial* self) ;
-static PyObject * FrsMaterial_diffuseA( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_specular( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_specularR( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_specularG( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_specularB( BPy_FrsMaterial* self) ;
-static PyObject * FrsMaterial_specularA( BPy_FrsMaterial* self) ;
-static PyObject * FrsMaterial_ambient( BPy_FrsMaterial* self) ;
-static PyObject * FrsMaterial_ambientR( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_ambientG( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_ambientB( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_ambientA( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_emission( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_emissionR( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_emissionG( BPy_FrsMaterial* self) ;
-static PyObject * FrsMaterial_emissionB( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_emissionA( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_shininess( BPy_FrsMaterial* self);
-static PyObject * FrsMaterial_setDiffuse( BPy_FrsMaterial *self, PyObject *args );
-static PyObject * FrsMaterial_setSpecular( BPy_FrsMaterial *self, PyObject *args );
-static PyObject * FrsMaterial_setAmbient( BPy_FrsMaterial *self, PyObject *args );
-static PyObject * FrsMaterial_setEmission( BPy_FrsMaterial *self, PyObject *args );
-static PyObject * FrsMaterial_setShininess( BPy_FrsMaterial *self, PyObject *args );
-
-/*----------------------FrsMaterial instance definitions ----------------------------*/
-static PyMethodDef BPy_FrsMaterial_methods[] = {
-	{"diffuse", ( PyCFunction ) FrsMaterial_diffuse, METH_NOARGS, "() Returns the diffuse color as a 4 float array"},
-	{"diffuseR", ( PyCFunction ) FrsMaterial_diffuseR, METH_NOARGS, "() Returns the red component of the diffuse color "},
-	{"diffuseG", ( PyCFunction ) FrsMaterial_diffuseG, METH_NOARGS, "() Returns the green component of the diffuse color "},
-	{"diffuseB", ( PyCFunction ) FrsMaterial_diffuseB, METH_NOARGS, "() Returns the blue component of the diffuse color "},
-	{"diffuseA", ( PyCFunction ) FrsMaterial_diffuseA, METH_NOARGS, "() Returns the alpha component of the diffuse color "},
-	{"specular", ( PyCFunction ) FrsMaterial_specular, METH_NOARGS, "() Returns the specular color as a 4 float array"},
-	{"specularR", ( PyCFunction ) FrsMaterial_specularR, METH_NOARGS, "() Returns the red component of the specular color "},
-	{"specularG", ( PyCFunction ) FrsMaterial_specularG, METH_NOARGS, "() Returns the green component of the specular color "},
-	{"specularB", ( PyCFunction ) FrsMaterial_specularB, METH_NOARGS, "() Returns the blue component of the specular color "},
-	{"specularA", ( PyCFunction ) FrsMaterial_specularA, METH_NOARGS, "() Returns the alpha component of the specular color "},
-	{"ambient", ( PyCFunction ) FrsMaterial_ambient, METH_NOARGS, "() Returns the ambient color as a 4 float array"},
-	{"ambientR", ( PyCFunction ) FrsMaterial_ambientR, METH_NOARGS, "() Returns the red component of the ambient color "},
-	{"ambientG", ( PyCFunction ) FrsMaterial_ambientG, METH_NOARGS, "() Returns the green component of the ambient color "},
-	{"ambientB", ( PyCFunction ) FrsMaterial_ambientB, METH_NOARGS, "() Returns the blue component of the ambient color "},
-	{"ambientA", ( PyCFunction ) FrsMaterial_ambientA, METH_NOARGS, "() Returns the alpha component of the ambient color "},
-	{"emission", ( PyCFunction ) FrsMaterial_emission, METH_NOARGS, "() Returns the emission color as a 4 float array"},
-	{"emissionR", ( PyCFunction ) FrsMaterial_emissionR, METH_NOARGS, "() Returns the red component of the emission color "},
-	{"emissionG", ( PyCFunction ) FrsMaterial_emissionG, METH_NOARGS, "() Returns the green component of the emission color "},
-	{"emissionB", ( PyCFunction ) FrsMaterial_emissionB, METH_NOARGS, "() Returns the blue component of the emission color "},
-	{"emissionA", ( PyCFunction ) FrsMaterial_emissionA, METH_NOARGS, "() Returns the alpha component of the emission color "},
-	{"shininess", ( PyCFunction ) FrsMaterial_shininess, METH_NOARGS, "() Returns the shininess coefficient "},
-	{"setDiffuse", ( PyCFunction ) FrsMaterial_setDiffuse, METH_NOARGS, "(float r, float g, float b, float a) Sets the diffuse color"},
-	{"setSpecular", ( PyCFunction ) FrsMaterial_setSpecular, METH_NOARGS, "(float r, float g, float b, float a) Sets the specular color"},
-	{"setAmbient", ( PyCFunction ) FrsMaterial_setAmbient, METH_NOARGS, "(float r, float g, float b, float a) Sets the ambient color"},
-	{"setEmission", ( PyCFunction ) FrsMaterial_setEmission, METH_NOARGS, "(float r, float g, float b, float a) Sets the emission color"},
-	{"setShininess", ( PyCFunction ) FrsMaterial_setShininess, METH_NOARGS, "(float r, float g, float b, float a) Sets the shininess color"},
-	{NULL, NULL, 0, NULL}
-};
-
-/*-----------------------BPy_FrsMaterial type definition ------------------------------*/
-
-PyTypeObject FrsMaterial_Type = {
-	PyObject_HEAD_INIT( NULL ) 
-	0,							/* ob_size */
-	"FrsMaterial",				/* tp_name */
-	sizeof( BPy_FrsMaterial ),	/* tp_basicsize */
-	0,							/* tp_itemsize */
-	
-	/* methods */
-	(destructor)FrsMaterial___dealloc__,	/* tp_dealloc */
-	NULL,                       				/* printfunc tp_print; */
-	NULL,                       				/* getattrfunc tp_getattr; */
-	NULL,                       				/* setattrfunc tp_setattr; */
-	NULL,										/* tp_compare */
-	(reprfunc)FrsMaterial___repr__,					/* tp_repr */
-
-	/* Method suites for standard classes */
-
-	NULL,                       /* PyNumberMethods *tp_as_number; */
-	NULL,                       /* PySequenceMethods *tp_as_sequence; */
-	NULL,                       /* PyMappingMethods *tp_as_mapping; */
-
-	/* More standard operations (here for binary compatibility) */
-
-	NULL,						/* hashfunc tp_hash; */
-	NULL,                       /* ternaryfunc tp_call; */
-	NULL,                       /* reprfunc tp_str; */
-	NULL,                       /* getattrofunc tp_getattro; */
-	NULL,                       /* setattrofunc tp_setattro; */
-
-	/* Functions to access object as input/output buffer */
-	NULL,                       /* PyBufferProcs *tp_as_buffer; */
-

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list