~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to release/scripts/config.py

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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,v 1.2 2007/05/06 15:47:07 ianwill Exp $
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: