OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
| 3 * |
| 4 * This program is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU General Public License |
| 6 * as published by the Free Software Foundation; either version 2 |
| 7 * of the License, or (at your option) any later version. |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software Foundation, |
| 16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 * |
| 18 * The Original Code is Copyright (C) 2010 Blender Foundation. |
| 19 * All rights reserved. |
| 20 * |
| 21 * The Original Code is: all of this file. |
| 22 * |
| 23 * Contributor(s): none yet. |
| 24 * |
| 25 * ***** END GPL LICENSE BLOCK ***** |
| 26 */ |
| 27 |
| 28 /** \file source/blender/freestyle/intern/python/BPy_MediumType.cpp |
| 29 * \ingroup freestyle |
| 30 */ |
| 31 |
| 32 #include "BPy_MediumType.h" |
| 33 |
| 34 #include "BPy_Convert.h" |
| 35 |
| 36 #ifdef __cplusplus |
| 37 extern "C" { |
| 38 #endif |
| 39 |
| 40 ////////////////////////////////////////////////////////////////////////////////
/////////// |
| 41 |
| 42 /*-----------------------BPy_MediumType type definition ------------------------
------*/ |
| 43 |
| 44 PyDoc_STRVAR(MediumType_doc, |
| 45 "Class hierarchy: int > :class:`MediumType`\n" |
| 46 "\n" |
| 47 "The different blending modes available to similate the interaction\n" |
| 48 "media-medium:\n" |
| 49 "\n" |
| 50 "* Stroke.DRY_MEDIUM: To simulate a dry medium such as Pencil or Charcoal.\n" |
| 51 "* Stroke.HUMID_MEDIUM: To simulate ink painting (color substraction blending).\
n" |
| 52 "* Stroke.OPAQUE_MEDIUM: To simulate an opaque medium (oil, spray...)."); |
| 53 |
| 54 PyTypeObject MediumType_Type = { |
| 55 PyVarObject_HEAD_INIT(NULL, 0) |
| 56 "MediumType", /* tp_name */ |
| 57 sizeof(PyLongObject), /* tp_basicsize */ |
| 58 0, /* tp_itemsize */ |
| 59 0, /* tp_dealloc */ |
| 60 0, /* tp_print */ |
| 61 0, /* tp_getattr */ |
| 62 0, /* tp_setattr */ |
| 63 0, /* tp_reserved */ |
| 64 0, /* tp_repr */ |
| 65 0, /* tp_as_number */ |
| 66 0, /* tp_as_sequence */ |
| 67 0, /* tp_as_mapping */ |
| 68 0, /* tp_hash */ |
| 69 0, /* tp_call */ |
| 70 0, /* tp_str */ |
| 71 0, /* tp_getattro */ |
| 72 0, /* tp_setattro */ |
| 73 0, /* tp_as_buffer */ |
| 74 Py_TPFLAGS_DEFAULT, /* tp_flags */ |
| 75 MediumType_doc, /* tp_doc */ |
| 76 0, /* tp_traverse */ |
| 77 0, /* tp_clear */ |
| 78 0, /* tp_richcompare */ |
| 79 0, /* tp_weaklistoffset */ |
| 80 0, /* tp_iter */ |
| 81 0, /* tp_iternext */ |
| 82 0, /* tp_methods */ |
| 83 0, /* tp_members */ |
| 84 0, /* tp_getset */ |
| 85 &PyLong_Type, /* tp_base */ |
| 86 0, /* tp_dict */ |
| 87 0, /* tp_descr_get */ |
| 88 0, /* tp_descr_set */ |
| 89 0, /* tp_dictoffset */ |
| 90 0, /* tp_init */ |
| 91 0, /* tp_alloc */ |
| 92 0, /* tp_new */ |
| 93 }; |
| 94 |
| 95 /*-----------------------BPy_IntegrationType instance definitions --------------
-----------*/ |
| 96 |
| 97 PyLongObject _BPy_MediumType_DRY_MEDIUM = { |
| 98 PyVarObject_HEAD_INIT(&MediumType_Type, 1) |
| 99 { Stroke::DRY_MEDIUM } |
| 100 }; |
| 101 PyLongObject _BPy_MediumType_HUMID_MEDIUM = { |
| 102 PyVarObject_HEAD_INIT(&MediumType_Type, 1) |
| 103 { Stroke::HUMID_MEDIUM } |
| 104 }; |
| 105 PyLongObject _BPy_MediumType_OPAQUE_MEDIUM = { |
| 106 PyVarObject_HEAD_INIT(&MediumType_Type, 1) |
| 107 { Stroke::OPAQUE_MEDIUM } |
| 108 }; |
| 109 |
| 110 //-------------------MODULE INITIALIZATION-------------------------------- |
| 111 |
| 112 int MediumType_Init(PyObject *module) |
| 113 {······· |
| 114 if (module == NULL) |
| 115 return -1; |
| 116 |
| 117 if (PyType_Ready(&MediumType_Type) < 0) |
| 118 return -1; |
| 119 Py_INCREF(&MediumType_Type); |
| 120 PyModule_AddObject(module, "MediumType", (PyObject *)&MediumType_Type); |
| 121 |
| 122 return 0; |
| 123 } |
| 124 |
| 125 ////////////////////////////////////////////////////////////////////////////////
/////////// |
| 126 |
| 127 #ifdef __cplusplus |
| 128 } |
| 129 #endif |
OLD | NEW |