fake-bpy-module 20240210__py3-none-any.whl → 20240326__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fake-bpy-module might be problematic. Click here for more details.
- addon_utils/__init__.pyi +54 -11
- animsys_refactor/__init__.pyi +36 -7
- aud/__init__.pyi +307 -321
- bgl/__init__.pyi +2926 -865
- bl_app_override/__init__.pyi +14 -4
- bl_app_override/helpers/__init__.pyi +24 -3
- bl_app_template_utils/__init__.pyi +19 -5
- bl_console_utils/__init__.pyi +0 -1
- bl_console_utils/autocomplete/__init__.pyi +2 -3
- bl_console_utils/autocomplete/complete_calltip/__init__.pyi +24 -6
- bl_console_utils/autocomplete/complete_import/__init__.pyi +14 -4
- bl_console_utils/autocomplete/complete_namespace/__init__.pyi +24 -6
- bl_console_utils/autocomplete/intellisense/__init__.pyi +9 -3
- bl_i18n_utils/__init__.pyi +2 -3
- bl_i18n_utils/bl_extract_messages/__init__.pyi +74 -16
- bl_i18n_utils/merge_po/__init__.pyi +4 -2
- bl_i18n_utils/settings/__init__.pyi +53 -7
- bl_i18n_utils/utils/__init__.pyi +332 -45
- bl_i18n_utils/utils_cli/__init__.pyi +29 -7
- bl_i18n_utils/utils_languages_menu/__init__.pyi +4 -2
- bl_i18n_utils/utils_rtl/__init__.pyi +9 -3
- bl_keymap_utils/__init__.pyi +2 -3
- bl_keymap_utils/io/__init__.pyi +44 -10
- bl_keymap_utils/keymap_from_toolbar/__init__.pyi +4 -2
- bl_keymap_utils/keymap_hierarchy/__init__.pyi +4 -2
- bl_keymap_utils/platform_helpers/__init__.pyi +9 -3
- bl_keymap_utils/versioning/__init__.pyi +4 -2
- bl_math/__init__.pyi +21 -22
- bl_operators/__init__.pyi +30 -24
- bl_operators/add_mesh_torus/__init__.pyi +171 -38
- bl_operators/anim/__init__.pyi +1065 -227
- bl_operators/assets/__init__.pyi +427 -93
- bl_operators/bmesh/__init__.pyi +0 -1
- bl_operators/bmesh/find_adjacent/__init__.pyi +44 -10
- bl_operators/clip/__init__.pyi +1342 -288
- bl_operators/console/__init__.pyi +647 -141
- bl_operators/constraint/__init__.pyi +524 -113
- bl_operators/file/__init__.pyi +396 -85
- bl_operators/freestyle/__init__.pyi +532 -114
- bl_operators/geometry_nodes/__init__.pyi +2412 -597
- bl_operators/image/__init__.pyi +380 -83
- bl_operators/mesh/__init__.pyi +401 -86
- bl_operators/node/__init__.pyi +1756 -385
- bl_operators/object/__init__.pyi +2022 -553
- bl_operators/object_align/__init__.pyi +145 -32
- bl_operators/object_quick_effects/__init__.pyi +555 -125
- bl_operators/object_randomize_transform/__init__.pyi +136 -33
- bl_operators/presets/__init__.pyi +3516 -709
- bl_operators/rigidbody/__init__.pyi +401 -86
- bl_operators/screen_play_rendered_anim/__init__.pyi +129 -30
- bl_operators/sequencer/__init__.pyi +731 -150
- bl_operators/spreadsheet/__init__.pyi +145 -31
- bl_operators/userpref/__init__.pyi +3416 -825
- bl_operators/uvcalc_follow_active/__init__.pyi +149 -33
- bl_operators/uvcalc_lightmap/__init__.pyi +187 -35
- bl_operators/uvcalc_transform/__init__.pyi +344 -74
- bl_operators/vertexpaint_dirt/__init__.pyi +140 -31
- bl_operators/view3d/__init__.pyi +697 -147
- bl_operators/wm/__init__.pyi +6287 -1534
- bl_previews_utils/__init__.pyi +0 -1
- bl_previews_utils/bl_previews_render/__init__.pyi +34 -8
- bl_rna_utils/__init__.pyi +0 -1
- bl_rna_utils/data_path/__init__.pyi +12 -3
- bl_text_utils/__init__.pyi +0 -1
- bl_text_utils/external_editor/__init__.pyi +4 -2
- bl_ui/__init__.pyi +567 -170
- bl_ui/anim/__init__.pyi +164 -34
- bl_ui/asset_shelf/__init__.pyi +146 -32
- bl_ui/generic_ui_list/__init__.pyi +471 -100
- bl_ui/node_add_menu/__init__.pyi +196 -41
- bl_ui/node_add_menu_compositor/__init__.pyi +3017 -622
- bl_ui/node_add_menu_geometry/__init__.pyi +8075 -1592
- bl_ui/node_add_menu_shader/__init__.pyi +1709 -349
- bl_ui/node_add_menu_texture/__init__.pyi +1502 -306
- bl_ui/properties_animviz/__init__.pyi +32 -3
- bl_ui/properties_collection/__init__.pyi +787 -180
- bl_ui/properties_constraint/__init__.pyi +28635 -5524
- bl_ui/properties_data_armature/__init__.pyi +1905 -449
- bl_ui/properties_data_bone/__init__.pyi +1560 -337
- bl_ui/properties_data_camera/__init__.pyi +2269 -495
- bl_ui/properties_data_curve/__init__.pyi +2362 -535
- bl_ui/properties_data_curves/__init__.pyi +951 -204
- bl_ui/properties_data_empty/__init__.pyi +317 -70
- bl_ui/properties_data_gpencil/__init__.pyi +2924 -735
- bl_ui/properties_data_grease_pencil/__init__.pyi +1631 -189
- bl_ui/properties_data_lattice/__init__.pyi +472 -105
- bl_ui/properties_data_light/__init__.pyi +1570 -338
- bl_ui/properties_data_lightprobe/__init__.pyi +938 -209
- bl_ui/properties_data_mesh/__init__.pyi +3205 -768
- bl_ui/properties_data_metaball/__init__.pyi +774 -171
- bl_ui/properties_data_modifier/__init__.pyi +1554 -329
- bl_ui/properties_data_pointcloud/__init__.pyi +821 -195
- bl_ui/properties_data_shaderfx/__init__.pyi +154 -35
- bl_ui/properties_data_speaker/__init__.pyi +782 -169
- bl_ui/properties_data_volume/__init__.pyi +1243 -282
- bl_ui/properties_freestyle/__init__.pyi +4071 -1031
- bl_ui/properties_grease_pencil_common/__init__.pyi +2399 -484
- bl_ui/properties_mask_common/__init__.pyi +1256 -250
- bl_ui/properties_material/__init__.pyi +2351 -543
- bl_ui/properties_material_gpencil/__init__.pyi +1590 -366
- bl_ui/properties_object/__init__.pyi +2179 -513
- bl_ui/properties_output/__init__.pyi +2956 -706
- bl_ui/properties_paint_common/__init__.pyi +947 -141
- bl_ui/properties_particle/__init__.pyi +8322 -1971
- bl_ui/properties_physics_cloth/__init__.pyi +2254 -509
- bl_ui/properties_physics_common/__init__.pyi +200 -45
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +4454 -966
- bl_ui/properties_physics_field/__init__.pyi +1695 -365
- bl_ui/properties_physics_fluid/__init__.pyi +6127 -1281
- bl_ui/properties_physics_geometry_nodes/__init__.pyi +157 -33
- bl_ui/properties_physics_rigidbody/__init__.pyi +1254 -279
- bl_ui/properties_physics_rigidbody_constraint/__init__.pyi +2053 -484
- bl_ui/properties_physics_softbody/__init__.pyi +2394 -543
- bl_ui/properties_render/__init__.pyi +8312 -1934
- bl_ui/properties_scene/__init__.pyi +2211 -540
- bl_ui/properties_texture/__init__.pyi +4185 -1014
- bl_ui/properties_view_layer/__init__.pyi +2803 -665
- bl_ui/properties_workspace/__init__.pyi +626 -149
- bl_ui/properties_world/__init__.pyi +1092 -235
- bl_ui/space_clip/__init__.pyi +11475 -2806
- bl_ui/space_console/__init__.pyi +967 -203
- bl_ui/space_dopesheet/__init__.pyi +4260 -967
- bl_ui/space_filebrowser/__init__.pyi +4852 -1188
- bl_ui/space_graph/__init__.pyi +3251 -703
- bl_ui/space_image/__init__.pyi +12218 -2968
- bl_ui/space_info/__init__.pyi +964 -201
- bl_ui/space_nla/__init__.pyi +2756 -585
- bl_ui/space_node/__init__.pyi +5661 -1266
- bl_ui/space_outliner/__init__.pyi +2294 -479
- bl_ui/space_properties/__init__.pyi +417 -93
- bl_ui/space_sequencer/__init__.pyi +12436 -3010
- bl_ui/space_spreadsheet/__init__.pyi +184 -37
- bl_ui/space_statusbar/__init__.pyi +135 -31
- bl_ui/space_text/__init__.pyi +2556 -543
- bl_ui/space_time/__init__.pyi +1151 -244
- bl_ui/space_toolsystem_common/__init__.pyi +368 -67
- bl_ui/space_toolsystem_toolbar/__init__.pyi +1378 -229
- bl_ui/space_topbar/__init__.pyi +4214 -888
- bl_ui/space_userpref/__init__.pyi +13920 -3468
- bl_ui/space_view3d/__init__.pyi +42751 -9613
- bl_ui/space_view3d_toolbar/__init__.pyi +16379 -3860
- bl_ui/utils/__init__.pyi +42 -5
- bl_ui_utils/__init__.pyi +0 -1
- bl_ui_utils/bug_report_url/__init__.pyi +4 -2
- bl_ui_utils/layout/__init__.pyi +4 -2
- blend_render_info/__init__.pyi +13 -4
- blf/__init__.pyi +15 -18
- bmesh/__init__.pyi +18 -18
- bmesh/geometry/__init__.pyi +5 -6
- bmesh/ops/__init__.pyi +1337 -1158
- bmesh/types/__init__.pyi +464 -374
- bmesh/utils/__init__.pyi +64 -70
- bpy/__init__.pyi +6 -7
- bpy/app/__init__.pyi +36 -38
- bpy/app/handlers/__init__.pyi +37 -38
- bpy/app/icons/__init__.pyi +8 -11
- bpy/app/timers/__init__.pyi +18 -17
- bpy/app/translations/__init__.pyi +32 -30
- bpy/msgbus/__init__.pyi +25 -20
- bpy/ops/__init__.pyi +63 -64
- bpy/ops/action/__init__.pyi +408 -436
- bpy/ops/anim/__init__.pyi +459 -577
- bpy/ops/armature/__init__.pyi +396 -498
- bpy/ops/asset/__init__.pyi +187 -213
- bpy/ops/boid/__init__.pyi +50 -68
- bpy/ops/brush/__init__.pyi +72 -97
- bpy/ops/buttons/__init__.pyi +202 -193
- bpy/ops/cachefile/__init__.pyi +198 -188
- bpy/ops/camera/__init__.pyi +24 -31
- bpy/ops/clip/__init__.pyi +1021 -1082
- bpy/ops/cloth/__init__.pyi +11 -15
- bpy/ops/collection/__init__.pyi +36 -51
- bpy/ops/console/__init__.pyi +155 -209
- bpy/ops/constraint/__init__.pyi +286 -254
- bpy/ops/curve/__init__.pyi +597 -659
- bpy/ops/curves/__init__.pyi +191 -225
- bpy/ops/cycles/__init__.pyi +21 -30
- bpy/ops/dpaint/__init__.pyi +34 -47
- bpy/ops/ed/__init__.pyi +160 -176
- bpy/ops/export_anim/__init__.pyi +51 -34
- bpy/ops/export_mesh/__init__.pyi +47 -45
- bpy/ops/export_scene/__init__.pyi +659 -504
- bpy/ops/file/__init__.pyi +469 -474
- bpy/ops/fluid/__init__.pyi +89 -119
- bpy/ops/font/__init__.pyi +325 -361
- bpy/ops/geometry/__init__.pyi +86 -114
- bpy/ops/gizmogroup/__init__.pyi +22 -28
- bpy/ops/gpencil/__init__.pyi +1900 -1976
- bpy/ops/graph/__init__.pyi +875 -894
- bpy/ops/grease_pencil/__init__.pyi +572 -508
- bpy/ops/image/__init__.pyi +805 -855
- bpy/ops/import_anim/__init__.pyi +66 -46
- bpy/ops/import_curve/__init__.pyi +7 -11
- bpy/ops/import_mesh/__init__.pyi +19 -25
- bpy/ops/import_scene/__init__.pyi +164 -147
- bpy/ops/info/__init__.pyi +88 -85
- bpy/ops/lattice/__init__.pyi +86 -90
- bpy/ops/marker/__init__.pyi +135 -146
- bpy/ops/mask/__init__.pyi +372 -436
- bpy/ops/material/__init__.pyi +18 -25
- bpy/ops/mball/__init__.pyi +93 -99
- bpy/ops/mesh/__init__.pyi +2525 -2664
- bpy/ops/nla/__init__.pyi +398 -455
- bpy/ops/node/__init__.pyi +1015 -1207
- bpy/ops/object/__init__.pyi +3423 -3390
- bpy/ops/outliner/__init__.pyi +667 -685
- bpy/ops/paint/__init__.pyi +719 -672
- bpy/ops/paintcurve/__init__.pyi +64 -85
- bpy/ops/palette/__init__.pyi +48 -67
- bpy/ops/particle/__init__.pyi +323 -367
- bpy/ops/pose/__init__.pyi +569 -474
- bpy/ops/poselib/__init__.pyi +77 -100
- bpy/ops/preferences/__init__.pyi +460 -512
- bpy/ops/ptcache/__init__.pyi +46 -63
- bpy/ops/render/__init__.pyi +121 -155
- bpy/ops/rigidbody/__init__.pyi +148 -143
- bpy/ops/scene/__init__.pyi +336 -380
- bpy/ops/screen/__init__.pyi +454 -530
- bpy/ops/script/__init__.pyi +19 -28
- bpy/ops/sculpt/__init__.pyi +734 -587
- bpy/ops/sculpt_curves/__init__.pyi +51 -56
- bpy/ops/sequencer/__init__.pyi +1617 -1500
- bpy/ops/sound/__init__.pyi +392 -315
- bpy/ops/spreadsheet/__init__.pyi +31 -42
- bpy/ops/surface/__init__.pyi +198 -163
- bpy/ops/text/__init__.pyi +479 -545
- bpy/ops/text_editor/__init__.pyi +11 -15
- bpy/ops/texture/__init__.pyi +26 -36
- bpy/ops/transform/__init__.pyi +825 -941
- bpy/ops/ui/__init__.pyi +246 -295
- bpy/ops/uilist/__init__.pyi +34 -38
- bpy/ops/uv/__init__.pyi +912 -824
- bpy/ops/view2d/__init__.pyi +157 -197
- bpy/ops/view3d/__init__.pyi +777 -878
- bpy/ops/wm/__init__.pyi +4102 -3595
- bpy/ops/workspace/__init__.pyi +42 -58
- bpy/ops/world/__init__.pyi +6 -9
- bpy/path/__init__.pyi +166 -109
- bpy/props/__init__.pyi +478 -395
- bpy/types/__init__.pyi +87194 -81467
- bpy/utils/__init__.pyi +325 -169
- bpy/utils/previews/__init__.pyi +108 -21
- bpy/utils/units/__init__.pyi +37 -39
- bpy_extras/__init__.pyi +4 -9
- bpy_extras/anim_utils/__init__.pyi +25 -55
- bpy_extras/asset_utils/__init__.pyi +3 -13
- bpy_extras/id_map_utils/__init__.pyi +1 -4
- bpy_extras/image_utils/__init__.pyi +33 -23
- bpy_extras/io_utils/__init__.pyi +116 -66
- bpy_extras/keyconfig_utils/__init__.pyi +5 -3
- bpy_extras/mesh_utils/__init__.pyi +42 -34
- bpy_extras/node_utils/__init__.pyi +4 -4
- bpy_extras/object_utils/__init__.pyi +58 -43
- bpy_extras/view3d_utils/__init__.pyi +64 -63
- bpy_restrict_state/__init__.pyi +14 -2
- bpy_types/__init__.pyi +3873 -998
- console_python/__init__.pyi +41 -8
- console_shell/__init__.pyi +24 -6
- {fake_bpy_module-20240210.dist-info → fake_bpy_module-20240326.dist-info}/METADATA +1 -1
- fake_bpy_module-20240326.dist-info/RECORD +343 -0
- {fake_bpy_module-20240210.dist-info → fake_bpy_module-20240326.dist-info}/WHEEL +1 -1
- freestyle/__init__.pyi +4 -5
- freestyle/chainingiterators/__init__.pyi +229 -73
- freestyle/functions/__init__.pyi +624 -402
- freestyle/predicates/__init__.pyi +381 -169
- freestyle/shaders/__init__.pyi +424 -155
- freestyle/types/__init__.pyi +1572 -726
- freestyle/utils/ContextFunctions/__init__.pyi +54 -43
- freestyle/utils/__init__.pyi +67 -31
- gpu/__init__.pyi +3 -4
- gpu/capabilities/__init__.pyi +57 -37
- gpu/matrix/__init__.pyi +14 -17
- gpu/platform/__init__.pyi +5 -6
- gpu/select/__init__.pyi +2 -5
- gpu/shader/__init__.pyi +14 -12
- gpu/state/__init__.pyi +48 -62
- gpu/texture/__init__.pyi +7 -7
- gpu/types/__init__.pyi +670 -229
- gpu_extras/__init__.pyi +1 -2
- gpu_extras/batch/__init__.pyi +27 -6
- gpu_extras/presets/__init__.pyi +67 -27
- graphviz_export/__init__.pyi +9 -3
- idprop/__init__.pyi +0 -1
- idprop/types/__init__.pyi +42 -13
- imbuf/__init__.pyi +6 -10
- imbuf/types/__init__.pyi +8 -16
- keyingsets_builtins/__init__.pyi +3149 -702
- keyingsets_utils/__init__.pyi +69 -15
- mathutils/__init__.pyi +951 -876
- mathutils/bvhtree/__init__.pyi +47 -48
- mathutils/geometry/__init__.pyi +237 -242
- mathutils/interpolate/__init__.pyi +3 -6
- mathutils/kdtree/__init__.pyi +23 -26
- mathutils/noise/__init__.pyi +50 -51
- nodeitems_builtins/__init__.pyi +50 -11
- nodeitems_utils/__init__.pyi +58 -11
- rna_info/__init__.pyi +230 -27
- rna_keymap_ui/__init__.pyi +29 -7
- rna_prop_ui/__init__.pyi +69 -13
- rna_xml/__init__.pyi +29 -7
- sys_info/__init__.pyi +4 -2
- bpy_extras/bmesh_utils/__init__.pyi +0 -7
- bpy_extras/extensions/__init__.pyi +0 -5
- bpy_extras/extensions/junction_module/__init__.pyi +0 -13
- bpy_extras/node_shader_utils/__init__.pyi +0 -132
- bpy_extras/wm_utils/__init__.pyi +0 -5
- bpy_extras/wm_utils/progress_report/__init__.pyi +0 -30
- fake_bpy_module-20240210.dist-info/RECORD +0 -349
- {fake_bpy_module-20240210.dist-info → fake_bpy_module-20240326.dist-info}/top_level.txt +0 -0
freestyle/shaders/__init__.pyi
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
import typing
|
|
3
2
|
import freestyle.types
|
|
4
|
-
import bpy.types
|
|
5
3
|
import mathutils
|
|
6
4
|
|
|
7
5
|
GenericType = typing.TypeVar("GenericType")
|
|
8
6
|
|
|
9
7
|
class BackboneStretcherShader:
|
|
10
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `BackboneStretcherShader`
|
|
8
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `BackboneStretcherShader`[Geometry shader]"""
|
|
11
9
|
|
|
12
10
|
def __init__(self, amount: float = 2.0):
|
|
13
11
|
"""Builds a BackboneStretcherShader object.
|
|
@@ -17,90 +15,97 @@ class BackboneStretcherShader:
|
|
|
17
15
|
"""
|
|
18
16
|
...
|
|
19
17
|
|
|
20
|
-
def shade(self, stroke:
|
|
21
|
-
"""Stretches the stroke at its two extremities and following the
|
|
18
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
19
|
+
"""Stretches the stroke at its two extremities and following the
|
|
20
|
+
respective directions: v(1)v(0) and v(n-1)v(n).
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
:param stroke: A Stroke object.
|
|
23
|
+
:type stroke: freestyle.types.Stroke
|
|
25
24
|
"""
|
|
26
25
|
...
|
|
27
26
|
|
|
28
27
|
class BezierCurveShader:
|
|
29
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `BezierCurveShader`
|
|
28
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `BezierCurveShader`[Geometry shader]"""
|
|
30
29
|
|
|
31
30
|
def __init__(self, error: float = 4.0):
|
|
32
31
|
"""Builds a BezierCurveShader object.
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
:param error: The error we're allowing for the approximation. This
|
|
34
|
+
error is the max distance allowed between the new curve and the
|
|
35
|
+
original geometry.
|
|
36
|
+
:type error: float
|
|
36
37
|
"""
|
|
37
38
|
...
|
|
38
39
|
|
|
39
|
-
def shade(self, stroke:
|
|
40
|
-
"""Transforms the stroke backbone geometry so that it corresponds to a
|
|
40
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
41
|
+
"""Transforms the stroke backbone geometry so that it corresponds to a
|
|
42
|
+
Bezier Curve approximation of the original backbone geometry.
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
:param stroke: A Stroke object.
|
|
45
|
+
:type stroke: freestyle.types.Stroke
|
|
44
46
|
"""
|
|
45
47
|
...
|
|
46
48
|
|
|
47
49
|
class BlenderTextureShader:
|
|
48
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `BlenderTextureShader`
|
|
50
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `BlenderTextureShader`[Texture shader]"""
|
|
49
51
|
|
|
50
|
-
def __init__(
|
|
51
|
-
self,
|
|
52
|
-
texture: typing.Union[
|
|
53
|
-
"bpy.types.LineStyleTextureSlot", "bpy.types.ShaderNodeTree"
|
|
54
|
-
],
|
|
55
|
-
):
|
|
52
|
+
def __init__(self, texture):
|
|
56
53
|
"""Builds a BlenderTextureShader object.
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
:param texture: A line style texture slot or a shader node tree to define
|
|
56
|
+
a set of textures.
|
|
60
57
|
"""
|
|
61
58
|
...
|
|
62
59
|
|
|
63
|
-
def shade(self, stroke:
|
|
64
|
-
"""Assigns a blender texture slot to the stroke
|
|
60
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
61
|
+
"""Assigns a blender texture slot to the stroke shading in order to
|
|
62
|
+
simulate marks.
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
:param stroke: A Stroke object.
|
|
65
|
+
:type stroke: freestyle.types.Stroke
|
|
68
66
|
"""
|
|
69
67
|
...
|
|
70
68
|
|
|
71
69
|
class CalligraphicShader:
|
|
72
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `CalligraphicShader`
|
|
70
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `CalligraphicShader`[Thickness Shader]"""
|
|
73
71
|
|
|
74
72
|
def __init__(
|
|
75
73
|
self,
|
|
76
74
|
thickness_min: float,
|
|
77
75
|
thickness_max: float,
|
|
78
|
-
orientation: typing.Union[typing.Sequence[float],
|
|
76
|
+
orientation: typing.Union[typing.Sequence[float], mathutils.Vector],
|
|
79
77
|
clamp: bool,
|
|
80
78
|
):
|
|
81
79
|
"""Builds a CalligraphicShader object.
|
|
82
80
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
:param thickness_min: The minimum thickness in the direction
|
|
82
|
+
perpendicular to the main direction.
|
|
83
|
+
:type thickness_min: float
|
|
84
|
+
:param thickness_max: The maximum thickness in the main direction.
|
|
85
|
+
:type thickness_max: float
|
|
86
|
+
:param orientation: The 2D vector giving the main direction.
|
|
87
|
+
:type orientation: typing.Union[typing.Sequence[float], mathutils.Vector]
|
|
88
|
+
:param clamp: If true, the strokes are drawn in black when the stroke
|
|
89
|
+
direction is between -90 and 90 degrees with respect to the main
|
|
90
|
+
direction and drawn in white otherwise. If false, the strokes
|
|
91
|
+
are always drawn in black.
|
|
92
|
+
:type clamp: bool
|
|
91
93
|
"""
|
|
92
94
|
...
|
|
93
95
|
|
|
94
|
-
def shade(self, stroke:
|
|
95
|
-
"""Assigns thicknesses to the stroke vertices so that the stroke looks
|
|
96
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
97
|
+
"""Assigns thicknesses to the stroke vertices so that the stroke looks
|
|
98
|
+
like made with a calligraphic tool, i.e. the stroke will be the
|
|
99
|
+
thickest in a main direction, and the thinnest in the direction
|
|
100
|
+
perpendicular to this one, and an interpolation in between.
|
|
96
101
|
|
|
97
|
-
|
|
98
|
-
|
|
102
|
+
:param stroke: A Stroke object.
|
|
103
|
+
:type stroke: freestyle.types.Stroke
|
|
99
104
|
"""
|
|
100
105
|
...
|
|
101
106
|
|
|
102
107
|
class ColorNoiseShader:
|
|
103
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `ColorNoiseShader`
|
|
108
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `ColorNoiseShader`[Color shader]"""
|
|
104
109
|
|
|
105
110
|
def __init__(self, amplitude: float, period: float):
|
|
106
111
|
"""Builds a ColorNoiseShader object.
|
|
@@ -112,16 +117,16 @@ class ColorNoiseShader:
|
|
|
112
117
|
"""
|
|
113
118
|
...
|
|
114
119
|
|
|
115
|
-
def shade(self, stroke:
|
|
120
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
116
121
|
"""Shader to add noise to the stroke colors.
|
|
117
122
|
|
|
118
123
|
:param stroke: A Stroke object.
|
|
119
|
-
:type stroke:
|
|
124
|
+
:type stroke: freestyle.types.Stroke
|
|
120
125
|
"""
|
|
121
126
|
...
|
|
122
127
|
|
|
123
128
|
class ConstantColorShader:
|
|
124
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `ConstantColorShader`
|
|
129
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `ConstantColorShader`[Color shader]"""
|
|
125
130
|
|
|
126
131
|
def __init__(self, red: float, green: float, blue: float, alpha: float = 1.0):
|
|
127
132
|
"""Builds a ConstantColorShader object.
|
|
@@ -137,16 +142,16 @@ class ConstantColorShader:
|
|
|
137
142
|
"""
|
|
138
143
|
...
|
|
139
144
|
|
|
140
|
-
def shade(self, stroke:
|
|
145
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
141
146
|
"""Assigns a constant color to every vertex of the Stroke.
|
|
142
147
|
|
|
143
148
|
:param stroke: A Stroke object.
|
|
144
|
-
:type stroke:
|
|
149
|
+
:type stroke: freestyle.types.Stroke
|
|
145
150
|
"""
|
|
146
151
|
...
|
|
147
152
|
|
|
148
153
|
class ConstantThicknessShader:
|
|
149
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `ConstantThicknessShader`
|
|
154
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `ConstantThicknessShader`[Thickness shader]"""
|
|
150
155
|
|
|
151
156
|
def __init__(self, thickness: float):
|
|
152
157
|
"""Builds a ConstantThicknessShader object.
|
|
@@ -156,16 +161,16 @@ class ConstantThicknessShader:
|
|
|
156
161
|
"""
|
|
157
162
|
...
|
|
158
163
|
|
|
159
|
-
def shade(self, stroke:
|
|
164
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
160
165
|
"""Assigns an absolute constant thickness to every vertex of the Stroke.
|
|
161
166
|
|
|
162
167
|
:param stroke: A Stroke object.
|
|
163
|
-
:type stroke:
|
|
168
|
+
:type stroke: freestyle.types.Stroke
|
|
164
169
|
"""
|
|
165
170
|
...
|
|
166
171
|
|
|
167
172
|
class ConstrainedIncreasingThicknessShader:
|
|
168
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `ConstrainedIncreasingThicknessShader`
|
|
173
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `ConstrainedIncreasingThicknessShader`[Thickness shader]"""
|
|
169
174
|
|
|
170
175
|
def __init__(self, thickness_min: float, thickness_max: float, ratio: float):
|
|
171
176
|
"""Builds a ConstrainedIncreasingThicknessShader object.
|
|
@@ -179,35 +184,45 @@ class ConstrainedIncreasingThicknessShader:
|
|
|
179
184
|
"""
|
|
180
185
|
...
|
|
181
186
|
|
|
182
|
-
def shade(self, stroke:
|
|
183
|
-
"""Same as the `IncreasingThicknessShader`, but here we allow
|
|
187
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
188
|
+
"""Same as the `IncreasingThicknessShader`, but here we allow
|
|
189
|
+
the user to control the thickness/length ratio so that we don't get
|
|
190
|
+
fat short lines.
|
|
184
191
|
|
|
185
|
-
|
|
186
|
-
|
|
192
|
+
:param stroke: A Stroke object.
|
|
193
|
+
:type stroke: freestyle.types.Stroke
|
|
187
194
|
"""
|
|
188
195
|
...
|
|
189
196
|
|
|
190
197
|
class GuidingLinesShader:
|
|
191
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `GuidingLinesShader`
|
|
198
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `GuidingLinesShader`[Geometry shader]"""
|
|
192
199
|
|
|
193
200
|
def __init__(self, offset: float):
|
|
194
201
|
"""Builds a GuidingLinesShader object.
|
|
195
202
|
|
|
196
|
-
|
|
197
|
-
|
|
203
|
+
:param offset: The line that replaces the stroke is initially in the
|
|
204
|
+
middle of the initial stroke bounding box. offset is the value
|
|
205
|
+
of the displacement which is applied to this line along its
|
|
206
|
+
normal.
|
|
207
|
+
:type offset: float
|
|
198
208
|
"""
|
|
199
209
|
...
|
|
200
210
|
|
|
201
|
-
def shade(self, stroke:
|
|
202
|
-
"""Shader to modify the Stroke geometry so that it corresponds to its
|
|
211
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
212
|
+
"""Shader to modify the Stroke geometry so that it corresponds to its
|
|
213
|
+
main direction line. This shader must be used together with the
|
|
214
|
+
splitting operator using the curvature criterion. Indeed, the
|
|
215
|
+
precision of the approximation will depend on the size of the
|
|
216
|
+
stroke's pieces. The bigger the pieces are, the rougher the
|
|
217
|
+
approximation is.
|
|
203
218
|
|
|
204
|
-
|
|
205
|
-
|
|
219
|
+
:param stroke: A Stroke object.
|
|
220
|
+
:type stroke: freestyle.types.Stroke
|
|
206
221
|
"""
|
|
207
222
|
...
|
|
208
223
|
|
|
209
224
|
class IncreasingColorShader:
|
|
210
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `IncreasingColorShader`
|
|
225
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `IncreasingColorShader`[Color shader]"""
|
|
211
226
|
|
|
212
227
|
def __init__(
|
|
213
228
|
self,
|
|
@@ -241,16 +256,18 @@ class IncreasingColorShader:
|
|
|
241
256
|
"""
|
|
242
257
|
...
|
|
243
258
|
|
|
244
|
-
def shade(self, stroke:
|
|
245
|
-
"""Assigns a varying color to the stroke. The user specifies two
|
|
259
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
260
|
+
"""Assigns a varying color to the stroke. The user specifies two
|
|
261
|
+
colors A and B. The stroke color will change linearly from A to B
|
|
262
|
+
between the first and the last vertex.
|
|
246
263
|
|
|
247
|
-
|
|
248
|
-
|
|
264
|
+
:param stroke: A Stroke object.
|
|
265
|
+
:type stroke: freestyle.types.Stroke
|
|
249
266
|
"""
|
|
250
267
|
...
|
|
251
268
|
|
|
252
269
|
class IncreasingThicknessShader:
|
|
253
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `IncreasingThicknessShader`
|
|
270
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `IncreasingThicknessShader`[Thickness shader]"""
|
|
254
271
|
|
|
255
272
|
def __init__(self, thickness_A: float, thickness_B: float):
|
|
256
273
|
"""Builds an IncreasingThicknessShader object.
|
|
@@ -262,39 +279,63 @@ class IncreasingThicknessShader:
|
|
|
262
279
|
"""
|
|
263
280
|
...
|
|
264
281
|
|
|
265
|
-
def shade(self, stroke:
|
|
266
|
-
"""Assigns thicknesses values such as the thickness increases from a
|
|
282
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
283
|
+
"""Assigns thicknesses values such as the thickness increases from a
|
|
284
|
+
thickness value A to a thickness value B between the first vertex
|
|
285
|
+
to the midpoint vertex and then decreases from B to a A between
|
|
286
|
+
this midpoint vertex and the last vertex. The thickness is
|
|
287
|
+
linearly interpolated from A to B.
|
|
267
288
|
|
|
268
|
-
|
|
269
|
-
|
|
289
|
+
:param stroke: A Stroke object.
|
|
290
|
+
:type stroke: freestyle.types.Stroke
|
|
270
291
|
"""
|
|
271
292
|
...
|
|
272
293
|
|
|
273
294
|
class PolygonalizationShader:
|
|
274
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `PolygonalizationShader`
|
|
295
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `PolygonalizationShader`[Geometry shader]"""
|
|
275
296
|
|
|
276
297
|
def __init__(self, error: float):
|
|
277
298
|
"""Builds a PolygonalizationShader object.
|
|
278
299
|
|
|
279
|
-
|
|
280
|
-
|
|
300
|
+
:param error: The error we want our polygonal approximation to have
|
|
301
|
+
with respect to the original geometry. The smaller, the closer
|
|
302
|
+
the new stroke is to the original one. This error corresponds to
|
|
303
|
+
the maximum distance between the new stroke and the old one.
|
|
304
|
+
:type error: float
|
|
281
305
|
"""
|
|
282
306
|
...
|
|
283
307
|
|
|
284
|
-
def shade(self, stroke:
|
|
285
|
-
"""Modifies the Stroke geometry so that it looks more "polygonal".
|
|
308
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
309
|
+
"""Modifies the Stroke geometry so that it looks more "polygonal".
|
|
310
|
+
The basic idea is to start from the minimal stroke approximation
|
|
311
|
+
consisting in a line joining the first vertex to the last one and
|
|
312
|
+
to subdivide using the original stroke vertices until a certain
|
|
313
|
+
error is reached.
|
|
286
314
|
|
|
287
|
-
|
|
288
|
-
|
|
315
|
+
:param stroke: A Stroke object.
|
|
316
|
+
:type stroke: freestyle.types.Stroke
|
|
289
317
|
"""
|
|
290
318
|
...
|
|
291
319
|
|
|
292
320
|
class RoundCapShader:
|
|
293
|
-
|
|
294
|
-
|
|
321
|
+
""" """
|
|
322
|
+
|
|
323
|
+
def round_cap_thickness(self, x):
|
|
324
|
+
"""
|
|
325
|
+
|
|
326
|
+
:param x:
|
|
327
|
+
"""
|
|
328
|
+
...
|
|
329
|
+
|
|
330
|
+
def shade(self, stroke):
|
|
331
|
+
"""
|
|
332
|
+
|
|
333
|
+
:param stroke:
|
|
334
|
+
"""
|
|
335
|
+
...
|
|
295
336
|
|
|
296
337
|
class SamplingShader:
|
|
297
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `SamplingShader`
|
|
338
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `SamplingShader`[Geometry shader]"""
|
|
298
339
|
|
|
299
340
|
def __init__(self, sampling: float):
|
|
300
341
|
"""Builds a SamplingShader object.
|
|
@@ -304,16 +345,16 @@ class SamplingShader:
|
|
|
304
345
|
"""
|
|
305
346
|
...
|
|
306
347
|
|
|
307
|
-
def shade(self, stroke:
|
|
348
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
308
349
|
"""Resamples the stroke.
|
|
309
350
|
|
|
310
351
|
:param stroke: A Stroke object.
|
|
311
|
-
:type stroke:
|
|
352
|
+
:type stroke: freestyle.types.Stroke
|
|
312
353
|
"""
|
|
313
354
|
...
|
|
314
355
|
|
|
315
356
|
class SmoothingShader:
|
|
316
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `SmoothingShader`
|
|
357
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `SmoothingShader`[Geometry shader]"""
|
|
317
358
|
|
|
318
359
|
def __init__(
|
|
319
360
|
self,
|
|
@@ -347,16 +388,19 @@ class SmoothingShader:
|
|
|
347
388
|
"""
|
|
348
389
|
...
|
|
349
390
|
|
|
350
|
-
def shade(self, stroke:
|
|
351
|
-
"""Smooths the stroke by moving the vertices to make the stroke
|
|
391
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
392
|
+
"""Smooths the stroke by moving the vertices to make the stroke
|
|
393
|
+
smoother. Uses curvature flow to converge towards a curve of
|
|
394
|
+
constant curvature. The diffusion method we use is anisotropic to
|
|
395
|
+
prevent the diffusion across corners.
|
|
352
396
|
|
|
353
|
-
|
|
354
|
-
|
|
397
|
+
:param stroke: A Stroke object.
|
|
398
|
+
:type stroke: freestyle.types.Stroke
|
|
355
399
|
"""
|
|
356
400
|
...
|
|
357
401
|
|
|
358
402
|
class SpatialNoiseShader:
|
|
359
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `SpatialNoiseShader`
|
|
403
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `SpatialNoiseShader`[Geometry shader]"""
|
|
360
404
|
|
|
361
405
|
def __init__(
|
|
362
406
|
self,
|
|
@@ -381,19 +425,27 @@ class SpatialNoiseShader:
|
|
|
381
425
|
"""
|
|
382
426
|
...
|
|
383
427
|
|
|
384
|
-
def shade(self, stroke:
|
|
385
|
-
"""Spatial Noise stroke shader. Moves the vertices to make the stroke
|
|
428
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
429
|
+
"""Spatial Noise stroke shader. Moves the vertices to make the stroke
|
|
430
|
+
more noisy.
|
|
386
431
|
|
|
387
|
-
|
|
388
|
-
|
|
432
|
+
:param stroke: A Stroke object.
|
|
433
|
+
:type stroke: freestyle.types.Stroke
|
|
389
434
|
"""
|
|
390
435
|
...
|
|
391
436
|
|
|
392
437
|
class SquareCapShader:
|
|
393
|
-
|
|
438
|
+
""" """
|
|
439
|
+
|
|
440
|
+
def shade(self, stroke):
|
|
441
|
+
"""
|
|
442
|
+
|
|
443
|
+
:param stroke:
|
|
444
|
+
"""
|
|
445
|
+
...
|
|
394
446
|
|
|
395
447
|
class StrokeTextureStepShader:
|
|
396
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `StrokeTextureStepShader`
|
|
448
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `StrokeTextureStepShader`[Texture shader]"""
|
|
397
449
|
|
|
398
450
|
def __init__(self, step: float):
|
|
399
451
|
"""Builds a StrokeTextureStepShader object.
|
|
@@ -403,16 +455,16 @@ class StrokeTextureStepShader:
|
|
|
403
455
|
"""
|
|
404
456
|
...
|
|
405
457
|
|
|
406
|
-
def shade(self, stroke:
|
|
458
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
407
459
|
"""Assigns a spacing factor to the texture coordinates of the Stroke.
|
|
408
460
|
|
|
409
461
|
:param stroke: A Stroke object.
|
|
410
|
-
:type stroke:
|
|
462
|
+
:type stroke: freestyle.types.Stroke
|
|
411
463
|
"""
|
|
412
464
|
...
|
|
413
465
|
|
|
414
466
|
class ThicknessNoiseShader:
|
|
415
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `ThicknessNoiseShader`
|
|
467
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `ThicknessNoiseShader`[Thickness shader]"""
|
|
416
468
|
|
|
417
469
|
def __init__(self, amplitude: float, period: float):
|
|
418
470
|
"""Builds a ThicknessNoiseShader object.
|
|
@@ -424,203 +476,420 @@ class ThicknessNoiseShader:
|
|
|
424
476
|
"""
|
|
425
477
|
...
|
|
426
478
|
|
|
427
|
-
def shade(self, stroke:
|
|
479
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
428
480
|
"""Adds some noise to the stroke thickness.
|
|
429
481
|
|
|
430
482
|
:param stroke: A Stroke object.
|
|
431
|
-
:type stroke:
|
|
483
|
+
:type stroke: freestyle.types.Stroke
|
|
432
484
|
"""
|
|
433
485
|
...
|
|
434
486
|
|
|
435
487
|
class TipRemoverShader:
|
|
436
|
-
"""Class hierarchy: `freestyle.types.StrokeShader` > `TipRemoverShader`
|
|
488
|
+
"""Class hierarchy: `freestyle.types.StrokeShader` > `TipRemoverShader`[Geometry shader]"""
|
|
437
489
|
|
|
438
490
|
def __init__(self, tip_length: float):
|
|
439
491
|
"""Builds a TipRemoverShader object.
|
|
440
492
|
|
|
441
|
-
|
|
442
|
-
|
|
493
|
+
:param tip_length: The length of the piece of stroke we want to remove
|
|
494
|
+
at each extremity.
|
|
495
|
+
:type tip_length: float
|
|
443
496
|
"""
|
|
444
497
|
...
|
|
445
498
|
|
|
446
|
-
def shade(self, stroke:
|
|
499
|
+
def shade(self, stroke: freestyle.types.Stroke):
|
|
447
500
|
"""Removes the stroke's extremities.
|
|
448
501
|
|
|
449
502
|
:param stroke: A Stroke object.
|
|
450
|
-
:type stroke:
|
|
503
|
+
:type stroke: freestyle.types.Stroke
|
|
451
504
|
"""
|
|
452
505
|
...
|
|
453
506
|
|
|
454
507
|
class py2DCurvatureColorShader:
|
|
455
|
-
"""Assigns a color (grayscale) to the stroke based on the curvature.
|
|
508
|
+
"""Assigns a color (grayscale) to the stroke based on the curvature.
|
|
509
|
+
A higher curvature will yield a brighter color.
|
|
510
|
+
"""
|
|
456
511
|
|
|
457
|
-
def shade(self, stroke):
|
|
512
|
+
def shade(self, stroke):
|
|
513
|
+
"""
|
|
514
|
+
|
|
515
|
+
:param stroke:
|
|
516
|
+
"""
|
|
517
|
+
...
|
|
458
518
|
|
|
459
519
|
class pyBackboneStretcherNoCuspShader:
|
|
460
520
|
"""Stretches the stroke's backbone, excluding cusp vertices (end junctions)."""
|
|
461
521
|
|
|
462
|
-
def shade(self, stroke):
|
|
522
|
+
def shade(self, stroke):
|
|
523
|
+
"""
|
|
524
|
+
|
|
525
|
+
:param stroke:
|
|
526
|
+
"""
|
|
527
|
+
...
|
|
463
528
|
|
|
464
529
|
class pyBackboneStretcherShader:
|
|
465
530
|
"""Stretches the stroke's backbone by a given length (in pixels)."""
|
|
466
531
|
|
|
467
|
-
def shade(self, stroke):
|
|
532
|
+
def shade(self, stroke):
|
|
533
|
+
"""
|
|
534
|
+
|
|
535
|
+
:param stroke:
|
|
536
|
+
"""
|
|
537
|
+
...
|
|
468
538
|
|
|
469
539
|
class pyBluePrintCirclesShader:
|
|
470
540
|
"""Draws the silhouette of the object as a circle."""
|
|
471
541
|
|
|
472
|
-
def shade(self, stroke):
|
|
542
|
+
def shade(self, stroke):
|
|
543
|
+
"""
|
|
544
|
+
|
|
545
|
+
:param stroke:
|
|
546
|
+
"""
|
|
547
|
+
...
|
|
473
548
|
|
|
474
549
|
class pyBluePrintDirectedSquaresShader:
|
|
475
550
|
"""Replaces the stroke with a directed square."""
|
|
476
551
|
|
|
477
|
-
def shade(self, stroke):
|
|
552
|
+
def shade(self, stroke):
|
|
553
|
+
"""
|
|
554
|
+
|
|
555
|
+
:param stroke:
|
|
556
|
+
"""
|
|
557
|
+
...
|
|
478
558
|
|
|
479
559
|
class pyBluePrintEllipsesShader:
|
|
480
|
-
|
|
560
|
+
""" """
|
|
561
|
+
|
|
562
|
+
def shade(self, stroke):
|
|
563
|
+
"""
|
|
564
|
+
|
|
565
|
+
:param stroke:
|
|
566
|
+
"""
|
|
567
|
+
...
|
|
481
568
|
|
|
482
569
|
class pyBluePrintSquaresShader:
|
|
483
|
-
|
|
570
|
+
""" """
|
|
571
|
+
|
|
572
|
+
def shade(self, stroke):
|
|
573
|
+
"""
|
|
574
|
+
|
|
575
|
+
:param stroke:
|
|
576
|
+
"""
|
|
577
|
+
...
|
|
484
578
|
|
|
485
579
|
class pyConstantColorShader:
|
|
486
580
|
"""Assigns a constant color to the stroke."""
|
|
487
581
|
|
|
488
|
-
def shade(self, stroke):
|
|
582
|
+
def shade(self, stroke):
|
|
583
|
+
"""
|
|
584
|
+
|
|
585
|
+
:param stroke:
|
|
586
|
+
"""
|
|
587
|
+
...
|
|
489
588
|
|
|
490
589
|
class pyConstantThicknessShader:
|
|
491
590
|
"""Assigns a constant thickness along the stroke."""
|
|
492
591
|
|
|
493
|
-
def shade(self, stroke):
|
|
592
|
+
def shade(self, stroke):
|
|
593
|
+
"""
|
|
594
|
+
|
|
595
|
+
:param stroke:
|
|
596
|
+
"""
|
|
597
|
+
...
|
|
494
598
|
|
|
495
599
|
class pyConstrainedIncreasingThicknessShader:
|
|
496
|
-
"""Increasingly thickens the stroke, constrained by a ratio of the
|
|
600
|
+
"""Increasingly thickens the stroke, constrained by a ratio of the
|
|
601
|
+
stroke's length.
|
|
602
|
+
"""
|
|
603
|
+
|
|
604
|
+
def shade(self, stroke):
|
|
605
|
+
"""
|
|
497
606
|
|
|
498
|
-
|
|
607
|
+
:param stroke:
|
|
608
|
+
"""
|
|
609
|
+
...
|
|
499
610
|
|
|
500
611
|
class pyDecreasingThicknessShader:
|
|
501
612
|
"""Inverse of pyIncreasingThicknessShader, decreasingly thickens the stroke."""
|
|
502
613
|
|
|
503
|
-
def shade(self, stroke):
|
|
614
|
+
def shade(self, stroke):
|
|
615
|
+
"""
|
|
616
|
+
|
|
617
|
+
:param stroke:
|
|
618
|
+
"""
|
|
619
|
+
...
|
|
504
620
|
|
|
505
621
|
class pyDepthDiscontinuityThicknessShader:
|
|
506
|
-
"""Assigns a thickness to the stroke based on the stroke's distance
|
|
622
|
+
"""Assigns a thickness to the stroke based on the stroke's distance
|
|
623
|
+
to the camera (Z-value).
|
|
624
|
+
"""
|
|
625
|
+
|
|
626
|
+
def shade(self, stroke):
|
|
627
|
+
"""
|
|
507
628
|
|
|
508
|
-
|
|
629
|
+
:param stroke:
|
|
630
|
+
"""
|
|
631
|
+
...
|
|
509
632
|
|
|
510
633
|
class pyDiffusion2Shader:
|
|
511
|
-
"""Iteratively adds an offset to the position of each stroke vertex
|
|
634
|
+
"""Iteratively adds an offset to the position of each stroke vertex
|
|
635
|
+
in the direction perpendicular to the stroke direction at the
|
|
636
|
+
point. The offset is scaled by the 2D curvature (i.e. how quickly
|
|
637
|
+
the stroke curve is) at the point.
|
|
638
|
+
"""
|
|
512
639
|
|
|
513
|
-
def shade(self, stroke):
|
|
640
|
+
def shade(self, stroke):
|
|
641
|
+
"""
|
|
642
|
+
|
|
643
|
+
:param stroke:
|
|
644
|
+
"""
|
|
645
|
+
...
|
|
514
646
|
|
|
515
647
|
class pyFXSVaryingThicknessWithDensityShader:
|
|
516
648
|
"""Assigns thickness to a stroke based on the density of the diffuse map."""
|
|
517
649
|
|
|
518
|
-
def shade(self, stroke):
|
|
650
|
+
def shade(self, stroke):
|
|
651
|
+
"""
|
|
652
|
+
|
|
653
|
+
:param stroke:
|
|
654
|
+
"""
|
|
655
|
+
...
|
|
519
656
|
|
|
520
657
|
class pyGuidingLineShader:
|
|
521
|
-
|
|
658
|
+
""" """
|
|
659
|
+
|
|
660
|
+
def shade(self, stroke):
|
|
661
|
+
"""
|
|
662
|
+
|
|
663
|
+
:param stroke:
|
|
664
|
+
"""
|
|
665
|
+
...
|
|
522
666
|
|
|
523
667
|
class pyHLRShader:
|
|
524
|
-
"""Controls visibility based upon the quantitative invisibility (QI)
|
|
668
|
+
"""Controls visibility based upon the quantitative invisibility (QI)
|
|
669
|
+
based on hidden line removal (HLR).
|
|
670
|
+
"""
|
|
671
|
+
|
|
672
|
+
def shade(self, stroke):
|
|
673
|
+
"""
|
|
525
674
|
|
|
526
|
-
|
|
675
|
+
:param stroke:
|
|
676
|
+
"""
|
|
677
|
+
...
|
|
527
678
|
|
|
528
679
|
class pyImportance2DThicknessShader:
|
|
529
|
-
"""Assigns thickness based on distance to a given point in 2D space.
|
|
680
|
+
"""Assigns thickness based on distance to a given point in 2D space.
|
|
681
|
+
the thickness is inverted, so the vertices closest to the
|
|
682
|
+
specified point have the lowest thickness.
|
|
683
|
+
"""
|
|
530
684
|
|
|
531
|
-
def shade(self, stroke):
|
|
685
|
+
def shade(self, stroke):
|
|
686
|
+
"""
|
|
687
|
+
|
|
688
|
+
:param stroke:
|
|
689
|
+
"""
|
|
690
|
+
...
|
|
532
691
|
|
|
533
692
|
class pyImportance3DThicknessShader:
|
|
534
693
|
"""Assigns thickness based on distance to a given point in 3D space."""
|
|
535
694
|
|
|
536
|
-
def shade(self, stroke):
|
|
695
|
+
def shade(self, stroke):
|
|
696
|
+
"""
|
|
697
|
+
|
|
698
|
+
:param stroke:
|
|
699
|
+
"""
|
|
700
|
+
...
|
|
537
701
|
|
|
538
702
|
class pyIncreasingColorShader:
|
|
539
703
|
"""Fades from one color to another along the stroke."""
|
|
540
704
|
|
|
541
|
-
def shade(self, stroke):
|
|
705
|
+
def shade(self, stroke):
|
|
706
|
+
"""
|
|
707
|
+
|
|
708
|
+
:param stroke:
|
|
709
|
+
"""
|
|
710
|
+
...
|
|
542
711
|
|
|
543
712
|
class pyIncreasingThicknessShader:
|
|
544
713
|
"""Increasingly thickens the stroke."""
|
|
545
714
|
|
|
546
|
-
def shade(self, stroke):
|
|
715
|
+
def shade(self, stroke):
|
|
716
|
+
"""
|
|
717
|
+
|
|
718
|
+
:param stroke:
|
|
719
|
+
"""
|
|
720
|
+
...
|
|
547
721
|
|
|
548
722
|
class pyInterpolateColorShader:
|
|
549
723
|
"""Fades from one color to another and back."""
|
|
550
724
|
|
|
551
|
-
def shade(self, stroke):
|
|
725
|
+
def shade(self, stroke):
|
|
726
|
+
"""
|
|
727
|
+
|
|
728
|
+
:param stroke:
|
|
729
|
+
"""
|
|
730
|
+
...
|
|
552
731
|
|
|
553
732
|
class pyLengthDependingBackboneStretcherShader:
|
|
554
|
-
"""Stretches the stroke's backbone proportional to the stroke's length
|
|
733
|
+
"""Stretches the stroke's backbone proportional to the stroke's length
|
|
734
|
+
NOTE: you'll probably want an l somewhere between (0.5 - 0). A value that
|
|
735
|
+
is too high may yield unexpected results.
|
|
736
|
+
"""
|
|
555
737
|
|
|
556
|
-
def shade(self, stroke):
|
|
738
|
+
def shade(self, stroke):
|
|
739
|
+
"""
|
|
740
|
+
|
|
741
|
+
:param stroke:
|
|
742
|
+
"""
|
|
743
|
+
...
|
|
557
744
|
|
|
558
745
|
class pyMaterialColorShader:
|
|
559
746
|
"""Assigns the color of the underlying material to the stroke."""
|
|
560
747
|
|
|
561
|
-
def shade(self, stroke):
|
|
748
|
+
def shade(self, stroke):
|
|
749
|
+
"""
|
|
750
|
+
|
|
751
|
+
:param stroke:
|
|
752
|
+
"""
|
|
753
|
+
...
|
|
562
754
|
|
|
563
755
|
class pyModulateAlphaShader:
|
|
564
756
|
"""Limits the stroke's alpha between a min and max value."""
|
|
565
757
|
|
|
566
|
-
def shade(self, stroke):
|
|
758
|
+
def shade(self, stroke):
|
|
759
|
+
"""
|
|
760
|
+
|
|
761
|
+
:param stroke:
|
|
762
|
+
"""
|
|
763
|
+
...
|
|
567
764
|
|
|
568
765
|
class pyNonLinearVaryingThicknessShader:
|
|
569
766
|
"""Assigns thickness to a stroke based on an exponential function."""
|
|
570
767
|
|
|
571
|
-
def shade(self, stroke):
|
|
768
|
+
def shade(self, stroke):
|
|
769
|
+
"""
|
|
770
|
+
|
|
771
|
+
:param stroke:
|
|
772
|
+
"""
|
|
773
|
+
...
|
|
572
774
|
|
|
573
775
|
class pyPerlinNoise1DShader:
|
|
574
|
-
"""Displaces the stroke using the curvilinear abscissa.
|
|
776
|
+
"""Displaces the stroke using the curvilinear abscissa. This means
|
|
777
|
+
that lines with the same length and sampling interval will be
|
|
778
|
+
identically distorted.
|
|
779
|
+
"""
|
|
575
780
|
|
|
576
|
-
def shade(self, stroke):
|
|
781
|
+
def shade(self, stroke):
|
|
782
|
+
"""
|
|
783
|
+
|
|
784
|
+
:param stroke:
|
|
785
|
+
"""
|
|
786
|
+
...
|
|
577
787
|
|
|
578
788
|
class pyPerlinNoise2DShader:
|
|
579
|
-
"""Displaces the stroke using the strokes coordinates.
|
|
789
|
+
"""Displaces the stroke using the strokes coordinates. This means
|
|
790
|
+
that in a scene no strokes will be distorted identically.More information on the noise shaders can be found at:
|
|
791
|
+
https://freestyleintegration.wordpress.com/2011/09/25/development-updates-on-september-25/
|
|
792
|
+
"""
|
|
580
793
|
|
|
581
|
-
def shade(self, stroke):
|
|
794
|
+
def shade(self, stroke):
|
|
795
|
+
"""
|
|
796
|
+
|
|
797
|
+
:param stroke:
|
|
798
|
+
"""
|
|
799
|
+
...
|
|
582
800
|
|
|
583
801
|
class pyRandomColorShader:
|
|
584
802
|
"""Assigns a color to the stroke based on given seed."""
|
|
585
803
|
|
|
586
|
-
def shade(self, stroke):
|
|
804
|
+
def shade(self, stroke):
|
|
805
|
+
"""
|
|
806
|
+
|
|
807
|
+
:param stroke:
|
|
808
|
+
"""
|
|
809
|
+
...
|
|
587
810
|
|
|
588
811
|
class pySLERPThicknessShader:
|
|
589
812
|
"""Assigns thickness to a stroke based on spherical linear interpolation."""
|
|
590
813
|
|
|
591
|
-
def shade(self, stroke):
|
|
814
|
+
def shade(self, stroke):
|
|
815
|
+
"""
|
|
816
|
+
|
|
817
|
+
:param stroke:
|
|
818
|
+
"""
|
|
819
|
+
...
|
|
592
820
|
|
|
593
821
|
class pySamplingShader:
|
|
594
|
-
"""Resamples the stroke, which gives the stroke the amount of
|
|
822
|
+
"""Resamples the stroke, which gives the stroke the amount of
|
|
823
|
+
vertices specified.
|
|
824
|
+
"""
|
|
595
825
|
|
|
596
|
-
def shade(self, stroke):
|
|
826
|
+
def shade(self, stroke):
|
|
827
|
+
"""
|
|
828
|
+
|
|
829
|
+
:param stroke:
|
|
830
|
+
"""
|
|
831
|
+
...
|
|
597
832
|
|
|
598
833
|
class pySinusDisplacementShader:
|
|
599
834
|
"""Displaces the stroke in the shape of a sine wave."""
|
|
600
835
|
|
|
601
|
-
def shade(self, stroke):
|
|
836
|
+
def shade(self, stroke):
|
|
837
|
+
"""
|
|
838
|
+
|
|
839
|
+
:param stroke:
|
|
840
|
+
"""
|
|
841
|
+
...
|
|
602
842
|
|
|
603
843
|
class pyTVertexRemoverShader:
|
|
604
844
|
"""Removes t-vertices from the stroke."""
|
|
605
845
|
|
|
606
|
-
def shade(self, stroke):
|
|
846
|
+
def shade(self, stroke):
|
|
847
|
+
"""
|
|
848
|
+
|
|
849
|
+
:param stroke:
|
|
850
|
+
"""
|
|
851
|
+
...
|
|
607
852
|
|
|
608
853
|
class pyTVertexThickenerShader:
|
|
609
854
|
"""Thickens TVertices (visual intersections between two edges)."""
|
|
610
855
|
|
|
611
|
-
def shade(self, stroke):
|
|
856
|
+
def shade(self, stroke):
|
|
857
|
+
"""
|
|
858
|
+
|
|
859
|
+
:param stroke:
|
|
860
|
+
"""
|
|
861
|
+
...
|
|
612
862
|
|
|
613
863
|
class pyTimeColorShader:
|
|
614
|
-
"""Assigns a grayscale value that increases for every vertex.
|
|
864
|
+
"""Assigns a grayscale value that increases for every vertex.
|
|
865
|
+
The brightness will increase along the stroke.
|
|
866
|
+
"""
|
|
867
|
+
|
|
868
|
+
def shade(self, stroke):
|
|
869
|
+
"""
|
|
615
870
|
|
|
616
|
-
|
|
871
|
+
:param stroke:
|
|
872
|
+
"""
|
|
873
|
+
...
|
|
617
874
|
|
|
618
875
|
class pyTipRemoverShader:
|
|
619
|
-
"""Removes the tips of the stroke.
|
|
876
|
+
"""Removes the tips of the stroke.Undocumented"""
|
|
620
877
|
|
|
621
|
-
def shade(self, stroke):
|
|
878
|
+
def shade(self, stroke):
|
|
879
|
+
"""
|
|
880
|
+
|
|
881
|
+
:param stroke:
|
|
882
|
+
"""
|
|
883
|
+
...
|
|
622
884
|
|
|
623
885
|
class pyZDependingThicknessShader:
|
|
624
|
-
"""Assigns thickness based on an object's local Z depth (point
|
|
886
|
+
"""Assigns thickness based on an object's local Z depth (point
|
|
887
|
+
closest to camera is 1, point furthest from camera is zero).
|
|
888
|
+
"""
|
|
889
|
+
|
|
890
|
+
def shade(self, stroke):
|
|
891
|
+
"""
|
|
625
892
|
|
|
626
|
-
|
|
893
|
+
:param stroke:
|
|
894
|
+
"""
|
|
895
|
+
...
|