How can I get the reference path of Yeti in Python?

How can I get the reference path of Yeti in Python?

2368457978
Enthusiast Enthusiast
378 Views
0 Replies
Message 1 of 1

How can I get the reference path of Yeti in Python?

2368457978
Enthusiast
Enthusiast

Hello, everyone, I want to get the reference node of Yeti node graph and get the file path and change it to a new path. My code is as follows. How should I define a reference?

75ff4bdfa7f5fdcd2a21bae8e8ad7a5.png

def set_yeti_reference_path(): all_yeti_nodes = mc.ls(sl=1, s=1, dag=1) new_path = mc.textField("edpath", q=True, text=True) + '/' new_path = new_path.replace('\\', '/') for node_name in all_yeti_nodes: rnodes = get_reference_node(node_name) if rnodes: for node in rnodes: refs = get_reference_path(node, node_name) ref_name = refs.split('/')[-1] set_reference_path(new_path + ref_name, node, node_name) print "Set scucessful: %s" % (new_path + ref_name)

0 Likes
379 Views
0 Replies
Replies (0)