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