Skip to content

Instantly share code, notes, and snippets.

@whoiscarlo
Created April 16, 2015 18:45
Show Gist options
  • Save whoiscarlo/61c74952064add74ad63 to your computer and use it in GitHub Desktop.
Save whoiscarlo/61c74952064add74ad63 to your computer and use it in GitHub Desktop.
import OpenImageIO
exr_filPath = 'x:/project/testfolder/testImage.exr'
def edit_exr( exr_filPath):
#renames Channels
newimg = OpenImageIO.ImageBuf(exr_filPath)
#adds metadata
newimg.specmod().attribute("subRound","r2")
newimg.specmod().attribute("nukeRef","0000")
#writes image
newimg.write(exr_filPath)
@cjarv
Copy link

cjarv commented Apr 16, 2015

*newimg.specmod().attribute("cgiRef","f1")
remove "newimg.specmod().attribute("nukeRef","0000")"

@cjarv
Copy link

cjarv commented Apr 16, 2015

metadataClicked = Signal.emit(self.write_exr)

def write_exr(self):
#this will execute the command when the metadata button is pressed
for i in fileList:
if i.type() == ".exr"
self.exr_edit()
else:
pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment