Jump to content

Save as


felo44

Recommended Posts

Hi,

Someone know how to use "save as" in Pyhton?

Note: I'm looking for the same functionality as the "save as" under file drop menu. Therefore saveAsBackup() is not ideal.

Thanks,

Edited by felo44
Link to comment
Share on other sites

I usually do something like this in that case:

originalFile = hou.hipFile.path()

# run the code I posted earlier to save the file here

hou.hipFile.setName(originalFile)

So after the code runs the file is reverted back to kind of an untouched state.

If you wanted to wrap that up into a saveAs() function it should be pretty easy

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...