@@ -945,6 +945,28 @@ def exportGoZ(self, path, scn, obj, pathImport):
945
945
vcolArray [vert_idx * 3 ] = int (255 * vcoldata [loop .index ].color [0 ])
946
946
vcolArray [vert_idx * 3 + 1 ] = int (255 * vcoldata [loop .index ].color [1 ])
947
947
vcolArray [vert_idx * 3 + 2 ] = int (255 * vcoldata [loop .index ].color [2 ])
948
+
949
+ if prefs ().performance_profiling :
950
+ start_time = profiler (start_time , " Polypaint: loop" )
951
+
952
+ goz_file .write (pack ('<4B' , 0xb9 , 0x88 , 0x00 , 0x00 ))
953
+ goz_file .write (pack ('<I' , numVertices * 4 + 16 ))
954
+ goz_file .write (pack ('<Q' , numVertices ))
955
+ if prefs ().performance_profiling :
956
+ start_time = profiler (start_time , " Polypaint: write numVertices" )
957
+
958
+ for i in range (0 , len (vcolArray ), 3 ):
959
+ goz_file .write (pack ('<B' , vcolArray [i + 2 ]))
960
+ goz_file .write (pack ('<B' , vcolArray [i + 1 ]))
961
+ goz_file .write (pack ('<B' , vcolArray [i ]))
962
+ goz_file .write (pack ('<B' , 0 ))
963
+ if prefs ().performance_profiling :
964
+ start_time = profiler (start_time , " Polypaint: write color" )
965
+
966
+ vcolArray .clear ()
967
+ if prefs ().performance_profiling :
968
+ start_time = profiler (start_time , " Polypaint: vcolArray.clear" )
969
+
948
970
else :
949
971
if obj .data .color_attributes .active_color_name :
950
972
vcoldata = me .color_attributes [obj .data .color_attributes .active_color_name ].data
@@ -954,30 +976,30 @@ def exportGoZ(self, path, scn, obj, pathImport):
954
976
vcolArray [v .index * 3 ] = int (255 * vcoldata [v .index ].color_srgb [0 ])
955
977
vcolArray [v .index * 3 + 1 ] = int (255 * vcoldata [v .index ].color_srgb [1 ])
956
978
vcolArray [v .index * 3 + 2 ] = int (255 * vcoldata [v .index ].color_srgb [2 ])
979
+
980
+ if prefs ().performance_profiling :
981
+ start_time = profiler (start_time , " Polypaint: loop" )
957
982
958
- if prefs ().performance_profiling :
959
- start_time = profiler (start_time , " Polypaint: loop" )
960
-
961
- goz_file .write (pack ('<4B' , 0xb9 , 0x88 , 0x00 , 0x00 ))
962
- goz_file .write (pack ('<I' , numVertices * 4 + 16 ))
963
- goz_file .write (pack ('<Q' , numVertices ))
964
- if prefs ().performance_profiling :
965
- start_time = profiler (start_time , " Polypaint: write numVertices" )
983
+ goz_file .write (pack ('<4B' , 0xb9 , 0x88 , 0x00 , 0x00 ))
984
+ goz_file .write (pack ('<I' , numVertices * 4 + 16 ))
985
+ goz_file .write (pack ('<Q' , numVertices ))
986
+ if prefs ().performance_profiling :
987
+ start_time = profiler (start_time , " Polypaint: write numVertices" )
966
988
967
- for i in range (0 , len (vcolArray ), 3 ):
968
- goz_file .write (pack ('<B' , vcolArray [i + 2 ]))
969
- goz_file .write (pack ('<B' , vcolArray [i + 1 ]))
970
- goz_file .write (pack ('<B' , vcolArray [i ]))
971
- goz_file .write (pack ('<B' , 0 ))
972
- if prefs ().performance_profiling :
973
- start_time = profiler (start_time , " Polypaint: write color" )
989
+ for i in range (0 , len (vcolArray ), 3 ):
990
+ goz_file .write (pack ('<B' , vcolArray [i + 2 ]))
991
+ goz_file .write (pack ('<B' , vcolArray [i + 1 ]))
992
+ goz_file .write (pack ('<B' , vcolArray [i ]))
993
+ goz_file .write (pack ('<B' , 0 ))
994
+ if prefs ().performance_profiling :
995
+ start_time = profiler (start_time , " Polypaint: write color" )
974
996
975
- vcolArray .clear ()
976
- if prefs ().performance_profiling :
977
- start_time = profiler (start_time , " Polypaint: vcolArray.clear" )
978
-
979
- if prefs ().performance_profiling :
980
- start_time = profiler (start_time , "Write Polypaint" )
997
+ vcolArray .clear ()
998
+ if prefs ().performance_profiling :
999
+ start_time = profiler (start_time , " Polypaint: vcolArray.clear" )
1000
+
1001
+ if prefs ().performance_profiling :
1002
+ start_time = profiler (start_time , "Write Polypaint" )
981
1003
982
1004
# --Mask--
983
1005
if not prefs ().export_clear_mask :
0 commit comments