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