Changes between Version 10 and Version 11 of DevelopGuide


Ignore:
Timestamp:
Sep 20, 2008, 11:42:25 PM (16 years ago)
Author:
Frédéric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevelopGuide

    v10 v11  
    66  * [#Hardware Hardware]
    77  * [#Model Model]
     8   * [#Custompresets Custom presets]
    89  * [#View View]
    910 * [#Distributing Distributing]
     
    3132=== Model ===
    3233
     34==== Custom presets ====
     35
     36The current (1.0) version does not allow user to add its own presets, at least not from the GUI. But it is not very difficult to modify the code to do that. Juste edit the {{{<install_dir>/papywizard/common/config.py}}} file, and add the new preset(s) in the '''PRESET_INDEX''' and '''PRESET''' vars. The first one is used by the GUI to build the list of presets (in a Combo Box), and contains a double-entry dict. The integer is the position of the preset in the GUI list. The second var contains the presets. Note that the names must match!
     37
     38A preset is just a python dict., where the key is its name (as listed in the GUI), and the value a list of tuple, where each tuple is the ''(yaw, pitch)'' position to shoot. Note that it is possible to use The {{{None}}} value as position; in this case, the given axis won't move, but rather stay at the previous position. This is mainly used for ''zenith'' and ''nadir'', where the ''yaw'' position does not matter. Example:
     39
     40{{{
     41PRESET_INDEX = {'4@0 + Z + N': 0,
     42                '3@-15 + Z': 1,
     43                '6@-15 + 6@30 + N': 2,
     44                '3 + 6 + 12 + 6 + 3 (28mm)': 3,
     45                0: '4@0 + Z + N',
     46                1: '3@-15 + Z',
     47                2: '6@-15 + 6@30 + N',
     48                3: '3 + 6 + 12 + 6 + 3 (28mm)'}
     49
     50
     51PRESET = {'4@0 + Z + N': [(  0.,   0.), (90., 0.), (180., 0.), (270., 0.),
     52                          (None,  90.),
     53                          (None, -90.)],
     54          '3@-15 + Z': [(  0., -15.), (120., -15.), (240., -15.),
     55                        (None,  90.)],
     56          '6@-15 + 6@30 + N': [(  0., -15.), ( 60., -15.), (120., -15.), (180., -15.), (240., -15.), (300., -15.),
     57                               (300.,  30.), (240.,  30.), (180.,  30.), (120.,  30.), ( 60.,  30.), (  0.,  30.),
     58                               (None, -90.)],
     59          '3 + 6 + 12 + 6 + 3 (28mm)': [( 30.,  70.), (150.,  70.), (270.,  70.),
     60                                        (300.,  40.), (240.,  40.), (180.,  40.), (120.,  40.), ( 60.,  40.), (  0.,  40.),
     61                                        (  0.,  10.), ( 30., -10.), ( 60.,  10.), ( 90., -10.), (120.,  10.), (150., -10.), (180.,  10.), (210.,-10.), (240.,  10.), (270.,-10.), (300.,  10.), (330.,-10.),
     62                                        (300., -40.), (240., -40.), (180., -40.), (120., -40.), ( 60., -40.), (  0., -40.),
     63                                        ( 30., -70.), (150., -70.), (270., -70.)]}
     64}}}
     65
    3366=== View ===
    3467