Jump to content

-P Python Filtering image:filename set property problem.


txrx

Recommended Posts

Hi there,

I'm using -P to run a python script to over ride the IFD's params for the image crop values to allow me to render out tiles for assembly once they're all done but when I use the below code regarding amending the file name...

def filterCamera():

< get tile number >
< set crop image values >
etc.



 OriginalName = mantra.property('image:filename')[0]
 TileNameData = "0.0_0.25_0.5_0.75"
 TileFileName = os.path.splitext(OriginalName)[0]+"_"+TileNameData+os.path.splitext(OriginalName)[1]
 mantra.setproperty('image:filename',TileFileName)

It still saves the output image with the original file name to disk from the IFD

Am I making this change at the right place or using the wrong def for python filtering? Must admit I'm pretty new to Houdini so there's every possiblity I've got it wrong here ;)

Using build 10463 on win64 machines (yea, I know windows etc but there you go)

Edited by txrx
Link to comment
Share on other sites

Hi there,

I'm using -P to run a python script to over ride the IFD's params for the image crop values to allow me to render out tiles for assembly once they're all done but when I use the below code regarding amending the file name...

def filterCamera():

< get tile number >
< set crop image values >
etc.



 OriginalName = mantra.property('image:filename')[0]
 TileNameData = "0.0_0.25_0.5_0.75"
 TileFileName = os.path.splitext(OriginalName)[0]+"_"+TileNameData+os.path.splitext(OriginalName)[1]
 mantra.setproperty('image:filename',TileFileName)

It still saves the output image with the original file name to disk from the IFD

Am I making this change at the right place or using the wrong def for python filtering? Must admit I'm pretty new to Houdini so there's every possiblity I've got it wrong here ;)

Using build 10463 on win64 machines (yea, I know windows etc but there you go)

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=83286#83286

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...