Browse Source

char attributes loading

shuvit 5 years ago
parent
commit
273d232632

+ 2
- 2
characters/becky.ini View File

@@ -2,7 +2,7 @@
2 2
 ###################
3 3
 #becky
4 4
 
5
-shirt_logo = 3
5
+shirt_logo = 2
6 6
 
7 7
 shirt_color_r = 0.61
8 8
 shirt_color_g = 0.61
@@ -15,7 +15,7 @@ shoe_color_b = 0.02
15 15
 
16 16
 #deck settings
17 17
 ##############
18
-deck_index = 2
18
+deck_index = 0
19 19
 deck_color_r = 1
20 20
 deck_color_g = 1.0
21 21
 deck_color_b = 1

+ 2
- 2
characters/ralph.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:2181900bf7864a7c8b1c51c70d40dcc6e6390ab874fa285d2ee461319a6a8f77
3
-size 5128460
2
+oid sha256:29eed6d82bd40a2ca6ca8fb9060c4fc2aa78eab75621e452e1f04bb9484c57cc
3
+size 3270524

+ 2
- 2
characters/ralph.blend1 View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:09be7de60e3738a09c618101f6ea2ad7a17d18ea2c916b44b7a7ac746930ac7a
3
-size 5124340
2
+oid sha256:2181900bf7864a7c8b1c51c70d40dcc6e6390ab874fa285d2ee461319a6a8f77
3
+size 5128460

+ 2
- 2
characters/ralph.ini View File

@@ -2,7 +2,7 @@
2 2
 ###################
3 3
 #ralph
4 4
 
5
-shirt_logo = 4
5
+shirt_logo = 1
6 6
 
7 7
 shirt_color_r = 0.54
8 8
 shirt_color_g = 0.4
@@ -15,7 +15,7 @@ shoe_color_b = 0.02
15 15
 
16 16
 #deck settings
17 17
 ##############
18
-deck_index = 7
18
+deck_index = 2
19 19
 deck_color_r = 1
20 20
 deck_color_g = 1.0
21 21
 deck_color_b = 1

+ 19
- 19
config.ini View File

@@ -48,40 +48,40 @@ walk_focal_length = 14
48 48
 #character settings
49 49
 ###################
50 50
 
51
-character = ralph
51
+character = becky
52 52
 
53
-shirt_logo = 4
53
+shirt_logo = 2
54 54
 
55
-shirt_color_r = 0.54
56
-shirt_color_g = 0.4
57
-shirt_color_b = 0.05
55
+shirt_color_r = 0.61
56
+shirt_color_g = 0.61
57
+shirt_color_b = 0.61
58 58
 
59
-shoe_color_r = 0.02
59
+shoe_color_r = 0.16
60 60
 shoe_color_g = 0.02
61 61
 shoe_color_b = 0.02
62 62
 #-----------------
63 63
 
64 64
 #deck settings
65 65
 ##############
66
-deck_index = 7
66
+deck_index = 0
67 67
 deck_color_r = 1
68 68
 deck_color_g = 1.0
69 69
 deck_color_b = 1
70
-trucks_r = 0.46
71
-trucks_g = 0.03
72
-trucks_b = 0.03
70
+trucks_r = 0.95
71
+trucks_g = 1.0
72
+trucks_b = 1
73 73
 
74
-wheel1_r = 1
75
-wheel1_g = 0.71
74
+wheel1_r = 0.4
75
+wheel1_g = 0.08
76 76
 wheel1_b = 0.08
77
-wheel2_r = 1
78
-wheel2_g = 0.71
77
+wheel2_r = 0.08
78
+wheel2_g = 0.34
79 79
 wheel2_b = 0.08
80
-wheel3_r = 1
81
-wheel3_g = 0.71
82
-wheel3_b = 0.08
83
-wheel4_r = 1
84
-wheel4_g = 0.71
80
+wheel3_r = 0.08
81
+wheel3_g = 0.08
82
+wheel3_b = 0.54
83
+wheel4_r = 0.4
84
+wheel4_g = 0.37
85 85
 wheel4_b = 0.08
86 86
 #-------------------
87 87
 

BIN
scripts/__pycache__/colors.cpython-36.pyc View File


BIN
scripts/__pycache__/menuV3.cpython-36.pyc View File


+ 31
- 15
scripts/colors.py View File

@@ -122,18 +122,22 @@ main()
122 122
 
123 123
 
124 124
 def update_truck_tex():
125
-    #deck graphic testing
126
-    #pass
127 125
     import glob
128 126
     import platform
127
+    dict = bge.logic.globalDict 
128
+    dict['deckList'] = []
129 129
     scene = bge.logic.getCurrentScene()
130 130
     deck = scene.objects["deck"]
131 131
     mainDir = bge.logic.expandPath("//")
132 132
     fileName = mainDir + "textures\\decks\\*.png"  
133
+    linux = False
133 134
     if platform.system() == 'Linux':
134
-        fileName = mainDir + 'textures//decks//*.png'  
135
+        fileName = mainDir + 'textures/decks//*.png'  
136
+        linux = True
137
+    deckList = []    
135 138
     deckList = glob.glob(fileName)
136 139
     dict['deckList'] = deckList  
140
+
137 141
     ID = texture.materialID(deck, 'MAdeck')
138 142
     deck_texture = texture.Texture(deck, ID)
139 143
     new_source = texture.ImageFFmpeg(deckList[dict["deck_index"]])
@@ -142,27 +146,34 @@ def update_truck_tex():
142 146
     bge.logic.texture.refresh(False)
143 147
     deck_name = deckList[dict['deck_index']]
144 148
     deck_name = deck_name.replace(mainDir, '')
145
-    deck_name = deck_name.replace('textures\decks', '' )
146
-    deck_name = deck_name.replace('.png', '')   
147
-    deck_name = deck_name.replace("\\", "")  
149
+    if linux == True:
150
+        deck_name = deck_name.replace('textures/decks/', '' )
151
+        deck_name = deck_name.replace('.png', '')   
152
+        deck_name = deck_name.replace("//", "")  
153
+    else:
154
+        deck_name = deck_name.replace('textures\decks', '' )
155
+        deck_name = deck_name.replace('.png', '')   
156
+        deck_name = deck_name.replace("\\", "")      
148 157
     print('deck texture updted to ', deck_name)
149 158
     dict['deck_name'] = deck_name
150 159
     
151 160
 def update_shirt_tex():
152
-    #pass
153
-    #deck graphic testing
154 161
     import glob
155 162
     import platform
156 163
     scene = bge.logic.getCurrentScene()
157
-    #deck = scene.objects["deck"]
164
+    dict = bge.logic.globalDict 
165
+    dict['shirtList'] = []
158 166
     shirt = scene.objects["Char4:Zshirtt1"]
159 167
     mainDir = bge.logic.expandPath("//")
160
-    fileName2 = mainDir + "textures\\shirt\\*.png"  
168
+    fileName2 = mainDir + "textures\\shirt\\*.png" 
169
+    linux = False 
161 170
     if platform.system() == 'Linux':
162
-        fileName2 = mainDir + 'textures//shirt//*.png'  
171
+        fileName2 = mainDir + 'textures/shirt//*.png' 
172
+        linux = True 
173
+    shirtList = []    
163 174
     shirtList = glob.glob(fileName2)
164 175
     dict['shirtList'] = shirtList  
165
-    print(shirtList, 'shirtList')
176
+    
166 177
     ID = texture.materialID(shirt, 'MAshirt')
167 178
     shirt_texture = texture.Texture(shirt, ID)
168 179
     new_source2 = texture.ImageFFmpeg(shirtList[dict["shirt_logo"]])
@@ -171,9 +182,14 @@ def update_shirt_tex():
171 182
     bge.logic.texture2.refresh(False)
172 183
     shirt_name = shirtList[dict['shirt_logo']]
173 184
     shirt_name = shirt_name.replace(mainDir, '')
174
-    shirt_name = shirt_name.replace('textures\shirt', '' )
175
-    shirt_name = shirt_name.replace('.png', '')   
176
-    shirt_name = shirt_name.replace("\\", "")  
185
+    if linux == True:
186
+        shirt_name = shirt_name.replace('textures/shirt/', '' )
187
+        shirt_name = shirt_name.replace('.png', '')   
188
+        shirt_name = shirt_name.replace("//", "")  
189
+    else:    
190
+        shirt_name = shirt_name.replace('textures\shirt', '' )
191
+        shirt_name = shirt_name.replace('.png', '')   
192
+        shirt_name = shirt_name.replace("\\", "")  
177 193
     print('shirt texture updted to ', shirt_name)
178 194
     dict['shirt_name'] = shirt_name    
179 195
 

+ 2
- 2
scripts/menuV3.py View File

@@ -599,7 +599,7 @@ def endpoint(funct, motion, dict, cont):
599 599
     if funct == 'shirt logo':
600 600
         if motion == 'inc':
601 601
             dict['shirt_logo'] = int(dict['shirt_logo'])
602
-            if dict['shirt_logo'] < len(dict['shirtList']):
602
+            if dict['shirt_logo'] < (len(dict['shirtList']) - 1):
603 603
                 dict['shirt_logo'] += 1
604 604
                 colors.update_shirt_tex() 
605 605
                 
@@ -1380,7 +1380,7 @@ def output(dict):
1380 1380
         if dict['current_opt'] == 'deck color b':
1381 1381
             outp = outp + ': ' + str(dict['deck_color_b'])  
1382 1382
         if dict['current_opt'] == 'shirt logo':
1383
-            outp = outp + ': ' + str(dict['shirt_logo'])   
1383
+            outp = outp + ': ' + str(dict['shirt_name'])   
1384 1384
         if dict['current_opt'] == 'deck graphic':
1385 1385
             outp = outp + ': ' + str(dict['deck_name'])               
1386 1386
             

BIN
textures/decks/Thumbs.db View File


BIN
textures/shirt/Thumbs.db View File


Loading…
Cancel
Save