It is currently 27 Mar 2017, 18:24

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: XPopMenu for Houdini
PostPosted: 12 Oct 2016, 10:25 
Offline

Joined: 07 Sep 2012, 14:24
Posts: 135
Hello,
I'm happy to share an XPopMenu script plugin for Houdini :ymparty: !
Originally developped on Softimage by Reinhard Claus (@rray) and after discussed with him about the portability :)] , I've developped a new version for Houdini.

In Bonus, I've added two tools :
- to quickly get a distance
- to quickly measure an angle

Quick demo :
phpBB [video]


Download on odforce forum at http://forums.odforce.net/topic/27662-xpopmenu-for-houdini/

Cheers


Top
 Profile  
 
 Post subject: Re: XPopMenu for Houdini
PostPosted: 12 Oct 2016, 10:37 
Offline
User avatar

Joined: 08 Dec 2011, 15:41
Posts: 132
The point of it is to have custom menu to add custom scripts? If so, you can do this right now by creating simple XML file that will add any tool to TAB menu (scripts, shelf tool or node). You can even customize existing tools and add them under completely different name to TAB menu.

The import path is overcomplicated. You can just add your path to houdini.env or create environment variable that will point to multiple places where you store your scripts/packages.


Top
 Profile  
 
 Post subject: Re: XPopMenu for Houdini
PostPosted: 12 Oct 2016, 11:08 
Offline
Moderator
User avatar

Joined: 26 Sep 2009, 15:51
Posts: 1263
Location: Bonn, Germany
Niiiice will be downloading Houdini Apprentice to see it in action (and I'll put a link on the XSI xPop page with the next rray website update)

@nodeway - I prefer having popup menus on different keys as opposed to one big popup for all. One click or keypress less per action justifies it already. But I'm a bit biased ;)

Cheers
-rr

_________________
Image rray.de, a resource site for softimage, updated Oct 15th 2016


Top
 Profile  
 
 Post subject: Re: XPopMenu for Houdini
PostPosted: 12 Oct 2016, 11:10 
Offline

Joined: 07 Sep 2012, 14:24
Posts: 135
Hi nodeway,

The idea is simply to not polute the actual factory tab menu which is already heavy (all houdini operations here).
And offer a more direct way to launch custom tools (without the need to deep into subMenu for some prefered operations).
If you want, you can also activate specifics tools in some context : for example in point selection you can display "fuse" operator on top of menu or a "cap hole" on edge selection.

About the import path, I exactly use a global path located in houdini.env which point to a default project that I have created (sort of Softimage workgroup).
And that's from this path that you access to any script : "workgroupPath/Scripts/myBeautifullScript.py"
But if you have a better way I really open to suggestion as I do not predent that's the one way.

The workflow to create xml file and customize the main menu could also be good to know.
I would be cool if you can detail the procedure :ymhug: .

Thanks.


Top
 Profile  
 
 Post subject: Re: XPopMenu for Houdini
PostPosted: 12 Oct 2016, 11:28 
Offline
User avatar

Joined: 08 Dec 2011, 15:41
Posts: 132
1. Than make your own section there, thanks to this you don't have to search far.
2. But you are expanding environment variable yourself, and then doing some other things. Wouldn't it be easier to just create something like this:
Code:
HOUDINI_SCRIPT_PATH = "$GITHUB_PATH/dcc-lib/Houdini/Home/scripts;&"

This takes care about all scripts in any current Houdini directory + your custom directory. And in this directory you just have you own scripts/packages. No need to expand anything.
HOUDINI_SCRIPT_PATH - is one of the default Houdini variables that you can override. If you want to know others launch Houdini CommandLineTools and type:
Code:
hconfig -all


What's the fuss with all those functionNameToCall ?
If you have everything set there right than all you need to import your custom stuff are 3 lines:
Code:
import myStuff
reload(myStuff)

myStuff.RunWhateverYouWant()


3. Wrangle nodes are made by custom XML file. This is the same one node, but under TAB menu you have it under 3 names, Point/Attribute/Primitive Wrangle. It uses XMl file with script that just launches it named and setup properly.


Top
 Profile  
 
 Post subject: Re: XPopMenu for Houdini
PostPosted: 12 Oct 2016, 12:12 
Offline

Joined: 07 Sep 2012, 14:24
Posts: 135
@rray,
Thanks ! For me you will always be Mr XPop ;) !


@nodeway,
Sorry, but what do you mean about "fuss with all those functionNameToCall" ?
Here, you just have to tweak "XPopExample.py" file to customize and build layout your script like this :
Code:
myMenu.addItem("Name to display", "scriptFolderPathToMyScript.py")
mySubMenu = myMenu.addSubMenu("Simple")
mySubMenu .addItem("Other Name", "scriptFolderPathToMyScript.py", "functionName")
etc..


Top
 Profile  
 
 Post subject: Re: XPopMenu for Houdini
PostPosted: 12 Oct 2016, 12:53 
Offline
User avatar

Joined: 08 Dec 2011, 15:41
Posts: 132
julca wrote:
Here, you just have to tweak "XPopExample.py" file to customize and build layout your script like this :
Code:
myMenu.addItem("Name to display", "scriptFolderPathToMyScript.py")
mySubMenu = myMenu.addSubMenu("Simple")
mySubMenu .addItem("Other Name", "scriptFolderPathToMyScript.py", "functionName")
etc..


You should made this part configurable thru XML or JSON and populate menu from this data. Never give users script that they have to modify something inside to work.

EDIT: I will try to modify it today, to show you how you should approach it so you could install it easier.


Top
 Profile  
 
 Post subject: Re: XPopMenu for Houdini
PostPosted: 12 Oct 2016, 13:37 
Offline
Moderator
User avatar

Joined: 26 Sep 2009, 15:51
Posts: 1263
Location: Bonn, Germany
That wouldn't allow context sensitivity which is part of the idea. It limits the circle of users a little, but the API is intentionally simple, and Houdini users are quite techy, so not too much I guess.

_________________
Image rray.de, a resource site for softimage, updated Oct 15th 2016


Top
 Profile  
 
 Post subject: Re: XPopMenu for Houdini
PostPosted: 24 Nov 2016, 23:13 
Offline
User avatar

Joined: 08 Dec 2011, 15:41
Posts: 132
Hey, I remember about you. Didn't had time to post, too many things at once. But I will come back to this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group