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

Pablo Giménez pablogipi at gmail.com
Tue Mar 23 16:39:37 EDT 2010


Cool it worked!
One more thing, I have seen that every entry has an id.
In your code snippet you put the python script directly in the XML file.
Is there any way I can assign a python script to this id, I mean, the
standar entries in the menu just have an id, so I guess there is some kind
of combention about how to write a python script for an id entry from the
menu, at least these standar entries are calling to comething isn't it?
thx


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

> It's just like most other config things you can have in Houdini: you
> can have multiples.  Just copy the one in $HH and remove all the
> entries or create a new one and just put your own entries in it and
> stick it somewhere in the HOUDINI_PATH and you'll be good.
>
> 2010/3/23 Pablo Giménez <pablogipi at gmail.com>:
> > 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
> > _______________________________________________
> > 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