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

« back to all changes in this revision

Viewing changes to release/scripts/disp_paint.py

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!BPY
 
2
 
 
3
""" Registration info for Blender menus: <- these words are ignored
 
4
Name: 'Dispaint'
 
5
Blender: 233
 
6
Group: 'Mesh'
 
7
Tip: 'use vertex paint color value to modify shape displacing vertices along normal'
 
8
"""
 
9
 
 
10
__author__ = "Jean-Michel Soler (jms)"
 
11
__url__ = ("blender", "elysiun",
 
12
"Script's homepage, http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_displacementpainting.htm",
 
13
"Communicate problems and errors, http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender")
 
14
__version__ = "233i"
 
15
 
 
16
__bpydoc__ = """\
 
17
This script displaces mesh vertices according to vertex color values.
 
18
 
 
19
Usage:
 
20
 
 
21
Select the mesh, enter Edit Mode and run this script to open its GUI.  Options
 
22
include setting mode, orientation, size and number of repetitions of the
 
23
displacement.  You can enter Vertex Paint mode and alternate applying
 
24
displacements and painting parts of the mesh.
 
25
 
 
26
Orientation includes vertex normals, local coordinates and noise (you may need
 
27
to resize the scripts window to view the noise menu below the "Last Error:"
 
28
line.  This menu lets you define noise type from the many options available in
 
29
Blender.
 
30
 
 
31
Notes:<br>
 
32
    The "Create" button will make at any time a copy of the active mesh in its
 
33
current state, so you can keep it and continue working on the copy;<br>
 
34
    One of the great possible uses of this script is to "raise" terrain from a
 
35
subdivided plane, for example, with good control of the process by setting
 
36
options, defining orientation and alternating vertex painting with
 
37
displacements.
 
38
"""
 
39
 
 
40
#----------------------------------------------
 
41
# jm soler, displacement paint 03/2002 - > 05/2004:  disp_paintf
 
42
# Terrain Noise added suugered by Jimmy Haze  
 
43
#----------------------------------------------
 
44
# Page officielle :
 
45
#   http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_displacementpainting.htm
 
46
# Communiquer les problemes et erreurs sur:
 
47
#   http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender
 
48
#--------------------------------------------- 
 
49
# ce script est propos� sous licence GPL pour etre associe
 
50
# a la distribution de Blender 2.33
 
51
#----------------------------------------------
 
52
# this script is released under GPL licence
 
53
# for the Blender 2.33 scripts package
 
54
#----------------------------------------------
 
55
# ***** BEGIN GPL LICENSE BLOCK *****
 
56
#
 
57
# Copyright (C) 2003, 2004: Jean-Michel Soler
 
58
#
 
59
# This program is free software; you can redistribute it and/or
 
60
# modify it under the terms of the GNU General Public License
 
61
# as published by the Free Software Foundation; either version 2
 
62
# of the License, or (at your option) any later version.
 
63
#
 
64
# This program is distributed in the hope that it will be useful,
 
65
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
66
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
67
# GNU General Public License for more details.
 
68
#
 
69
# You should have received a copy of the GNU General Public License
 
70
# along with this program; if not, write to the Free Software Foundation,
 
71
# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
72
#
 
73
# ***** END GPL LICENCE BLOCK *****
 
74
# --------------------------------------------------------------------------
 
75
#  09/07/04 : Noise functions based on a piece of script by Jimmy Haze.
 
76
# --------------------------------------------------------------------------
 
77
 
 
78
import Blender
 
79
from Blender import *
 
80
from Blender.Draw import *
 
81
from Blender.BGL import *
 
82
from Blender.Noise import *
 
83
from Blender.Scene  import *
 
84
sc=Scene.getCurrent()
 
85
 
 
86
# niveau du deplacement
 
87
ng=0.5
 
88
 
 
89
# noise default
 
90
NOISE=1
 
91
 
 
92
# profondeur des couleurs primaires rgb
 
93
maxcol=255.0*3
 
94
 
 
95
# limitation de la zone de travail sur le
 
96
# le materiau numer mat du tableau d'indices 
 
97
# des materiaux. Par defaut mat =-1 ce qui signifie 
 
98
# que toute la surface est traitee
 
99
mat=[]
 
100
vindex=[]
 
101
ORIName=''
 
102
NEWName=''
 
103
ERROR=0
 
104
TextERROR=''
 
105
 
 
106
E_EXIT     = 1
 
107
E_MODE     = 2
 
108
E_ORIENT   = 3
 
109
E_NSIZE    = 4
 
110
E_REPEAT   = 5
 
111
E_ACTION   = 16
 
112
E_CREATE   = 17
 
113
E_DOCMAT   = 24
 
114
E_MATVAL   = [32,33,34,35,36,37,38,39,40,41,42,43,44]
 
115
E_AXESEL   = 45
 
116
E_AXESELX  = 46
 
117
E_AXESELY  = 47
 
118
E_AXESELZ  = 48
 
119
 
 
120
E_NOISEME  = 49
 
121
E_NOISEH   = 50
 
122
E_NOISELAC = 51
 
123
E_NOISEOCT = 52
 
124
E_NOISEOFF = 53
 
125
E_NOISEBAS = 54
 
126
E_NOISEVAL=[E_NOISEH,E_NOISELAC,E_NOISEOCT,E_NOISEOFF,E_NOISEBAS]
 
127
E_NOISEDIM = 55
 
128
 
 
129
ExitTIP="Exit from this script session "
 
130
CreateTIP="Create a new copy of the selected shape"
 
131
ActionTIP="Do the current selected actions"
 
132
 
 
133
 
 
134
def copy_transform(ozero,Obis):
 
135
         Obis.setSize(ozero.getSize());
 
136
         Obis.setEuler(ozero.getEuler());
 
137
         Obis.setLocation(ozero.getLocation())
 
138
         return Obis
 
139
 
 
140
def traite_face(f):
 
141
      global vindexm, ng, NOISE, NOISEDIM
 
142
      global H,lacunarity,octaves,offset,basis
 
143
 
 
144
      if ORIENTMenu.val==1:
 
145
         for z in range(len(f.v)):
 
146
            c=0.0
 
147
            if vindex[f.v[z].index]!=0:
 
148
               c=float(f.col[z].r+f.col[z].b+f.col[z].g)/maxcol*ng/vindex[f.v[z].index]
 
149
            else:
 
150
              c=0
 
151
 
 
152
            f.v[z].co[0]=f.v[z].co[0]+f.v[z].no[0]*c
 
153
            f.v[z].co[1]=f.v[z].co[1]+f.v[z].no[1]*c 
 
154
            f.v[z].co[2]=f.v[z].co[2]+f.v[z].no[2]*c
 
155
 
 
156
      elif ORIENTMenu.val==2:
 
157
          for z in range(len(f.v)): 
 
158
            c=0.0
 
159
            if vindex[f.v[z].index]!=0:
 
160
               c=float(f.col[z].r+f.col[z].b+f.col[z].g)/maxcol*ng/vindex[f.v[z].index]
 
161
            else:
 
162
              c=0
 
163
            for t in range(3):
 
164
               if TAXEList[1][t].val==1:
 
165
                  f.v[z].co[t]=f.v[z].co[t]+c
 
166
 
 
167
      elif ORIENTMenu.val==3 and NOISE<9:
 
168
         for z in range(len(f.v)):
 
169
            c=0.0
 
170
            if vindex[f.v[z].index]!=0:
 
171
               nx=f.v[z].co[0]/NOISEDIM
 
172
               ny=f.v[z].co[1]/NOISEDIM
 
173
               nz=f.v[z].co[2]/NOISEDIM
 
174
               nn = ng * noise((nx,ny,nz),NOISE)
 
175
               c=float(f.col[z].r+f.col[z].b+f.col[z].g)/maxcol*nn/vindex[f.v[z].index]
 
176
            else:
 
177
              c=0
 
178
            f.v[z].co[0]=f.v[z].co[0]+f.v[z].no[0]*c
 
179
            f.v[z].co[1]=f.v[z].co[1]+f.v[z].no[1]*c
 
180
            f.v[z].co[2]=f.v[z].co[2]+f.v[z].no[2]*c
 
181
 
 
182
      elif ORIENTMenu.val==3 and NOISE==9:
 
183
         for z in range(len(f.v)):
 
184
            c=0.0
 
185
            if vindex[f.v[z].index]!=0:
 
186
               nx=f.v[z].co[0]/NOISEDIM
 
187
               ny=f.v[z].co[1]/NOISEDIM
 
188
               nz=f.v[z].co[2]/NOISEDIM
 
189
               nn = ng * cellNoise((nx,ny,nz))
 
190
               c=float(f.col[z].r+f.col[z].b+f.col[z].g)/maxcol*nn/vindex[f.v[z].index]
 
191
            else:
 
192
              c=0
 
193
            f.v[z].co[0]=f.v[z].co[0]+f.v[z].no[0]*c
 
194
            f.v[z].co[1]=f.v[z].co[1]+f.v[z].no[1]*c
 
195
            f.v[z].co[2]=f.v[z].co[2]+f.v[z].no[2]*c
 
196
 
 
197
      elif ORIENTMenu.val==3 and NOISE==10:
 
198
         for z in range(len(f.v)):
 
199
            c=0.0
 
200
            if vindex[f.v[z].index]!=0:
 
201
               nx=f.v[z].co[0]/NOISEDIM
 
202
               ny=f.v[z].co[1]/NOISEDIM
 
203
               nz=f.v[z].co[2]/NOISEDIM
 
204
               nn = ng * heteroTerrain((nx,ny,nz),H,lacunarity,octaves,offset,basis)
 
205
               c=float(f.col[z].r+f.col[z].b+f.col[z].g)/maxcol*nn/vindex[f.v[z].index]
 
206
            else:
 
207
              c=0
 
208
            f.v[z].co[0]=f.v[z].co[0]+f.v[z].no[0]*c
 
209
            f.v[z].co[1]=f.v[z].co[1]+f.v[z].no[1]*c
 
210
            f.v[z].co[2]=f.v[z].co[2]+f.v[z].no[2]*c
 
211
 
 
212
 
 
213
def paint():
 
214
      global MODEMenu, vindex,ng, mat, ORIName, NEWName
 
215
      global ERROR, TextERROR
 
216
         
 
217
      Me=Object.GetSelected()
 
218
      if Me!=[]:
 
219
         if Me[0].getType()=='Mesh':   
 
220
                    
 
221
               vindex=[]
 
222
               ORIName=Me[0].getData().name
 
223
               me=NMesh.GetRaw(Me[0].getData().name)
 
224
                  
 
225
               try:  
 
226
                   for m in me.verts:
 
227
                      vindex.append(0)
 
228
                     
 
229
                   for f in me.faces:
 
230
                       for v in f.v:
 
231
                               if MODEMenu.val!=2:
 
232
                                  if MODEMenu.val==1:    
 
233
                                     vindex[v.index]+=1
 
234
                                  else:
 
235
                                     if v.sel==1:
 
236
                                         vindex[v.index]+=1                                       
 
237
                               else:
 
238
                                  #print mat 
 
239
                                  if f.mat in mat:
 
240
                                     vindex[v.index]+=1
 
241
                   for f in me.faces:
 
242
                     if MODEMenu.val==2: 
 
243
                       if f.mat in mat:
 
244
                          traite_face(f) 
 
245
                     else:
 
246
                          traite_face(f)
 
247
                   #Me[0].link(me)
 
248
                   me.update()
 
249
                   Me[0].makeDisplayList()
 
250
               except:
 
251
                  ERROR=2
 
252
                  TextERROR='No color on this Object.' 
 
253
                  
 
254
def NEWMEcreation(obj):
 
255
       
 
256
      if obj.getType()=='Mesh':
 
257
         nomdelobjet="";
 
258
         objnumber=-1; namelist=[]
 
259
         OBJ=Object.Get()
 
260
 
 
261
         for ozero in OBJ:
 
262
            if ozero.getType()=='Mesh': 
 
263
                namelist.append(ozero.getData().name)
 
264
 
 
265
         ozero=obj
 
266
         nomdelobjet=ozero.getName()
 
267
         Mesh=Blender.NMesh.GetRawFromObject(nomdelobjet)
 
268
         name=obj.getData().name
 
269
         n=0; name2=name[:];ok=0  
 
270
 
 
271
         while ok==0:
 
272
             for n0 in namelist:
 
273
                 if n0.find(name2)==0:
 
274
                    ok=0;name2=name[0:name.find('.')+1]+'%s'%(n+1) 
 
275
                 else: ok=1
 
276
                 n+=1
 
277
 
 
278
         Mesh.name=name2
 
279
         Obis = Blender.NMesh.PutRaw(Mesh,name2)
 
280
         copy_transform(ozero,Obis)
 
281
         Obis.makeDisplayList()
 
282
 
 
283
def DOCMat_list(TMATList):
 
284
    global mat    
 
285
    Me=Object.GetSelected()
 
286
    if Me!=[]:
 
287
       if Me[0].getType()=='Mesh':
 
288
            me=NMesh.GetRaw(Me[0].getData().name) 
 
289
            if len(me.materials)!=0: 
 
290
                n=0 
 
291
                for mat in me.materials:
 
292
                    TMATList[1][n][0]=mat.R
 
293
                    TMATList[1][n][1]=mat.G
 
294
                    TMATList[1][n][2]=mat.B
 
295
                    n+=1
 
296
                TMATList[0]=n
 
297
            else:
 
298
              TMATList[0]=0
 
299
            return TMATList
 
300
 
 
301
MOname = "MODE MENU %t|Normal %x1|Material %x2|Selected %x3"
 
302
ORname = "ORIENT MENU %t|From Normal %x1|Local Axes %x2| Noise %x3"
 
303
NOname = "NOISE MENU %t|BLENDER %x1|STDPERLIN %x2|NEWPERLIN %x3|VORONOI_F1%x4|VORONOI_F2%x5|VORONOI_F3%x6|VORONOI_F4%x7|VORONOI_F2F1%x8|VORONOI_CRACKLE%x9|CELLNOISE%x10|HETEROTENOISE%x11"
 
304
 
 
305
MODEMenu = Create(1)
 
306
ORIENTMenu = Create(1)
 
307
NOISEMenu = Create(1)
 
308
 
 
309
NSIZE = Create(1.0)
 
310
TDOCMat = Create(0)
 
311
NRepeat = Create(1)
 
312
 
 
313
H=1.0
 
314
lacunarity=2.0
 
315
octaves=5.0
 
316
offset=1.0
 
317
basis=3
 
318
 
 
319
NOISEDIM=4
 
320
NOISEDIMbout=Create(NOISEDIM)
 
321
HBout=Create(H)
 
322
lacunarityBout=Create(lacunarity)
 
323
octavesBout=Create(octaves)
 
324
offsetBout=Create(offset)
 
325
basisBout=Create(basis)
 
326
 
 
327
 
 
328
noiseTYPE={0:'BLENDER',
 
329
           1:'STDPERLIN',
 
330
           2:'STDPERLIN',
 
331
           3:'NEWPERLIN',
 
332
           4:'VORONOI_F1',
 
333
           5:'VORONOI_F2',
 
334
           6:'VORONOI_F3',
 
335
           7:'VORONOI_F2F1',
 
336
           8:'VORONOI_CRACKLE',
 
337
           9:'CELLNOISE'}        
 
338
 
 
339
TMATList= [0,[],[]] 
 
340
 
 
341
for t in range(16):
 
342
    TMATList[1].append([0.0,0.0,0.0])
 
343
    TMATList[2].append(Create(0))
 
344
 
 
345
TAXEList=[['X','Y','Z'],[]]
 
346
for t in range(3):
 
347
    TAXEList[1].append(Create(0))
 
348
 
 
349
glCr=glRasterPos2d
 
350
glCl3=glColor3f
 
351
glCl4=glColor4f
 
352
glRct=glRectf
 
353
 
 
354
 
 
355
 
 
356
def draw():
 
357
    global MODEMenu, NSIZE, TDOCMat,TMATList, TAXEList
 
358
    global mat, ORIName, NEWName, ORIENTMenu 
 
359
    global NRepeat, ERROR, TextERROR , NOISE, NOISEMenu, NOISEDIMbout,NOISEDIM
 
360
    global HBout,lacunarityBout,octavesBout,offsetBout,basisBout
 
361
    global noiseTYPE, ExitTIP, CreateTIP, ActionTIP
 
362
    
 
363
    size=Buffer(GL_FLOAT, 4)
 
364
    glGetFloatv(GL_SCISSOR_BOX, size)
 
365
    size= size.list
 
366
 
 
367
    for s in [0,1,2,3]: size[s]=int(size[s])
 
368
    
 
369
    glClear(GL_COLOR_BUFFER_BIT)
 
370
 
 
371
    glColor3f(0.0,0.0,0.0)
 
372
    glRectf(4,size[3],534,size[3]-32 )
 
373
 
 
374
    glColor3f(1.0,1.0,1.0)
 
375
    glRasterPos2f(20, size[3]-15)
 
376
    Text("Script Python de displacement paintingt")
 
377
 
 
378
    glRasterPos2f(20, size[3]-28)
 
379
    Text("Jean-michel Soler, juillet 2004")
 
380
 
 
381
   
 
382
    n0=70
 
383
    n1=55
 
384
 
 
385
    Button("Create"                ,E_CREATE  ,5  ,size[3]-n0+16  ,60 ,20,CreateTIP)
 
386
    Button("Action"                ,E_ACTION  ,5  ,size[3]-n0-4  ,60 ,20,ActionTIP)
 
387
    Button("Exit"                  ,E_EXIT   ,5  ,size[3]-n0-24  ,60 ,20,ExitTIP)
 
388
    
 
389
    NRepeat=Number("repeat"        ,E_REPEAT   ,5  ,size[3]-n0-50     ,75 ,20, NRepeat.val,1,10)    
 
390
    
 
391
    glColor3f(0.0,0.0,0.0)
 
392
    glRasterPos2f(80  ,size[3]-n0+24)
 
393
    Text("MODE")
 
394
 
 
395
    MODEMenu= Menu(MOname,          E_MODE  ,80  ,size[3]-n0 ,100,20, MODEMenu.val, "MODE menu.")
 
396
 
 
397
    if MODEMenu.val==2:
 
398
       TDOCMat=Toggle("Doc Mat"     ,E_DOCMAT  ,180  ,size[3]-n0 ,60 ,20,TDOCMat.val)    
 
399
       if TDOCMat.val==1:
 
400
             #print TMATList 
 
401
             for t in range(TMATList[0]):
 
402
                 glCl3(TMATList[1][t][0],
 
403
                       TMATList[1][t][1],
 
404
                       TMATList[1][t][2]) 
 
405
                 glRct(80+t*40,
 
406
                       size[3]-n0-60,
 
407
                       80+t*40+40,
 
408
                       size[3]-n0-60+40)
 
409
                 TMATList[2][t]=Toggle("%s"%t , 32+t ,80+t*40+5  ,size[3]-n0-50  ,30 , 20,TMATList[2][t].val)
 
410
                 
 
411
    glColor3f(1.0,0.3,0.0)
 
412
    glRasterPos2f(80+40+5  ,size[3]-n0-80)
 
413
    if ERROR>1:
 
414
         Text('Last error : '+TextERROR)
 
415
    else:
 
416
         Text('Last error :                      ')
 
417
 
 
418
    glColor3f(0.0,0.0,0.0)
 
419
    glRasterPos2f(240  ,size[3]-n0+24)
 
420
    Text("ORIENTATION")
 
421
    ORIENTMenu= Menu(ORname,        E_ORIENT    ,240  ,size[3]-n0 ,100,20, ORIENTMenu.val, "ORIENT menu.")
 
422
 
 
423
    if ORIENTMenu.val==2 :
 
424
       for t in range(3):
 
425
          TAXEList[1][t]=Toggle("%s"%TAXEList[0][t],
 
426
                         E_AXESEL+t, 
 
427
                         240+100+t*30 , size[3]-n0  ,30 , 20,
 
428
                         TAXEList[1][t].val)
 
429
 
 
430
    
 
431
    if ORIENTMenu.val==3 :
 
432
       glRasterPos2f(240  ,size[3]-n0-90-4)
 
433
       Text("NOISE")
 
434
       NOISEMenu= Menu(NOname,         E_NOISEME    , 240  ,size[3]-n0-118 ,110,20, NOISEMenu.val, "NOISE menu.")
 
435
       NOISEDIMbout=Number(" Dim: "     ,E_NOISEDIM   , 240  ,size[3]-n0-138 ,110,20, NOISEDIMbout.val, 1,100)
 
436
 
 
437
       if NOISEMenu.val==11:
 
438
          basisBout=Slider(noiseTYPE[basisBout.val],   
 
439
                                              E_NOISEBAS  ,40  ,size[3]-n0-118 ,175,20, basisBout.val, 0,9,)
 
440
          HBout= Slider("H",                  E_NOISEH  ,40  ,size[3]-n0-138 ,175,20, HBout.val, -2.0,+2.0,0,)
 
441
          lacunarityBout=Slider("lacunarity", E_NOISELAC ,40  ,size[3]-n0-158 ,175,20, lacunarityBout.val, -4.0,+4.0,0,)
 
442
          octavesBout=Slider("octave",        E_NOISEOCT  ,40  ,size[3]-n0-178 ,175,20, octavesBout.val, -10.0,+10.0,0,)
 
443
          offsetBout=Slider("offset",         E_NOISEOFF  ,40  ,size[3]-n0-198 ,175,20, offsetBout.val, -5.0,+5.0,0,)
 
444
 
 
445
    NSIZE= Slider("Disp Size",      E_NSIZE  ,80  ,size[3]-n0-20 ,260,20, NSIZE.val, -4.0,+4.0,0,"SIZE.")
 
446
 
 
447
 
 
448
                 
 
449
 
 
450
def event(evt, val):    
 
451
    if (evt== QKEY and not val): Exit()
 
452
 
 
453
def bevent(evt):
 
454
    global MODEMenu, NSIZE, ng, TMATList
 
455
    global mat, ORIENTMenu, NRepeat, TAXEList 
 
456
    global ERROR,TextERROR, NOISE, NOISEMenu, NOISEDIMbout,NOISEDIM
 
457
    global HBout,lacunarityBout,octavesBout,offsetBout,basisBout
 
458
    global H,lacunarity,octaves,offset,basis
 
459
    
 
460
    if   (evt== E_EXIT):
 
461
        Exit()
 
462
 
 
463
 
 
464
    elif   (evt== E_ACTION):
 
465
       for n in range(NRepeat.val):
 
466
          paint()
 
467
 
 
468
    elif   (evt== E_NSIZE):
 
469
       ng=NSIZE.val
 
470
 
 
471
    elif   (evt== E_DOCMAT) or (evt in E_MATVAL):
 
472
      Me=Object.GetSelected()
 
473
      if Me!=[]:
 
474
         if Me[0].getType()=='Mesh':   
 
475
            TMATList=DOCMat_list(TMATList)
 
476
            mat=[]
 
477
            for TMat in TMATList[2]:
 
478
               if TMat.val==1.0:
 
479
                   mat.append(TMATList[2].index(TMat))  
 
480
            ERROR=0
 
481
         else:
 
482
            ERROR=1
 
483
            TextERROR='Selected Object is not a mesh.'    
 
484
      else:
 
485
          ERROR=1
 
486
          TextERROR='No Selected Object.'  
 
487
      
 
488
 
 
489
    elif   (evt== E_CREATE):
 
490
         
 
491
           NEWMEcreation(Blender.Object.GetSelected()[0])
 
492
           Blender.Draw.Redraw()
 
493
         
 
494
           ERROR=1
 
495
           TextERROR='No Selected Object.'
 
496
 
 
497
    elif   (evt== E_NOISEME):
 
498
       NOISE=NOISEMenu.val-1
 
499
 
 
500
    elif   (evt in E_NOISEVAL):
 
501
       H=HBout.val
 
502
       lacunarity=lacunarityBout.val
 
503
       octaves=octavesBout.val
 
504
       offset=offsetBout.val
 
505
       basis=basisBout.val
 
506
 
 
507
    elif (evt== E_NOISEDIM):
 
508
           NOISEDIM=NOISEDIMbout.val
 
509
 
 
510
    Blender.Draw.Redraw()
 
511
 
 
512
Register(draw, event, bevent)