blob: e79e2095608080f1f40ce597ef7dccc0dcd7c834 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!BPY
"""
Name: 'B-Brush Sculpter'
Blender: 240
Group: 'Mesh'
Tooltip: 'Sculpt the active mesh (adds a scriptlink)'
"""
import Blender
def main():
name = 'mesh_bbrush.py'
for t in Blender.Text.Get():
if t.name.startswith(name):
Blender.Draw.PupMenu('ERROR: Script "%s" alredy imported, aborting load.' % name)
return
# Load the text
datadir = Blender.Get('datadir')
if not datadir.endswith(Blender.sys.sep):
datadir += Blender.sys.sep
path= datadir + name
try:
t = Blender.Text.Load(path)
except:
Blender.Draw.PupMenu('ERROR: "%s" not found.' % path)
pup_input = [\
'B-Brush Usage (message only)%t',
'Enable B-Brush by',
'selecting the "View" menu, then',
'"Space Handeler Scripts",',
'"%s"' % name,
'LMB to sculpt, RMB for prefs, Shift reverses pressure',
]
#Blender.Draw.PupBlock('%s loaded' % name ,pup_input)
Blender.Draw.PupMenu('|'.join(pup_input))
if __name__ == '__main__':
main()
|