2023-08-16 00:20:26 +10:00
|
|
|
# SPDX-FileCopyrightText: 2008-2023 Blender Authors
|
2023-06-15 13:09:04 +10:00
|
|
|
#
|
2022-02-11 09:07:11 +11:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2013-02-24 23:43:40 +00:00
|
|
|
|
2017-07-25 01:27:43 +10:00
|
|
|
# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin
|
2013-03-24 00:53:05 +00:00
|
|
|
# Date : 08/04/2005
|
|
|
|
|
|
2013-11-24 22:18:38 +00:00
|
|
|
from freestyle.chainingiterators import ChainSilhouetteIterator
|
|
|
|
|
from freestyle.predicates import (
|
|
|
|
|
QuantitativeInvisibilityUP1D,
|
|
|
|
|
pyDensityUP1D,
|
|
|
|
|
pyZBP1D,
|
|
|
|
|
)
|
|
|
|
|
from freestyle.shaders import (
|
|
|
|
|
ConstantColorShader,
|
|
|
|
|
ConstantThicknessShader,
|
|
|
|
|
SamplingShader,
|
|
|
|
|
)
|
2013-12-30 23:43:47 +09:00
|
|
|
from freestyle.types import IntegrationType, Operators, Stroke
|
|
|
|
|
|
2009-09-19 22:02:15 +00:00
|
|
|
|
|
|
|
|
Operators.select(QuantitativeInvisibilityUP1D(0))
|
2013-02-24 02:39:38 +00:00
|
|
|
Operators.bidirectional_chain(ChainSilhouetteIterator())
|
2023-03-01 22:12:18 +11:00
|
|
|
# Operators.sequential_split(pyVertexNatureUP0D(Nature.VIEW_VERTEX), 2)
|
2009-09-19 22:02:15 +00:00
|
|
|
Operators.sort(pyZBP1D())
|
2013-02-24 23:43:40 +00:00
|
|
|
shaders_list = [
|
|
|
|
|
ConstantThicknessShader(3),
|
|
|
|
|
SamplingShader(5.0),
|
|
|
|
|
ConstantColorShader(0, 0, 0, 1),
|
|
|
|
|
]
|
|
|
|
|
Operators.create(pyDensityUP1D(2, 0.05, IntegrationType.MEAN, 4), shaders_list)
|