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