Blender V4.5
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");
62
63static PyObject *Freestyle_getCurrentScene(PyObject * /*self*/)
64{
65 Scene *scene = g_freestyle.scene;
66 if (!scene) {
67 PyErr_SetString(PyExc_TypeError, "current scene not available");
68 return nullptr;
69 }
70 PointerRNA ptr_scene = RNA_pointer_create_discrete(&scene->id, &RNA_Scene, scene);
71 return pyrna_struct_CreatePyObject(&ptr_scene);
72}
73
74#include "DNA_material_types.h"
75
76static int ramp_blend_type(const char *type)
77{
78 if (STREQ(type, "MIX")) {
79 return MA_RAMP_BLEND;
80 }
81 if (STREQ(type, "ADD")) {
82 return MA_RAMP_ADD;
83 }
84 if (STREQ(type, "MULTIPLY")) {
85 return MA_RAMP_MULT;
86 }
87 if (STREQ(type, "SUBTRACT")) {
88 return MA_RAMP_SUB;
89 }
90 if (STREQ(type, "SCREEN")) {
91 return MA_RAMP_SCREEN;
92 }
93 if (STREQ(type, "DIVIDE")) {
94 return MA_RAMP_DIV;
95 }
96 if (STREQ(type, "DIFFERENCE")) {
97 return MA_RAMP_DIFF;
98 }
99 if (STREQ(type, "EXCLUSION")) {
100 return MA_RAMP_EXCLUSION;
101 }
102 if (STREQ(type, "DARKEN")) {
103 return MA_RAMP_DARK;
104 }
105 if (STREQ(type, "LIGHTEN")) {
106 return MA_RAMP_LIGHT;
107 }
108 if (STREQ(type, "OVERLAY")) {
109 return MA_RAMP_OVERLAY;
110 }
111 if (STREQ(type, "DODGE")) {
112 return MA_RAMP_DODGE;
113 }
114 if (STREQ(type, "BURN")) {
115 return MA_RAMP_BURN;
116 }
117 if (STREQ(type, "HUE")) {
118 return MA_RAMP_HUE;
119 }
120 if (STREQ(type, "SATURATION")) {
121 return MA_RAMP_SAT;
122 }
123 if (STREQ(type, "VALUE")) {
124 return MA_RAMP_VAL;
125 }
126 if (STREQ(type, "COLOR")) {
127 return MA_RAMP_COLOR;
128 }
129 if (STREQ(type, "SOFT_LIGHT")) {
130 return MA_RAMP_SOFT;
131 }
132 if (STREQ(type, "LINEAR_LIGHT")) {
133 return MA_RAMP_LINEAR;
134 }
135 return -1;
136}
137
139 /* Wrap. */
140 Freestyle_blendRamp___doc__,
141 ".. function:: blendRamp(type, color1, fac, color2)\n"
142 "\n"
143 " Blend two colors according to a ramp blend type.\n"
144 "\n"
145 " :arg type: Ramp blend type.\n"
146 " :type type: int\n"
147 " :arg color1: 1st color.\n"
148 " :type color1: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]\n"
149 " :arg fac: Blend factor.\n"
150 " :type fac: float\n"
151 " :arg color2: 1st color.\n"
152 " :type color2: :class:`mathutils.Vector` | tuple[float, float, float] | list[float]\n"
153 " :return: Blended color in RGB format.\n"
154 " :rtype: :class:`mathutils.Vector`\n");
155
156static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args)
157{
158 PyObject *obj1, *obj2;
159 char *s;
160 int type;
161 float a[3], fac, b[3];
162
163 if (!PyArg_ParseTuple(args, "sOfO", &s, &obj1, &fac, &obj2)) {
164 return nullptr;
165 }
166 type = ramp_blend_type(s);
167 if (type < 0) {
168 PyErr_SetString(PyExc_TypeError, "argument 1 is an unknown ramp blend type");
169 return nullptr;
170 }
172 3,
173 3,
174 obj1,
175 "argument 2 must be a 3D vector "
176 "(either a tuple/list of 3 elements or Vector)") == -1)
177 {
178 return nullptr;
179 }
181 3,
182 3,
183 obj2,
184 "argument 4 must be a 3D vector "
185 "(either a tuple/list of 3 elements or Vector)") == -1)
186 {
187 return nullptr;
188 }
189 ramp_blend(type, a, fac, b);
190 return Vector_CreatePyObject(a, 3, nullptr);
191}
192
194 /* Wrap. */
195 Freestyle_evaluateColorRamp___doc__,
196 ".. function:: evaluateColorRamp(ramp, in)\n"
197 "\n"
198 " Evaluate a color ramp at a point in the interval 0 to 1.\n"
199 "\n"
200 " :arg ramp: Color ramp object.\n"
201 " :type ramp: :class:`bpy.types.ColorRamp`\n"
202 " :arg in: Value in the interval 0 to 1.\n"
203 " :type in: float\n"
204 " :return: color in RGBA format.\n"
205 " :rtype: :class:`mathutils.Vector`\n");
206
207static PyObject *Freestyle_evaluateColorRamp(PyObject * /*self*/, PyObject *args)
208{
209 BPy_StructRNA *py_srna;
210 ColorBand *coba;
211 float in, out[4];
212
213 if (!PyArg_ParseTuple(args, "O!f", &pyrna_struct_Type, &py_srna, &in)) {
214 return nullptr;
215 }
216 if (!RNA_struct_is_a(py_srna->ptr->type, &RNA_ColorRamp)) {
217 PyErr_SetString(PyExc_TypeError, "1st argument is not a ColorRamp object");
218 return nullptr;
219 }
220 coba = (ColorBand *)py_srna->ptr->data;
221 if (!BKE_colorband_evaluate(coba, in, out)) {
222 PyErr_SetString(PyExc_ValueError, "failed to evaluate the color ramp");
223 return nullptr;
224 }
225 return Vector_CreatePyObject(out, 4, nullptr);
226}
227
228#include "DNA_color_types.h"
229
231 /* Wrap. */
232 Freestyle_evaluateCurveMappingF___doc__,
233 ".. function:: evaluateCurveMappingF(cumap, cur, value)\n"
234 "\n"
235 " Evaluate a curve mapping at a point in the interval 0 to 1.\n"
236 "\n"
237 " :arg cumap: Curve mapping object.\n"
238 " :type cumap: :class:`bpy.types.CurveMapping`\n"
239 " :arg cur: Index of the curve to be used (0 <= cur <= 3).\n"
240 " :type cur: int\n"
241 " :arg value: Input value in the interval 0 to 1.\n"
242 " :type value: float\n"
243 " :return: Mapped output value.\n"
244 " :rtype: float\n");
245
246static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *args)
247{
248 BPy_StructRNA *py_srna;
249 CurveMapping *cumap;
250 int cur;
251 float value;
252
253 if (!PyArg_ParseTuple(args, "O!if", &pyrna_struct_Type, &py_srna, &cur, &value)) {
254 return nullptr;
255 }
256 if (!RNA_struct_is_a(py_srna->ptr->type, &RNA_CurveMapping)) {
257 PyErr_SetString(PyExc_TypeError, "1st argument is not a CurveMapping object");
258 return nullptr;
259 }
260 if (cur < 0 || cur > 3) {
261 PyErr_SetString(PyExc_ValueError, "2nd argument is out of range");
262 return nullptr;
263 }
264 cumap = (CurveMapping *)py_srna->ptr->data;
266 /* disable extrapolation if enabled */
267 if (cumap->flag & CUMA_EXTEND_EXTRAPOLATE) {
269 BKE_curvemapping_changed(cumap, false);
270 }
271 return PyFloat_FromDouble(BKE_curvemapping_evaluateF(cumap, cur, value));
272}
273
274/*-----------------------Freestyle module docstring----------------------------*/
275
277 /* Force wrapped line. */
278 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#ifdef __GNUC__
505# ifdef __clang__
506# pragma clang diagnostic push
507# pragma clang diagnostic ignored "-Wcast-function-type"
508# else
509# pragma GCC diagnostic push
510# pragma GCC diagnostic ignored "-Wcast-function-type"
511# endif
512#endif
513
514static PyMethodDef module_functions[] = {
515 {"getCurrentScene",
516 (PyCFunction)Freestyle_getCurrentScene,
517 METH_NOARGS,
518 Freestyle_getCurrentScene___doc__},
519 {"blendRamp", (PyCFunction)Freestyle_blendRamp, METH_VARARGS, Freestyle_blendRamp___doc__},
520 {"evaluateColorRamp",
521 (PyCFunction)Freestyle_evaluateColorRamp,
522 METH_VARARGS,
523 Freestyle_evaluateColorRamp___doc__},
524 {"evaluateCurveMappingF",
526 METH_VARARGS,
527 Freestyle_evaluateCurveMappingF___doc__},
528 {nullptr, nullptr, 0, nullptr},
529};
530
531#ifdef __GNUC__
532# ifdef __clang__
533# pragma clang diagnostic pop
534# else
535# pragma GCC diagnostic pop
536# endif
537#endif
538
539/*-----------------------Freestyle module definition---------------------------*/
540
541static PyModuleDef module_definition = {
542 /*m_base*/ PyModuleDef_HEAD_INIT,
543 /*m_name*/ "_freestyle",
544 /*m_doc*/ module_docstring,
545 /*m_size*/ -1,
546 /*m_methods*/ module_functions,
547 /*m_slots*/ nullptr,
548 /*m_traverse*/ nullptr,
549 /*m_clear*/ nullptr,
550 /*m_free*/ nullptr,
551};
552
553//-------------------MODULE INITIALIZATION--------------------------------
554PyObject *Freestyle_Init()
555{
556 PyObject *module;
557
558 // initialize modules
559 module = PyModule_Create(&module_definition);
560 if (!module) {
561 return nullptr;
562 }
563 PyDict_SetItemString(PySys_GetObject("modules"), module_definition.m_name, module);
564
565 // update 'sys.path' for Freestyle Python API modules
566 const std::optional<std::string> path = BKE_appdir_folder_id(BLENDER_SYSTEM_SCRIPTS,
567 "freestyle");
568 if (path.has_value()) {
569 char modpath[FILE_MAX];
570 BLI_path_join(modpath, sizeof(modpath), path->c_str(), "modules");
571 PyObject *sys_path = PySys_GetObject("path"); /* borrow */
572 PyObject *py_modpath = PyC_UnicodeFromBytes(modpath);
573 PyList_Append(sys_path, py_modpath);
574 Py_DECREF(py_modpath);
575#if 0
576 printf("Adding Python path: %s\n", modpath);
577#endif
578 }
579 else {
580 printf(
581 "Freestyle: couldn't find 'scripts/freestyle/modules', Freestyle won't work properly.\n");
582 }
583
584 // attach its classes (adding the object types to the module)
585
586 // those classes have to be initialized before the others
589
611
612 return module;
613}
614
@ BLENDER_SYSTEM_SCRIPTS
std::optional< std::string > BKE_appdir_folder_id(int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
Definition appdir.cc:717
bool BKE_colorband_evaluate(const ColorBand *coba, float in, float out[4])
Definition colorband.cc:395
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:7006
PyObject * pyrna_struct_CreatePyObject(PointerRNA *ptr)
Definition bpy_rna.cc:8384
#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
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