~ubuntu-branches/ubuntu/intrepid/blender/intrepid-updates

« back to all changes in this revision

Viewing changes to release/scripts/config.py

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-08-08 02:45:40 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080808024540-kkjp7ekfivzhuw3l
Tags: 2.46+dfsg-4
* Fix python syntax warning in import_dxf.py, which led to nasty output
  in installation/upgrade logs during byte-compilation, using a patch
  provided by the script author (Closes: #492280):
   - debian/patches/45_fix_python_syntax_warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
__author__ = "Willian P. Germano"
11
11
__version__ = "0.1 2005/04/14"
12
12
__email__ = ('scripts', 'Author, wgermano:ig*com*br')
13
 
__url__ = ('blender', 'elysiun')
 
13
__url__ = ('blender', 'blenderartists.org')
14
14
 
15
15
__bpydoc__ ="""\
16
16
This script can be used to view and edit configuration data stored
76
76
behaviors accordingly.
77
77
"""
78
78
 
79
 
# $Id: config.py,v 1.1 2005/04/16 05:25:41 ianwill Exp $
 
79
# $Id: config.py 14530 2008-04-23 14:04:05Z campbellbarton $
80
80
#
81
81
# --------------------------------------------------------------------------
82
82
# config.py version 0.1 2005/04/08
106
106
from Blender import Draw, BGL, Registry, Window, sys as bsys
107
107
from Blender.Window import Theme
108
108
from BPyRegistry import LoadConfigData, SaveConfigData, HasConfigData,\
109
 
        BPY_KEY_IN_FILE, MAX_STR_LEN, MAX_ITEMS_NUM
 
109
        BPY_KEY_IN_FILE
 
110
 
 
111
MAX_STR_LEN = 300 # max length for a string
 
112
MAX_ITEMS_NUM = 100 # max number for each type of button
110
113
 
111
114
# ---
112
115
# The "General" configure options key is managed from this script.
630
633
                                if tips and tips.has_key(l[0]): tooltip = tips[l[0]]
631
634
                                else: tooltip = "click to write a new string"
632
635
                                name = name.replace('_',' ') + ': '
 
636
                                if len(l[1]) > MAX_STR_LEN:
 
637
                                        l[1] = l[1][:MAX_STR_LEN]
633
638
                                BUT_TYPES[str][i] = Draw.String(name, BEVT_STR + i,
634
639
                                        x, y, w, h, l[1], MAX_STR_LEN, tooltip)
635
640
                                if is_dir: