I need to replace an OLD file with a NEW file within a reference. There is a referenceEdit command but no flags for replacing a file.
so ideally I need sth like:
cmds.referenceQuery( myReference, e=1, file=NEW )
I need to replace an OLD file with a NEW file within a reference. There is a referenceEdit command but no flags for replacing a file.
so ideally I need sth like:
cmds.referenceQuery( myReference, e=1, file=NEW )
You should be able to replace references by using the
file
command.Assuming your reference node's name is known (otherwise you can retrieve it via
referenceQuery
) and the name ismyReferenceRN
, you can do:This will update the file path which
myReferenceRN
currently points to, with the one you specify as the first argument of thefile
command (in this case,/path/to/new/reference/file.mb
).