Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2005-03-19 09:24:55 +0300
committerWillian Padovani Germano <wpgermano@gmail.com>2005-03-19 09:24:55 +0300
commita96ed881dc04d0a2ce6ab742f7682042e466b0a7 (patch)
treed5d787dc224d4b7c3f3e3d64a98bef0525d436e9 /release
parentcbbe236f9237cd7a942e250493b6c7402300deb7 (diff)
BPython:
- Scripts: fixed error in "Save Current Theme" which prevented it from automatically updating script registration in menus. cosmetic changes in a couple of Campbell's sel_same.py script strings + more descriptive name for its new menu place (3d view, face mode -> select menu). small updates to help_browser.py script. The above changes are related to this: - Added new script menu entries: Render (for exporters to renderers), Themes, FaceSelect (this already at the proper place). Updated Scripts win->Scripts menu so it won't show all available entries, only the ones we mean to see there. - Updated menu registration so that scripts folders can become trees. The release/scripts/ dir should be updated soon with subdirs like converters/, modifiers/, generators/ or whatever -- better discuss first (or is it? /me afraid of long irc discussions during meetings :) ). - Modules: Blender: added 'udatadir' option to .Get() function and added var Blender.mode to tell if Blender is in bg or interactive mode. NMesh: added Campbell's nmesh.transform(matrix, recalc_normals = False) method (reworked, so my fault if it doesn't work). - Bugs fixed: #2123: http://projects.blender.org/tracker/?func=detail&atid=125&aid=2123&group_id=9 Reported by Ken Hughes (thanks!), who also found the exact problem later (it was in Text.Load, not with script links -- if only I had checked emails these days ... lost > 1 hour today to find the problem: passed filename to M_Text_Load was later being written over by a function called by add_text). Also saw that Text.Load wasn't checking existence of passed filename (duh!), now it does. #1655: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1655&group_id=9 Reported by Chris Want (thanks!): command line "blender -P script" not working properly for bg mode ("blender -b blendfile -P script"). Had to make some small updates to get it working (bg mode for scripts was never explicitely handled, it worked due to collateral effects, let's say), interested readers can check the report after I update it or the API_intro.py doc file. After more testing we can make further updates. Updated many places to not call redraws if in bg mode, now it is officially available. Blender outputs its own info when rendering in bg mode, if that is considered a nuissance we'll have to add a few "if (during_script())" calls outside bpython. - Removed a few warnings here and there and also updated docs.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/help_browser.py6
-rw-r--r--release/scripts/save_theme.py17
-rw-r--r--release/scripts/sel_same.py26
3 files changed, 24 insertions, 25 deletions
diff --git a/release/scripts/help_browser.py b/release/scripts/help_browser.py
index 550a494c97b..bcac4b791d2 100644
--- a/release/scripts/help_browser.py
+++ b/release/scripts/help_browser.py
@@ -380,7 +380,7 @@ def parse_help_info(script):
fname = bsys.join(path, script.fname)
if not bsys.exists(fname):
- Draw.PupMenu('IO Error|Couldn\'t find script %s' % fname)
+ Draw.PupMenu('IO Error: Couldn\'t find script %s' % fname)
return None
f = file(fname, 'r')
@@ -473,7 +473,7 @@ def parse_bpymenus(lines):
i += 1
l = lines[i].strip()
- AllGroups.reverse()
+# AllGroups.reverse()
def create_group_menus():
@@ -554,7 +554,7 @@ def gui(): # drawing the screen
if SCREEN == START_SCREEN:
x = PADDING
- bw = 70
+ bw = 85
bh = 25
hincr = 50
diff --git a/release/scripts/save_theme.py b/release/scripts/save_theme.py
index 4713c63a9ff..a79de94f4ea 100644
--- a/release/scripts/save_theme.py
+++ b/release/scripts/save_theme.py
@@ -1,7 +1,7 @@
#!BPY
"""
-Name: 'Save Current Theme'
+Name: 'Save Current Theme...'
Blender: 236
Group: 'Export'
Tooltip: 'Save current theme as a bpython script'
@@ -71,14 +71,14 @@ def write_theme(filename):
# \"\"\"
# Name: '%s'
-# Blender: 234
-# Group: 'Theme'
+# Blender: 236
+# Group: 'Themes'
# Tooltip: 'Change current theme'
# \"\"\"
__%s__ = "????"
__%s__ = "1.0"
-__%s__ = [""]
+__%s__ = ["blender"]
__%s__ = \"\"\"\\
You can edit this section to write something about your script that can
be read then with the Scripts Help Browser script in Blender.
@@ -112,10 +112,9 @@ theme = Theme.New('%s')
fout.write('\nBlender.Redraw(-1)')
fout.close()
+ try:
+ Blender.UpdateMenus()
+ except:
+ Blender.Draw.PupMenu("Warning - check console!%t|Menus could not be automatically updated")
FileSelector(write_theme, "Save Current Theme", default_fname)
-
-try:
- Blender.UpdateMenus()
-except:
- Blender.Draw.PupMenu("Warning - check console!%t|Menus could not be automatically updated")
diff --git a/release/scripts/sel_same.py b/release/scripts/sel_same.py
index f37d1083c48..1ff39d38f4c 100644
--- a/release/scripts/sel_same.py
+++ b/release/scripts/sel_same.py
@@ -1,10 +1,10 @@
#!BPY
"""
-Name: 'Select Same Faces'
+Name: 'Similar to Active'
Blender: 234
-Group: 'UV'
-Tooltip: 'Select faces if attributes match the active'
+Group: 'FaceSelect'
+Tooltip: 'Select faces that match a given attribute of the active face'
"""
__author__ = "Campbell Barton"
@@ -28,7 +28,7 @@ script and choose the selection rule: by same (or similar for some itens):
- area;<br>
- proportions;<br>
- normal vector;<br>
-- co-planar.
+- coplanar.
Another menu will ask if the script should add, subtract, overwrite or
overwrite inverse of current current selection. For some choices like vcolors,
@@ -80,7 +80,7 @@ from math import sqrt
# Sanity checks #
#====================================#
def error(str):
- Draw.PupMenu('ERROR%t|'+str)
+ Draw.PupMenu('ERROR: '+str)
af = None
selection = Object.GetSelected()
if len(selection) == 0:
@@ -88,7 +88,7 @@ if len(selection) == 0:
else:
object = Object.GetSelected()[0]
if object.getType() != 'Mesh':
- error('Not a mesh')
+ error('Active object must be a mesh')
else:
mesh = object.getData()
@@ -97,7 +97,7 @@ else:
if af: af = mesh.faces[af]
if af == None:
- error('no active face')
+ error('No active face')
else: # Okay everything seems sane
@@ -105,16 +105,16 @@ else: # Okay everything seems sane
# Popup menu to select the functions #
#====================================#
method = Draw.PupMenu(\
- 'Select Same as Active%t|\
+ 'Selection Attribute%t|\
Material|\
UV Image|\
Face Mode|\
Vertex Colours|\
- UV CO-Ords|\
+ UV Coordinates|\
Area|\
- Proportions|\
- Normal|\
- Co-Planer|')
+ Edge Proportions|\
+ Normal Vector|\
+ Coplanar|')
if method != -1:
#================================================#
@@ -389,7 +389,7 @@ else: # Okay everything seems sane
if limit != None:
get_same_normal(limit)
elif method == 9: # coplaner
- limit = getLimit('coplaner limit: ')
+ limit = getLimit('coplanar limit: ')
if limit != None:
get_same_coplaner(limit)