-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfoder2.py
More file actions
56 lines (43 loc) · 1.42 KB
/
foder2.py
File metadata and controls
56 lines (43 loc) · 1.42 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
import os
'''
folder_path = 'C:/Users/Administrator/AppData/Roaming/Blender Foundation/Blender/2.90/scripts/addons/AutoMech/Preset'
#path = folder_path.replace("/", "/")
path = os.path.realpath(folder_path)#soft os.path.abspath
os.startfile(path)
for filename in os.listdir(os.getcwd()):
#with open(os.path.join(os.getcwd(), filename), 'r')
print(os.path.join(os.getcwd(), filename))
FileList=''
for filename in os.listdir(os.getcwd()):
#with open(os.path.join(os.getcwd(), filename), 'r')
FileList+=' '+filename
print(FileList)
FileList=[]
for file in os.listdir(os.getcwd()):
#with open(os.path.join(os.getcwd(), filename), 'r')
filename=file.split('.', 1)
if len(filename[0]) < 1:
FileList.append(filename[1])
else:
FileList.append(filename[0])
print(len(FileList))
'''
#for i in FileList:
#print(i)
FileList=[]
enum_items = [
('MechPro', 'MechPro', "Multiple Modifier"),
('Helmet', "Helmet", "GenMech low poly procedural helmet mesh"),
('Mechfy', "Mechfy", "Created by Emiliano Colantoni for the first time")
]
FolderPath=os.path.dirname(__file__)+'//Preset//'
for file in os.listdir(FolderPath):
filename=file.split('.', 1)
if len(filename[0]) < 1:
FileList.append(filename[1])
else:
FileList.append(filename[0])
for name in FileList:
enum_items.append((name, name, ""))
#print(name, name, "")
print(enum_items)