diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-07-25 20:55:45 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-07-25 20:55:45 +0400 |
commit | c50e3f374fe08713b573559904c5f53d852c5e13 (patch) | |
tree | c5bc2eb290f96c6ad4916de6f5b15c57ffcb79a7 /release/scripts | |
parent | fe9336eb880a1a97121e5f2a6a94c93870d4549b (diff) |
BPython:
- new submodule Scene.Radio, for radiosity: still incomplete, but in shape for demos, updated SConscript to include it;
- new functions in Window module;
- doc updates: adding a todo file and a new start page for our docs: API_intro.py + other updates;
- small fix in Ipo.c provided by Damien McGuinnes (thanks!): Nathan has a patch with IPO additions and fixes for this and more, but until it is committed, there's this fix for Ipo.getCurve('LocX'), LocY, Z and QuatW,X,Y,Z too, according to Damien.
Other files:
- radpreprocess.c: added check for "during_script()" so eventual msgs don't popup during scripts;
- drawmesh.c: made a pointer (display list) be checked before accessed, fixes crash in scripts that forget to update display lists for subsurf meshes when a 3d view is in textured view mode.
Script: updated bevel_center by Loic Berthe.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/bevel_center.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/release/scripts/bevel_center.py b/release/scripts/bevel_center.py index e40c25b3ec1..37c7b64c12a 100644 --- a/release/scripts/bevel_center.py +++ b/release/scripts/bevel_center.py @@ -2,11 +2,13 @@ """ Registration info for Blender menus Name: 'Bevel Center' -Blender: 232 +Blender: 233 Group: 'Mesh' Tip: 'Bevel selected vertices.' """ +# $Id$ +# ###################################################################### # Bevel Center v1 for Blender # @@ -369,7 +371,7 @@ def draw(): Button("Bevel",EVENT_BEVEL,10,100,280,25) left=Number('', EVENT_NOEVENT,10,70,45, 20,left.val,0,right.val,'Set the minimum of the slider') right = Number("",EVENT_NOEVENT,245,70,45,20,right.val,left.val,200,"Set the maximum of the slider") - dist=Slider("Thickness ",EVENT_UPDATE,60,70,180,20,dist.val,left.val,right.val,0,"Thickness of the bevel") + dist=Slider("Thickness ",EVENT_UPDATE,60,70,180,20,dist.val,left.val,right.val,0,"Thickness of the bevel, can be changed even after bevelling") glRasterPos2d(8,40) Text('To finish, you can use recursive bevel to smooth it') num=Number('', EVENT_NOEVENT,10,10,40, 16,num.val,1,100,'Recursion level') @@ -377,7 +379,7 @@ def draw(): Button("Exit",EVENT_EXIT,210,10,80,20) def event(evt, val): - if (evt == QKEY and not val): + if ((evt == QKEY or evt == ESCKEY) and not val): Exit() def bevent(evt): @@ -403,12 +405,9 @@ def bevel(): """ The main function, which creates the bevel """ global me,NF,NV,NE,NC, old_dist # + is_editmode = Window.EditMode() + if is_editmode: Window.EditMode(0) 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 = [] @@ -425,12 +424,14 @@ def bevel(): old_dist = dist.val # me.update(1) - if editmode: Window.EditMode(1) + if is_editmode: Window.EditMode(1) Blender.Redraw() def bevel_update(): """ Use NV to update the bevel """ global dist, old_dist + is_editmode = Window.EditMode() + if is_editmode: Window.EditMode(0) fac = dist.val - old_dist old_dist = dist.val # @@ -440,6 +441,7 @@ def bevel_update(): NV[old_v][dir].co[i] += fac*dir.co[i] # me.update(1) + if is_editmode: Window.EditMode(1) Blender.Redraw() def recursive(): |