expre-gen/blender/3.4/scripts/freestyle/styles/ignore_small_occlusions.py

30 lines
873 B
Python
Raw Normal View History

2025-10-17 09:47:23 +08:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Filename : ignore_small_occlusions.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : The strokes are drawn through small occlusions
from freestyle.chainingiterators import pyFillOcclusionsAbsoluteChainingIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
)
from freestyle.types import Operators
Operators.select(QuantitativeInvisibilityUP1D(0))
# Operators.bidirectional_chain(pyFillOcclusionsChainingIterator(0.1))
Operators.bidirectional_chain(pyFillOcclusionsAbsoluteChainingIterator(12))
shaders_list = [
SamplingShader(5.0),
ConstantThicknessShader(3),
ConstantColorShader(0.0, 0.0, 0.0),
]
Operators.create(TrueUP1D(), shaders_list)