Creating a custom saver

   2439   6   1
User Avatar
Member
12 posts
Joined: Jan. 2017
Offline
Hello,

I was wondering if anyone has done this and has any advice or example code they could share please?

I want to be able to create a saver that saves the project in a certain location depending on what I set the job and shot to be and iterates versions for example..

Cheers
Edited by sideeffectsuser - May 24, 2017 06:35:37
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Hi

You can simply make two global variables for Shot and Job name ,Then simply use hou.hipFile module to access these variables and save your project based on them.


example :

currentFile = hou.hipfile

currentFile.setName(“/anywhere/blablabla.hip”)

currentFile.save()
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
12 posts
Joined: Jan. 2017
Offline
Hey, thanks for the reply.

I feel like I didn't explain my problem well enough.

Is it possible to use this method via accessing a database?

Essentially, I want to present the user with a list of all our jobs (about 20 at the moment) then they will select one and then another field will present them with all the shots that that job has (by accessing the DB). Once those two options are selected, the project should then be saved to the specific location as specified by their selection.
User Avatar
Member
7734 posts
Joined: Sept. 2011
Online
I'm not sure what you are asking, is it possible to invoke a script/create a qt interface from within houdini? Then yes, it is possible. Does houdini have a some sort of database frontend built-in? No, it does not. You will need to write a qt app that does your backend database access/ui, and pass the path to the hou module save function. Most studios write some sort of tool exactly like this.
User Avatar
Member
12 posts
Joined: Jan. 2017
Offline
Hey,

Sorry for not being clear. Yeah, I have my own database that I want to access and present in the Qt app. I can imagine this is a very common thing to do. I was just looking for advice on the building of it.

So it sounds like I can build any Qt app I want and then somehow port it inside the Houdini GUI..
User Avatar
Member
12 posts
Joined: Jan. 2017
Offline
Ok, I figured out how to port it using the MainMenuCommon.xml file.

Now I just need to build the GUI. Anyone willing to share a simple one that I can use as a starting point?
User Avatar
Member
12 posts
Joined: Jan. 2017
Offline
All done.

For those who stumble upon this thread for the same reason, please head here and follow this “FontDemo” example:

http://www.sidefx.com/docs/houdini/hom/cb/qt [www.sidefx.com]

It was enough to get me started.
  • Quick Links