레이어 페인팅 및 효과

PaintLayerNode 및 PaintEffectNode은(는) 브러시와 파티클로 페인트할 수 있는 노드 유형입니다.

예

import substance_painter as sp

# Get the currently displayed Stack
stack = sp.textureset.get_active_stack()

# Get top position of the Stack
position_stack_top = sp.layerstack.InsertPosition.from_textureset_stack(stack)

# It is also possible to create a Paint Effect with InsertPosition.inside_node()
# sp.layerstack.InsertPosition.inside_node(node, sp.layerstack.NodeStack.Content)
# sp.layerstack.InsertPosition.inside_node(node, sp.layerstack.NodeStack.Mask)

# Insert Paint Layer
my_paint_layer = sp.layerstack.insert_paint(position_stack_top)
my_paint_layer.set_name("My Paint Layer")

# Choose the passthrough Blending Mode
blending_mode = sp.layerstack.BlendingMode.Passthrough
# Check if node has a Blending feature (e.g.: Levels Effect does not)
if my_paint_layer.has_blending():
    # Apply the Blending Mode to the BaseColor Channel
    my_paint_layer.set_blending_mode(blending_mode, sp.textureset.ChannelType.BaseColor)

# Select the Paint layer
sp.layerstack.set_selected_nodes([my_paint_layer])

함수 및 클래스

substance_painter.layerstack.insert_node(position: InsertPosition) -> PaintLayerNode | PaintEffectNode substance_painter.layerstack.insert_paint

삽입 위치에 따라 페인트 효과나 레이어를 삽입합니다.

매개 변수: 위치(InsertPosition) - 위치 삽입.

상승:

ValueError - 잘못된 위치로 인해 삽입이 실패한 경우. InsertPosition 보기

삽입된 노드를 반환합니다.

반환 형식: PaintLayerNode | PaintEffectNode

class substance_painter.layerstack.PaintLayerNode(uid) substance_painter.layerstack.PaintLayerNode

기본: LayerNode

레이어 페인팅 조작을 허용하는 노드입니다.

NOTE
Python API에서 획에 액세스할 수 없습니다.

class substance_painter.layerstack.PaintEffectNode(uid) substance_painter.layerstack.PaintEffectNode

기본: Node

페인트 효과를 조작할 수 있는 노드입니다.

NOTE
Python API에서 획에 액세스할 수 없습니다.
recommendation-more-help
substance-3d-dev-help-painter-python-guide