TwoThings Every Technical Artist Has to Know

Поделиться
HTML-код
  • Опубликовано: 26 сен 2024
  • TwoThings Every Technical Artist Has to Know
    In this tutorial, we will cover three crucial skills that every technical artist must master:
    1. Using Python for Selections: Learn how to efficiently pick and manage selections within your favorite 3D software.
    2. Setting Parameters, Attributes, and Knobs: Discover how to automate and customize parameters (Houdini), attributes (Maya), and knobs (Nuke) to streamline your workflow.
    Whether you're a beginner or looking to deepen your expertise, this tutorial is designed to provide you with practical skills and insights that you can immediately apply to your work. Let's dive in and explore the powerful capabilities of Python in the world of 3D software!
    Code:
    PICK SELECTION SET GET ATTRIBUTES IN MAYA
    import maya.cmds as mc
    Pick Selection
    sel = mc.ls(sl=1)
    Get Texture Node
    file_node = sel[0]
    Get Parameter Value
    parm = '{}.fileTextureName'.format(file_node)
    Get Parameter Value
    parm_value = mc.getAttr(parm)
    print(parm_value)
    Set Parameter Value
    mc.setAttr(parm, 'E:/ma/sourceimages/sloth_texture.jpg', type = 'string')
    parm_value = mc.getAttr(parm)
    print(parm_value)
    PICK SELECTION SET GET PARAMETERS IN HOUDINI
    import hou
    Pick Selection
    sel = hou.selectedNodes()
    Get File Node
    file_node = sel[0]
    Get Parameter
    parm = file_node.parm('file')
    Get Parameter Value
    parm_value = parm.eval()
    print(parm_value)
    Set Parameter Value
    parm.set('E:/_behind_the_magic/_src/ASSET_statues.abc')
    parm_value = parm.eval()
    print(parm_value)
    PICK SELECTION SET GET KNOBS IN NUKE
    import nuke
    Pick Selection
    sel = nuke.selectedNodes()
    Get Read Node
    read_node = sel[0]
    Get Knob
    knob = read_node.knob('file')
    Get Parameter Value
    knob_value = knob.value()
    print(knob_value)
    Set Parameter Value
    knob.setValue('E:/_comp/_out/drag_landing.mp4')
    knob_value = knob.value()
    print(knob_value)

Комментарии •