The python export class for Material. More...
#include <MaterialPy.h>
Public Types | |
typedef Material * | PointerType |
Public Member Functions | |
PyObject * | _getattr (char *attr) |
GetAttribute implementation This method implements the retriavel of object attributes. | |
virtual PyObject * | _repr (void) |
_repr method Overide this method to return a string object with some invormation about the object. | |
int | _setattr (char *attr, PyObject *value) |
SetAttribute implementation This method implements the seting of object attributes. | |
PyObject * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
Material * | getMaterialPtr (void) const |
getter for the object handled by this class | |
virtual PyParentObject * | GetParents (void) |
virtual PyTypeObject * | GetType (void) |
MaterialPy (Material *pcObject, PyTypeObject *T=&Type) | |
virtual int | PyInit (PyObject *args, PyObject *k) |
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor). | |
std::string | representation (void) const |
int | setCustomAttributes (const char *attr, PyObject *obj) |
setter for special attributes (e.g. dynamic ones) | |
~MaterialPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of MaterialPy. | |
static PyMethodDef | Methods [] |
Methods structure of MaterialPy. | |
static PyParentObject | Parents [] = { PARENTSAppMaterialPy } |
static PyTypeObject | Type |
Type structure of MaterialPy. | |
callbacks and implementers for the python object attributes | |
| |
Py::Tuple | getAmbientColor (void) const |
getter for the AmbientColor attribute | |
Py::Tuple | getDiffuseColor (void) const |
getter for the DiffuseColor attribute | |
Py::Tuple | getEmissiveColor (void) const |
getter for the EmissiveColor attribute | |
Py::Float | getShininess (void) const |
getter for the Shininess attribute | |
Py::Tuple | getSpecularColor (void) const |
getter for the SpecularColor attribute | |
Py::Float | getTransparency (void) const |
getter for the Transparency attribute | |
void | setAmbientColor (Py::Tuple arg) |
setter for the AmbientColor attribute | |
void | setDiffuseColor (Py::Tuple arg) |
setter for the DiffuseColor attribute | |
void | setEmissiveColor (Py::Tuple arg) |
setter for the EmissiveColor attribute | |
void | setShininess (Py::Float arg) |
setter for the Shininess attribute | |
void | setSpecularColor (Py::Tuple arg) |
setter for the SpecularColor attribute | |
void | setTransparency (Py::Float arg) |
setter for the Transparency attribute | |
static PyObject * | staticCallback_getAmbientColor (PyObject *self, void *closure) |
getter callback for the AmbientColor attribute | |
static PyObject * | staticCallback_getDiffuseColor (PyObject *self, void *closure) |
getter callback for the DiffuseColor attribute | |
static PyObject * | staticCallback_getEmissiveColor (PyObject *self, void *closure) |
getter callback for the EmissiveColor attribute | |
static PyObject * | staticCallback_getShininess (PyObject *self, void *closure) |
getter callback for the Shininess attribute | |
static PyObject * | staticCallback_getSpecularColor (PyObject *self, void *closure) |
getter callback for the SpecularColor attribute | |
static PyObject * | staticCallback_getTransparency (PyObject *self, void *closure) |
getter callback for the Transparency attribute | |
static int | staticCallback_setAmbientColor (PyObject *self, PyObject *value, void *closure) |
setter callback for the AmbientColor attribute | |
static int | staticCallback_setDiffuseColor (PyObject *self, PyObject *value, void *closure) |
setter callback for the DiffuseColor attribute | |
static int | staticCallback_setEmissiveColor (PyObject *self, PyObject *value, void *closure) |
setter callback for the EmissiveColor attribute | |
static int | staticCallback_setShininess (PyObject *self, PyObject *value, void *closure) |
setter callback for the Shininess attribute | |
static int | staticCallback_setSpecularColor (PyObject *self, PyObject *value, void *closure) |
setter callback for the SpecularColor attribute | |
static int | staticCallback_setTransparency (PyObject *self, PyObject *value, void *closure) |
setter callback for the Transparency attribute | |
callbacks and implementers for the python object methods | |
| |
PyObject * | set (PyObject *args) |
implementer for the set() method | |
static PyObject * | staticCallback_set (PyObject *self, PyObject *args) |
callback for the set() method |
The python export class for Material.
Definition at line 20 of file MaterialPy.h.
typedef Material* App::MaterialPy::PointerType |
Reimplemented from Base::PyObjectBase.
Definition at line 36 of file MaterialPy.h.
Definition at line 476 of file MaterialPy.cpp.
MaterialPy::~MaterialPy | ( | ) |
Definition at line 497 of file MaterialPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
PyObject * MaterialPy::_getattr | ( | char * | attr | ) | [virtual] |
GetAttribute implementation This method implements the retriavel of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class. Note: if you reimplement _gettattr() in a inheriting class you need to call the method of the base class! Otherwise even the methods of the object will disapiear!
Reimplemented from Base::PyObjectBase.
Definition at line 515 of file MaterialPy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * MaterialPy::_repr | ( | void | ) | [virtual] |
_repr method Overide this method to return a string object with some invormation about the object.
PyObject *MeshFeaturePy::_repr(void) { std::stringstream a; a << "MeshFeature: [ "; a << "some realy important info about the object!"; a << "]" << std::endl; return Py_BuildValue("s", a.str().c_str()); }
Reimplemented from Base::PyObjectBase.
Definition at line 507 of file MaterialPy.cpp.
References representation().
int MaterialPy::_setattr | ( | char * | attr, | |
PyObject * | value | |||
) | [virtual] |
SetAttribute implementation This method implements the seting of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class.
Reimplemented from Base::PyObjectBase.
Definition at line 583 of file MaterialPy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
Py::Tuple MaterialPy::getAmbientColor | ( | void | ) | const |
getter for the AmbientColor attribute
Definition at line 51 of file MaterialPyImp.cpp.
References getMaterialPtr(), and Py::Tuple::setItem().
Referenced by staticCallback_getAmbientColor().
PyObject * MaterialPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Definition at line 155 of file MaterialPyImp.cpp.
Referenced by _getattr().
Py::Tuple MaterialPy::getDiffuseColor | ( | void | ) | const |
getter for the DiffuseColor attribute
Definition at line 72 of file MaterialPyImp.cpp.
References getMaterialPtr(), and Py::Tuple::setItem().
Referenced by staticCallback_getDiffuseColor().
Py::Tuple MaterialPy::getEmissiveColor | ( | void | ) | const |
getter for the EmissiveColor attribute
Definition at line 93 of file MaterialPyImp.cpp.
References getMaterialPtr(), and Py::Tuple::setItem().
Referenced by staticCallback_getEmissiveColor().
Material * MaterialPy::getMaterialPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 642 of file MaterialPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by getAmbientColor(), getDiffuseColor(), getEmissiveColor(), getShininess(), getSpecularColor(), getTransparency(), set(), setAmbientColor(), setDiffuseColor(), setEmissiveColor(), setShininess(), setSpecularColor(), and setTransparency().
virtual PyParentObject* App::MaterialPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Definition at line 28 of file MaterialPy.h.
Py::Float MaterialPy::getShininess | ( | void | ) | const |
getter for the Shininess attribute
Definition at line 135 of file MaterialPyImp.cpp.
References getMaterialPtr().
Referenced by staticCallback_getShininess().
Py::Tuple MaterialPy::getSpecularColor | ( | void | ) | const |
getter for the SpecularColor attribute
Definition at line 114 of file MaterialPyImp.cpp.
References getMaterialPtr(), and Py::Tuple::setItem().
Referenced by staticCallback_getSpecularColor().
Py::Float MaterialPy::getTransparency | ( | void | ) | const |
getter for the Transparency attribute
Definition at line 145 of file MaterialPyImp.cpp.
References getMaterialPtr().
Referenced by staticCallback_getTransparency().
virtual PyTypeObject* App::MaterialPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Definition at line 27 of file MaterialPy.h.
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Base::PyObjectBase.
Definition at line 489 of file MaterialPy.cpp.
Definition at line 481 of file MaterialPy.cpp.
std::string MaterialPy::representation | ( | void | ) | const |
Definition at line 35 of file MaterialPyImp.cpp.
Referenced by _repr().
implementer for the set() method
Definition at line 40 of file MaterialPyImp.cpp.
References getMaterialPtr(), Py_Return, and App::Material::set().
void MaterialPy::setAmbientColor | ( | Py::Tuple | arg | ) |
setter for the AmbientColor attribute
Definition at line 61 of file MaterialPyImp.cpp.
References App::Color::a, App::Material::ambientColor, App::Color::b, App::Color::g, Py::SeqBase< T >::getItem(), getMaterialPtr(), App::Color::r, and Py::SeqBase< T >::size().
int MaterialPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Definition at line 160 of file MaterialPyImp.cpp.
Referenced by _setattr().
void MaterialPy::setDiffuseColor | ( | Py::Tuple | arg | ) |
setter for the DiffuseColor attribute
Definition at line 82 of file MaterialPyImp.cpp.
References App::Color::a, App::Color::b, App::Material::diffuseColor, App::Color::g, Py::SeqBase< T >::getItem(), getMaterialPtr(), App::Color::r, and Py::SeqBase< T >::size().
void MaterialPy::setEmissiveColor | ( | Py::Tuple | arg | ) |
setter for the EmissiveColor attribute
Definition at line 103 of file MaterialPyImp.cpp.
References App::Color::a, App::Color::b, App::Material::emissiveColor, App::Color::g, Py::SeqBase< T >::getItem(), getMaterialPtr(), App::Color::r, and Py::SeqBase< T >::size().
void MaterialPy::setShininess | ( | Py::Float | arg | ) |
setter for the Shininess attribute
Definition at line 140 of file MaterialPyImp.cpp.
References getMaterialPtr(), and App::Material::shininess.
void MaterialPy::setSpecularColor | ( | Py::Tuple | arg | ) |
setter for the SpecularColor attribute
Definition at line 124 of file MaterialPyImp.cpp.
References App::Color::a, App::Color::b, App::Color::g, Py::SeqBase< T >::getItem(), getMaterialPtr(), App::Color::r, Py::SeqBase< T >::size(), and App::Material::specularColor.
void MaterialPy::setTransparency | ( | Py::Float | arg | ) |
setter for the Transparency attribute
Definition at line 150 of file MaterialPyImp.cpp.
References getMaterialPtr(), and App::Material::transparency.
getter callback for the AmbientColor attribute
Definition at line 205 of file MaterialPy.cpp.
References getAmbientColor(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the DiffuseColor attribute
Definition at line 249 of file MaterialPy.cpp.
References getDiffuseColor(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the EmissiveColor attribute
Definition at line 293 of file MaterialPy.cpp.
References getEmissiveColor(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Shininess attribute
Definition at line 381 of file MaterialPy.cpp.
References getShininess(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the SpecularColor attribute
Definition at line 337 of file MaterialPy.cpp.
References getSpecularColor(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Transparency attribute
Definition at line 425 of file MaterialPy.cpp.
References getTransparency(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
callback for the set() method
Definition at line 129 of file MaterialPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
int MaterialPy::staticCallback_setAmbientColor | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the AmbientColor attribute
Definition at line 223 of file MaterialPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int MaterialPy::staticCallback_setDiffuseColor | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the DiffuseColor attribute
Definition at line 267 of file MaterialPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int MaterialPy::staticCallback_setEmissiveColor | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the EmissiveColor attribute
Definition at line 311 of file MaterialPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int MaterialPy::staticCallback_setShininess | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Shininess attribute
Definition at line 399 of file MaterialPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int MaterialPy::staticCallback_setSpecularColor | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the SpecularColor attribute
Definition at line 355 of file MaterialPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int MaterialPy::staticCallback_setTransparency | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Transparency attribute
Definition at line 443 of file MaterialPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
PyGetSetDef MaterialPy::GetterSetter [static] |
Attribute structure of MaterialPy.
Definition at line 25 of file MaterialPy.h.
PyMethodDef MaterialPy::Methods [static] |
{ {"set", (PyCFunction) staticCallback_set, METH_VARARGS, "\nSet(string) -- Set the material.\n\nThe material must be one of the following values:\nBrass, Bronze, Copper, Gold, Pewter, Plaster, Plastic, Silver, Steel, Stone, Shiny plastic,\nSatin, Metalized, Neon GNC, Chrome, Aluminium, Obsidian, Neon PHC, Jade, Ruby or Emerald.\n " }, {NULL, NULL, 0, NULL} }
Methods structure of MaterialPy.
Reimplemented from Base::PyObjectBase.
Definition at line 24 of file MaterialPy.h.
Referenced by _getattr().
PyParentObject MaterialPy::Parents = { PARENTSAppMaterialPy } [static] |
Reimplemented from Base::PyObjectBase.
Definition at line 26 of file MaterialPy.h.
PyTypeObject MaterialPy::Type [static] |
Type structure of MaterialPy.
Reimplemented from Base::PyObjectBase.
Definition at line 23 of file MaterialPy.h.
Referenced by App::PropertyMaterial::setPyObject().