[Sidefx-houdini-list] Run Script doesn't like Python???

Pablo Giménez pablogipi at gmail.com
Tue Mar 23 12:38:17 EDT 2010


Thanks Graham for the info.
Is there any way to have your own MainMenuCommon that just add your custom
entries.
I guess you are modifying the MainMenuCommon file in $HH or making a copy to
your home to override the one from the install location.
I don't want to override the whole file, just have a file with a bunch of
XML that add my own entries to the existing menu in Houdini.
For instance in Maya I can use MEL to add entries to the main menu created
by the mel script shipped with the package.
I want to do something similar with Houdini.
thanks.

2010/3/22 Graham Thompson <captainhammy at gmail.com>

> I ended up writing my own simple one and throwing it into MainMenuCommon.
>
>      <scriptItem id="runpythonscript">
>         <label>Run Python Script</label>
> <modifyItem><insertAfter>h.source</insertAfter></modifyItem>
> <scriptCode><![CDATA[filepath = hou.ui.selectFile(title="Select Python
> script to run", pattern="*.py")
> if len(filepath) is not 0:
>     fullpath = hou.expandString(filepath)
>     execfile(fullpath)]]></scriptCode>
>       </scriptItem>
>
> 2010/3/22 Pablo Giménez <pablogipi at gmail.com>
> >
> > Hi.
> > I am trying to source some python script using the File menu entry "Run
> > Script .."
> > Seems it only works with HScript, no chance for Python scripts created
> using
> > the hou.Node.asCode() method.
> > I can load these scripts using the python function execute() from a
> python
> > shell.
> > Using version 10.0.312
> > Thanks
> >
> > --
> > Un saludo
> > Best Regards
> > Pablo Giménez
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



-- 
Un saludo
Best Regards
Pablo Giménez



More information about the Sidefx-houdini-list mailing list