diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-07-03 21:28:15 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-07-03 21:28:15 +0400 |
commit | cbe7471905bd6f34c00b5d1b6b9cde84f3f24cb4 (patch) | |
tree | e0a028d26d3cb6939c1ea396242d6f739fe124b0 /release/scripts | |
parent | 5c543698c9fd5377aee5630ed22a87921593a3ad (diff) |
Interface:
- added submenu "Scripts" in both View3D->Object and Mesh menus.
Put them on top (it's better to follow some guideline, so users don't have to search for "Scripts" submenu in a different position in each menu), feel free to change.
- added button 'previous win' to SpaceScript, makes accessing buttons win, for example, much faster. Maybe all spaces could have this button.
BPython:
- added Window.EditMode(), to check, enter and leave edit mode. Scripts that change mesh data need this to leave edit mode before making changes to the active (G.obedit) mesh, of course.
- updated script bevel_center to use the above function and also popup an error msg if the active obj is not a mesh.
- doc updates, minor fixes.
Forgot to mention in my previous commit that I also updated the "-P" command-line option (for running script files) to be able to run already loaded Blender Texts, too. So, if you have a script called 'Text' in foo.blend, you can run it with blender foo.blend -P Text .
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/bevel_center.py | 8 | ||||
-rw-r--r-- | release/scripts/disp_paint233f.py | 2 | ||||
-rw-r--r-- | release/scripts/unweld044.py | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/release/scripts/bevel_center.py b/release/scripts/bevel_center.py index eef2f630cea..e40c25b3ec1 100644 --- a/release/scripts/bevel_center.py +++ b/release/scripts/bevel_center.py @@ -19,7 +19,7 @@ Tip: 'Bevel selected vertices.' ###################################################################### import Blender -from Blender import NMesh +from Blender import NMesh, Window from Blender.Draw import * from Blender.BGL import * @@ -404,6 +404,11 @@ def bevel(): global me,NF,NV,NE,NC, old_dist # objects = Blender.Object.GetSelected() + if objects[0].getType() != "Mesh": + PupMenu("Error|Active object for bevelling must be a mesh.") + return + editmode = Window.EditMode() + if editmode: Window.EditMode(0) me = NMesh.GetRaw(objects[0].data.name) # NF = [] @@ -420,6 +425,7 @@ def bevel(): old_dist = dist.val # me.update(1) + if editmode: Window.EditMode(1) Blender.Redraw() def bevel_update(): diff --git a/release/scripts/disp_paint233f.py b/release/scripts/disp_paint233f.py index ed2db043fb2..d71d7857af2 100644 --- a/release/scripts/disp_paint233f.py +++ b/release/scripts/disp_paint233f.py @@ -4,7 +4,7 @@ Name: 'Dispaint' Blender: 233 Group: 'Mesh' -Tip: 'use vertex paint color value to modify shape displacing vertices along normal.' +Tip: 'Use vertex paint color value to modify shape displacing vertices along normal.' """ # $Id$ diff --git a/release/scripts/unweld044.py b/release/scripts/unweld044.py index d6fa71090a1..d93ef474703 100644 --- a/release/scripts/unweld044.py +++ b/release/scripts/unweld044.py @@ -3,7 +3,7 @@ Name: 'UnWeld' Blender: 232 Group: 'Mesh' -Tip: 'unweld all faces from one selected and commun vertex. Made vertex bevelling' +Tip: 'Unweld all faces from a selected and common vertex. Made vertex bevelling.' """ # $Id$ |