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