On May 19, 2011 03:33:12 AM kfj wrote:
> I have the niggling feeling that if anyone developing an itch there
> would find scratching dosn't help.

don't worry about that.  sometimes, scratching on beton helps redirect the 
itch, and there are more solutions than direct scratching, as you found out 
yourself when you adopted Kububtu ;-)


> T. Modes has a good overview of the difficulties involved (or, maybe
> knows if they have disappeared with a new version)

These will become FAQ.  Need to document them.  The Wiki is the natural place.  
On the todo list for the 2011.2 release cycle [0].  Started [1]

 
> > Is there already a canonical location for the scripts?  where are they
> > installed?
> 
> There's no need to install them, since hugin's 'run Python script'
> dialog is a plain file-select

I beg to differ.  I would want to package and install some scripts.  Some will 
be examples/snippets and some will be a fully functional collection of 
scripts, and maybe a whole echosystem of script-writers will develop around 
this feature.  Having a canonical location will help immensly.

I see two kind of scripts: system-wide and user-only.  With two canonical 
locations.

I suggest storing system-wide scripts in the same data/ folder 
(/usr/local/share/hugin/data/ on my machine) as the celeste.model and 
default.settings files.

This is where a "contributed scripts collection" can live and grow.

For user-scripts, I suggest a preferences setting that defaults to ~/hugin-
scripts/ (on Linux, and something equivalent on other architectures).

The latest Hugin is still being built on my netbook, so I am not sure how much 
of the following is already implemented and how much is a wish list.

I assume the file-select dialog you mention is one to select the script to 
run?

If yes, I will want it to have quick shortcuts for the two locations; and a 
preference for which one of the two should show as default.  I suspect it will 
be the system-wide one for most users; and the user-only one for tinkerers and 
power users.

I would also want to have a menu shortcut to add a new script / edit an 
existing user-script.  It would open the system-wide editor at appropriate 
location.

And since the system-wide scripts are (or should) not be user-writable, it 
would also be nice to have a button to make an editable copy of such a script 
in the user-scripts folder and start editing right away.

Not sure if I expressed my wishes clearly enough, I will get back on this once 
I have the most recent default up and running and I have actually played with 
the python scripting functionality.


> The hsi and hpi modules are currently installed at defined locations
> by cmake - on my machine, for example, they are put to /usr/local/lib/
> python2.7/dist-packages; they have to be in PYTHON_PATH and I thought
> this a good place..

yes, these are the plumbings and make sense.  the user does not need to be 
concerned about them.  it's the scripts themselves that need a canonical 
location.

Yuv


[0] https://bugs.launchpad.net/hugin/+bug/785120
[1] http://wiki.panotools.org/Hugin_FAQ#Python_Scripting

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to