Blender  V2.93
BPy_Freestyle.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include "BPy_Freestyle.h"
22 
23 #include "BPy_BBox.h"
24 #include "BPy_BinaryPredicate0D.h"
25 #include "BPy_BinaryPredicate1D.h"
26 #include "BPy_ContextFunctions.h"
27 #include "BPy_Convert.h"
28 #include "BPy_FrsMaterial.h"
29 #include "BPy_FrsNoise.h"
30 #include "BPy_Id.h"
31 #include "BPy_IntegrationType.h"
32 #include "BPy_Interface0D.h"
33 #include "BPy_Interface1D.h"
34 #include "BPy_Iterator.h"
35 #include "BPy_MediumType.h"
36 #include "BPy_Nature.h"
37 #include "BPy_Operators.h"
38 #include "BPy_SShape.h"
39 #include "BPy_StrokeAttribute.h"
40 #include "BPy_StrokeShader.h"
41 #include "BPy_UnaryFunction0D.h"
42 #include "BPy_UnaryFunction1D.h"
43 #include "BPy_UnaryPredicate0D.h"
44 #include "BPy_UnaryPredicate1D.h"
45 #include "BPy_ViewMap.h"
46 #include "BPy_ViewShape.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
53 
54 //------------------------ MODULE FUNCTIONS ----------------------------------
55 
56 #include "BKE_appdir.h"
57 #include "DNA_scene_types.h"
58 #include "FRS_freestyle.h"
59 #include "RNA_access.h"
60 #include "bpy_rna.h" /* pyrna_struct_CreatePyObject() */
61 
63  ".. function:: getCurrentScene()\n"
64  "\n"
65  " Returns the current scene.\n"
66  "\n"
67  " :return: The current scene.\n"
68  " :rtype: :class:`bpy.types.Scene`\n";
69 
70 static PyObject *Freestyle_getCurrentScene(PyObject * /*self*/)
71 {
73  if (!scene) {
74  PyErr_SetString(PyExc_TypeError, "current scene not available");
75  return nullptr;
76  }
77  PointerRNA ptr_scene;
78  RNA_pointer_create(&scene->id, &RNA_Scene, scene, &ptr_scene);
79  return pyrna_struct_CreatePyObject(&ptr_scene);
80 }
81 
82 #include "DNA_material_types.h"
83 
84 static int ramp_blend_type(const char *type)
85 {
86  if (STREQ(type, "MIX")) {
87  return MA_RAMP_BLEND;
88  }
89  if (STREQ(type, "ADD")) {
90  return MA_RAMP_ADD;
91  }
92  if (STREQ(type, "MULTIPLY")) {
93  return MA_RAMP_MULT;
94  }
95  if (STREQ(type, "SUBTRACT")) {
96  return MA_RAMP_SUB;
97  }
98  if (STREQ(type, "SCREEN")) {
99  return MA_RAMP_SCREEN;
100  }
101  if (STREQ(type, "DIVIDE")) {
102  return MA_RAMP_DIV;
103  }
104  if (STREQ(type, "DIFFERENCE")) {
105  return MA_RAMP_DIFF;
106  }
107  if (STREQ(type, "DARKEN")) {
108  return MA_RAMP_DARK;
109  }
110  if (STREQ(type, "LIGHTEN")) {
111  return MA_RAMP_LIGHT;
112  }
113  if (STREQ(type, "OVERLAY")) {
114  return MA_RAMP_OVERLAY;
115  }
116  if (STREQ(type, "DODGE")) {
117  return MA_RAMP_DODGE;
118  }
119  if (STREQ(type, "BURN")) {
120  return MA_RAMP_BURN;
121  }
122  if (STREQ(type, "HUE")) {
123  return MA_RAMP_HUE;
124  }
125  if (STREQ(type, "SATURATION")) {
126  return MA_RAMP_SAT;
127  }
128  if (STREQ(type, "VALUE")) {
129  return MA_RAMP_VAL;
130  }
131  if (STREQ(type, "COLOR")) {
132  return MA_RAMP_COLOR;
133  }
134  if (STREQ(type, "SOFT_LIGHT")) {
135  return MA_RAMP_SOFT;
136  }
137  if (STREQ(type, "LINEAR_LIGHT")) {
138  return MA_RAMP_LINEAR;
139  }
140  return -1;
141 }
142 
143 #include "BKE_material.h" /* ramp_blend() */
144 
146  ".. function:: blendRamp(type, color1, fac, color2)\n"
147  "\n"
148  " Blend two colors according to a ramp blend type.\n"
149  "\n"
150  " :arg type: Ramp blend type.\n"
151  " :type type: int\n"
152  " :arg color1: 1st color.\n"
153  " :type color1: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n"
154  " :arg fac: Blend factor.\n"
155  " :type fac: float\n"
156  " :arg color2: 1st color.\n"
157  " :type color2: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n"
158  " :return: Blended color in RGB format.\n"
159  " :rtype: :class:`mathutils.Vector`\n";
160 
161 static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args)
162 {
163  PyObject *obj1, *obj2;
164  char *s;
165  int type;
166  float a[3], fac, b[3];
167 
168  if (!PyArg_ParseTuple(args, "sOfO", &s, &obj1, &fac, &obj2)) {
169  return nullptr;
170  }
171  type = ramp_blend_type(s);
172  if (type < 0) {
173  PyErr_SetString(PyExc_TypeError, "argument 1 is an unknown ramp blend type");
174  return nullptr;
175  }
177  3,
178  3,
179  obj1,
180  "argument 2 must be a 3D vector "
181  "(either a tuple/list of 3 elements or Vector)") == -1) {
182  return nullptr;
183  }
184  if (mathutils_array_parse(b,
185  3,
186  3,
187  obj2,
188  "argument 4 must be a 3D vector "
189  "(either a tuple/list of 3 elements or Vector)") == -1) {
190  return nullptr;
191  }
192  ramp_blend(type, a, fac, b);
193  return Vector_CreatePyObject(a, 3, nullptr);
194 }
195 
196 #include "BKE_colorband.h" /* BKE_colorband_evaluate() */
197 
199  ".. function:: evaluateColorRamp(ramp, in)\n"
200  "\n"
201  " Evaluate a color ramp at a point in the interval 0 to 1.\n"
202  "\n"
203  " :arg ramp: Color ramp object.\n"
204  " :type ramp: :class:`bpy.types.ColorRamp`\n"
205  " :arg in: Value in the interval 0 to 1.\n"
206  " :type in: float\n"
207  " :return: color in RGBA format.\n"
208  " :rtype: :class:`mathutils.Vector`\n";
209 
210 static PyObject *Freestyle_evaluateColorRamp(PyObject * /*self*/, PyObject *args)
211 {
212  BPy_StructRNA *py_srna;
213  ColorBand *coba;
214  float in, out[4];
215 
216  if (!(PyArg_ParseTuple(args, "O!f", &pyrna_struct_Type, &py_srna, &in))) {
217  return nullptr;
218  }
219  if (!RNA_struct_is_a(py_srna->ptr.type, &RNA_ColorRamp)) {
220  PyErr_SetString(PyExc_TypeError, "1st argument is not a ColorRamp object");
221  return nullptr;
222  }
223  coba = (ColorBand *)py_srna->ptr.data;
224  if (!BKE_colorband_evaluate(coba, in, out)) {
225  PyErr_SetString(PyExc_ValueError, "failed to evaluate the color ramp");
226  return nullptr;
227  }
228  return Vector_CreatePyObject(out, 4, nullptr);
229 }
230 
231 #include "BKE_colortools.h" /* BKE_curvemapping_evaluateF() */
232 #include "DNA_color_types.h"
233 
235  ".. function:: evaluateCurveMappingF(cumap, cur, value)\n"
236  "\n"
237  " Evaluate a curve mapping at a point in the interval 0 to 1.\n"
238  "\n"
239  " :arg cumap: Curve mapping object.\n"
240  " :type cumap: :class:`bpy.types.CurveMapping`\n"
241  " :arg cur: Index of the curve to be used (0 <= cur <= 3).\n"
242  " :type cur: int\n"
243  " :arg value: Input value in the interval 0 to 1.\n"
244  " :type value: float\n"
245  " :return: Mapped output value.\n"
246  " :rtype: float\n";
247 
248 static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *args)
249 {
250  BPy_StructRNA *py_srna;
251  CurveMapping *cumap;
252  int cur;
253  float value;
254 
255  if (!(PyArg_ParseTuple(args, "O!if", &pyrna_struct_Type, &py_srna, &cur, &value))) {
256  return nullptr;
257  }
258  if (!RNA_struct_is_a(py_srna->ptr.type, &RNA_CurveMapping)) {
259  PyErr_SetString(PyExc_TypeError, "1st argument is not a CurveMapping object");
260  return nullptr;
261  }
262  if (cur < 0 || cur > 3) {
263  PyErr_SetString(PyExc_ValueError, "2nd argument is out of range");
264  return nullptr;
265  }
266  cumap = (CurveMapping *)py_srna->ptr.data;
267  BKE_curvemapping_init(cumap);
268  /* disable extrapolation if enabled */
269  if ((cumap->flag & CUMA_EXTEND_EXTRAPOLATE)) {
270  cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
271  BKE_curvemapping_changed(cumap, false);
272  }
273  return PyFloat_FromDouble(BKE_curvemapping_evaluateF(cumap, cur, value));
274 }
275 
276 /*-----------------------Freestyle module docstring----------------------------*/
277 
278 static char module_docstring[] =
279  "This module provides classes for defining line drawing rules (such as\n"
280  "predicates, functions, chaining iterators, and stroke shaders), as well\n"
281  "as helper functions for style module writing.\n"
282  "\n"
283  "Class hierarchy:\n"
284  "\n"
285  "- :class:`BBox`\n"
286  "- :class:`BinaryPredicate0D`\n"
287  "- :class:`BinaryPredicate1D`\n"
288  "\n"
289  " - :class:`FalseBP1D`\n"
290  " - :class:`Length2DBP1D`\n"
291  " - :class:`SameShapeIdBP1D`\n"
292  " - :class:`TrueBP1D`\n"
293  " - :class:`ViewMapGradientNormBP1D`\n"
294  "\n"
295  "- :class:`Id`\n"
296  "- :class:`Interface0D`\n"
297  "\n"
298  " - :class:`CurvePoint`\n"
299  "\n"
300  " - :class:`StrokeVertex`\n"
301  "\n"
302  " - :class:`SVertex`\n"
303  " - :class:`ViewVertex`\n"
304  "\n"
305  " - :class:`NonTVertex`\n"
306  " - :class:`TVertex`\n"
307  "\n"
308  "- :class:`Interface1D`\n"
309  "\n"
310  " - :class:`Curve`\n"
311  "\n"
312  " - :class:`Chain`\n"
313  "\n"
314  " - :class:`FEdge`\n"
315  "\n"
316  " - :class:`FEdgeSharp`\n"
317  " - :class:`FEdgeSmooth`\n"
318  "\n"
319  " - :class:`Stroke`\n"
320  " - :class:`ViewEdge`\n"
321  "\n"
322  "- :class:`Iterator`\n"
323  "\n"
324  " - :class:`AdjacencyIterator`\n"
325  " - :class:`CurvePointIterator`\n"
326  " - :class:`Interface0DIterator`\n"
327  " - :class:`SVertexIterator`\n"
328  " - :class:`StrokeVertexIterator`\n"
329  " - :class:`ViewEdgeIterator`\n"
330  "\n"
331  " - :class:`ChainingIterator`\n"
332  "\n"
333  " - :class:`ChainPredicateIterator`\n"
334  " - :class:`ChainSilhouetteIterator`\n"
335  "\n"
336  " - :class:`orientedViewEdgeIterator`\n"
337  "\n"
338  "- :class:`Material`\n"
339  "- :class:`Noise`\n"
340  "- :class:`Operators`\n"
341  "- :class:`SShape`\n"
342  "- :class:`StrokeAttribute`\n"
343  "- :class:`StrokeShader`\n"
344  "\n"
345  " - :class:`BackboneStretcherShader`\n"
346  " - :class:`BezierCurveShader`\n"
347  " - :class:`BlenderTextureShader`\n"
348  " - :class:`CalligraphicShader`\n"
349  " - :class:`ColorNoiseShader`\n"
350  " - :class:`ColorVariationPatternShader`\n"
351  " - :class:`ConstantColorShader`\n"
352  " - :class:`ConstantThicknessShader`\n"
353  " - :class:`ConstrainedIncreasingThicknessShader`\n"
354  " - :class:`GuidingLinesShader`\n"
355  " - :class:`IncreasingColorShader`\n"
356  " - :class:`IncreasingThicknessShader`\n"
357  " - :class:`PolygonalizationShader`\n"
358  " - :class:`SamplingShader`\n"
359  " - :class:`SmoothingShader`\n"
360  " - :class:`SpatialNoiseShader`\n"
361  " - :class:`StrokeTextureShader`\n"
362  " - :class:`StrokeTextureStepShader`\n"
363  " - :class:`TextureAssignerShader`\n"
364  " - :class:`ThicknessNoiseShader`\n"
365  " - :class:`ThicknessVariationPatternShader`\n"
366  " - :class:`TipRemoverShader`\n"
367  " - :class:`fstreamShader`\n"
368  " - :class:`streamShader`\n"
369  "\n"
370  "- :class:`UnaryFunction0D`\n"
371  "\n"
372  " - :class:`UnaryFunction0DDouble`\n"
373  "\n"
374  " - :class:`Curvature2DAngleF0D`\n"
375  " - :class:`DensityF0D`\n"
376  " - :class:`GetProjectedXF0D`\n"
377  " - :class:`GetProjectedYF0D`\n"
378  " - :class:`GetProjectedZF0D`\n"
379  " - :class:`GetXF0D`\n"
380  " - :class:`GetYF0D`\n"
381  " - :class:`GetZF0D`\n"
382  " - :class:`LocalAverageDepthF0D`\n"
383  " - :class:`ZDiscontinuityF0D`\n"
384  "\n"
385  " - :class:`UnaryFunction0DEdgeNature`\n"
386  "\n"
387  " - :class:`CurveNatureF0D`\n"
388  "\n"
389  " - :class:`UnaryFunction0DFloat`\n"
390  "\n"
391  " - :class:`GetCurvilinearAbscissaF0D`\n"
392  " - :class:`GetParameterF0D`\n"
393  " - :class:`GetViewMapGradientNormF0D`\n"
394  " - :class:`ReadCompleteViewMapPixelF0D`\n"
395  " - :class:`ReadMapPixelF0D`\n"
396  " - :class:`ReadSteerableViewMapPixelF0D`\n"
397  "\n"
398  " - :class:`UnaryFunction0DId`\n"
399  "\n"
400  " - :class:`ShapeIdF0D`\n"
401  "\n"
402  " - :class:`UnaryFunction0DMaterial`\n"
403  "\n"
404  " - :class:`MaterialF0D`\n"
405  "\n"
406  " - :class:`UnaryFunction0DUnsigned`\n"
407  "\n"
408  " - :class:`QuantitativeInvisibilityF0D`\n"
409  "\n"
410  " - :class:`UnaryFunction0DVec2f`\n"
411  "\n"
412  " - :class:`Normal2DF0D`\n"
413  " - :class:`VertexOrientation2DF0D`\n"
414  "\n"
415  " - :class:`UnaryFunction0DVec3f`\n"
416  "\n"
417  " - :class:`VertexOrientation3DF0D`\n"
418  "\n"
419  " - :class:`UnaryFunction0DVectorViewShape`\n"
420  "\n"
421  " - :class:`GetOccludersF0D`\n"
422  "\n"
423  " - :class:`UnaryFunction0DViewShape`\n"
424  "\n"
425  " - :class:`GetOccludeeF0D`\n"
426  " - :class:`GetShapeF0D`\n"
427  "\n"
428  "- :class:`UnaryFunction1D`\n"
429  "\n"
430  " - :class:`UnaryFunction1DDouble`\n"
431  "\n"
432  " - :class:`Curvature2DAngleF1D`\n"
433  " - :class:`DensityF1D`\n"
434  " - :class:`GetCompleteViewMapDensityF1D`\n"
435  " - :class:`GetDirectionalViewMapDensityF1D`\n"
436  " - :class:`GetProjectedXF1D`\n"
437  " - :class:`GetProjectedYF1D`\n"
438  " - :class:`GetProjectedZF1D`\n"
439  " - :class:`GetSteerableViewMapDensityF1D`\n"
440  " - :class:`GetViewMapGradientNormF1D`\n"
441  " - :class:`GetXF1D`\n"
442  " - :class:`GetYF1D`\n"
443  " - :class:`GetZF1D`\n"
444  " - :class:`LocalAverageDepthF1D`\n"
445  " - :class:`ZDiscontinuityF1D`\n"
446  "\n"
447  " - :class:`UnaryFunction1DEdgeNature`\n"
448  "\n"
449  " - :class:`CurveNatureF1D`\n"
450  "\n"
451  " - :class:`UnaryFunction1DFloat`\n"
452  " - :class:`UnaryFunction1DUnsigned`\n"
453  "\n"
454  " - :class:`QuantitativeInvisibilityF1D`\n"
455  "\n"
456  " - :class:`UnaryFunction1DVec2f`\n"
457  "\n"
458  " - :class:`Normal2DF1D`\n"
459  " - :class:`Orientation2DF1D`\n"
460  "\n"
461  " - :class:`UnaryFunction1DVec3f`\n"
462  "\n"
463  " - :class:`Orientation3DF1D`\n"
464  "\n"
465  " - :class:`UnaryFunction1DVectorViewShape`\n"
466  "\n"
467  " - :class:`GetOccludeeF1D`\n"
468  " - :class:`GetOccludersF1D`\n"
469  " - :class:`GetShapeF1D`\n"
470  "\n"
471  " - :class:`UnaryFunction1DVoid`\n"
472  "\n"
473  " - :class:`ChainingTimeStampF1D`\n"
474  " - :class:`IncrementChainingTimeStampF1D`\n"
475  " - :class:`TimeStampF1D`\n"
476  "\n"
477  "- :class:`UnaryPredicate0D`\n"
478  "\n"
479  " - :class:`FalseUP0D`\n"
480  " - :class:`TrueUP0D`\n"
481  "\n"
482  "- :class:`UnaryPredicate1D`\n"
483  "\n"
484  " - :class:`ContourUP1D`\n"
485  " - :class:`DensityLowerThanUP1D`\n"
486  " - :class:`EqualToChainingTimeStampUP1D`\n"
487  " - :class:`EqualToTimeStampUP1D`\n"
488  " - :class:`ExternalContourUP1D`\n"
489  " - :class:`FalseUP1D`\n"
490  " - :class:`QuantitativeInvisibilityUP1D`\n"
491  " - :class:`ShapeUP1D`\n"
492  " - :class:`TrueUP1D`\n"
493  " - :class:`WithinImageBoundaryUP1D`\n"
494  "\n"
495  "- :class:`ViewMap`\n"
496  "- :class:`ViewShape`\n"
497  "- :class:`IntegrationType`\n"
498  "- :class:`MediumType`\n"
499  "- :class:`Nature`\n"
500  "\n";
501 
502 /*-----------------------Freestyle module method def---------------------------*/
503 
504 static PyMethodDef module_functions[] = {
505  {"getCurrentScene",
506  (PyCFunction)Freestyle_getCurrentScene,
507  METH_NOARGS,
509  {"blendRamp", (PyCFunction)Freestyle_blendRamp, METH_VARARGS, Freestyle_blendRamp___doc__},
510  {"evaluateColorRamp",
511  (PyCFunction)Freestyle_evaluateColorRamp,
512  METH_VARARGS,
514  {"evaluateCurveMappingF",
515  (PyCFunction)Freestyle_evaluateCurveMappingF,
516  METH_VARARGS,
518  {nullptr, nullptr, 0, nullptr},
519 };
520 
521 /*-----------------------Freestyle module definition---------------------------*/
522 
523 static PyModuleDef module_definition = {
524  PyModuleDef_HEAD_INIT,
525  "_freestyle",
527  -1,
529 };
530 
531 //-------------------MODULE INITIALIZATION--------------------------------
532 PyObject *Freestyle_Init(void)
533 {
534  PyObject *module;
535 
536  // initialize modules
537  module = PyModule_Create(&module_definition);
538  if (!module) {
539  return nullptr;
540  }
541  PyDict_SetItemString(PySys_GetObject("modules"), module_definition.m_name, module);
542 
543  // update 'sys.path' for Freestyle Python API modules
544  const char *const path = BKE_appdir_folder_id(BLENDER_SYSTEM_SCRIPTS, "freestyle");
545  if (path) {
546  char modpath[FILE_MAX];
547  BLI_join_dirfile(modpath, sizeof(modpath), path, "modules");
548  PyObject *sys_path = PySys_GetObject("path"); /* borrow */
549  PyObject *py_modpath = PyUnicode_FromString(modpath);
550  PyList_Append(sys_path, py_modpath);
551  Py_DECREF(py_modpath);
552 #if 0
553  printf("Adding Python path: %s\n", modpath);
554 #endif
555  }
556  else {
557  printf(
558  "Freestyle: couldn't find 'scripts/freestyle/modules', Freestyle won't work properly.\n");
559  }
560 
561  // attach its classes (adding the object types to the module)
562 
563  // those classes have to be initialized before the others
566 
567  BBox_Init(module);
573  Id_Init(module);
588 
589  return module;
590 }
591 
593 
594 #ifdef __cplusplus
595 }
596 #endif
@ BLENDER_SYSTEM_SCRIPTS
Definition: BKE_appdir.h:88
const char * BKE_appdir_folder_id(const int folder_id, const char *subfolder)
Definition: appdir.c:674
bool BKE_colorband_evaluate(const struct ColorBand *coba, float in, float out[4])
void BKE_curvemapping_init(struct CurveMapping *cumap)
Definition: colortools.c:1200
float BKE_curvemapping_evaluateF(const struct CurveMapping *cumap, int cur, float value)
void BKE_curvemapping_changed(struct CurveMapping *cumap, const bool rem_doubles)
Definition: colortools.c:877
General operations, lookup, etc. for materials.
void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
Definition: material.c:1395
#define FILE_MAX
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
Definition: path_util.c:1737
#define STREQ(a, b)
int BBox_Init(PyObject *module)
Definition: BPy_BBox.cpp:33
int BinaryPredicate0D_Init(PyObject *module)
int BinaryPredicate1D_Init(PyObject *module)
int ContextFunctions_Init(PyObject *module)
PyObject * Freestyle_Init(void)
static PyObject * Freestyle_evaluateCurveMappingF(PyObject *, PyObject *args)
static int ramp_blend_type(const char *type)
static char Freestyle_evaluateCurveMappingF___doc__[]
static PyModuleDef module_definition
static char module_docstring[]
static char Freestyle_evaluateColorRamp___doc__[]
static PyObject * Freestyle_blendRamp(PyObject *, PyObject *args)
static char Freestyle_getCurrentScene___doc__[]
static char Freestyle_blendRamp___doc__[]
static PyObject * Freestyle_getCurrentScene(PyObject *)
static PyObject * Freestyle_evaluateColorRamp(PyObject *, PyObject *args)
static PyMethodDef module_functions[]
int FrsMaterial_Init(PyObject *module)
int FrsNoise_Init(PyObject *module)
int Id_Init(PyObject *module)
Definition: BPy_Id.cpp:34
int IntegrationType_Init(PyObject *module)
int Interface0D_Init(PyObject *module)
int Interface1D_Init(PyObject *module)
int Iterator_Init(PyObject *module)
int MediumType_Init(PyObject *module)
int Nature_Init(PyObject *module)
Definition: BPy_Nature.cpp:189
int Operators_Init(PyObject *module)
int SShape_Init(PyObject *module)
Definition: BPy_SShape.cpp:38
int StrokeAttribute_Init(PyObject *module)
int StrokeShader_Init(PyObject *module)
int UnaryFunction0D_Init(PyObject *module)
int UnaryFunction1D_Init(PyObject *module)
int UnaryPredicate0D_Init(PyObject *module)
int UnaryPredicate1D_Init(PyObject *module)
int ViewMap_Init(PyObject *module)
Definition: BPy_ViewMap.cpp:37
int ViewShape_Init(PyObject *module)
@ CUMA_EXTEND_EXTRAPOLATE
#define MA_RAMP_SUB
#define MA_RAMP_VAL
#define MA_RAMP_DIFF
#define MA_RAMP_DARK
#define MA_RAMP_BURN
#define MA_RAMP_LIGHT
#define MA_RAMP_SOFT
#define MA_RAMP_LINEAR
#define MA_RAMP_OVERLAY
#define MA_RAMP_MULT
#define MA_RAMP_SAT
#define MA_RAMP_DIV
#define MA_RAMP_DODGE
#define MA_RAMP_SCREEN
#define MA_RAMP_HUE
#define MA_RAMP_BLEND
#define MA_RAMP_ADD
#define MA_RAMP_COLOR
struct FreestyleGlobals g_freestyle
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
StructRNA RNA_Scene
StructRNA RNA_ColorRamp
StructRNA RNA_CurveMapping
static struct PyModuleDef module
PyObject * pyrna_struct_CreatePyObject(PointerRNA *ptr)
Definition: bpy_rna.c:7469
PyTypeObject pyrna_struct_Type
Definition: bpy_rna.c:6540
Scene scene
int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *value, const char *error_prefix)
Definition: mathutils.c:118
PyObject * Vector_CreatePyObject(const float *vec, const int size, PyTypeObject *base_type)
static unsigned a[3]
Definition: RandGen.cpp:92
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
Definition: rna_access.c:844
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:146
PyObject_HEAD PointerRNA ptr
Definition: bpy_rna.h:125
struct Scene * scene
Definition: FRS_freestyle.h:33
struct StructRNA * type
Definition: RNA_types.h:51
void * data
Definition: RNA_types.h:52