@@ -53,7 +53,7 @@ def execute(self, context):
5353 self .readQC (self .filepath , False , False , False , 'XYZ' , outer_qc = True )
5454 GAgrImporter .smd = self .smd
5555 return {'FINISHED' }
56-
56+
5757 def readPolys (self ):
5858 if GAgrImporter .onlyBones :
5959 return
@@ -63,14 +63,14 @@ def readShapes(self):
6363 if GAgrImporter .onlyBones :
6464 return
6565 super (SmdImporterEx , self ).readShapes ()
66-
66+
6767 def readSMD (self , filepath , upAxis , rotMode , newscene = False , smd_type = None , target_layer = 0 ):
68- if SmdImporterEx .bSkip and (smd_type == vs_utils .PHYS or splitext (basename (filepath ))[0 ].rstrip ("123456789" ).endswith ("_lod" )):
68+ s = splitext (basename (filepath ))[0 ].rstrip ("123456789" )
69+ if SmdImporterEx .bSkip and (smd_type == vs_utils .PHYS or s .endswith ("_lod" ) or any (filepath .endswith (u ) for u in ("skeleto.smd" , "skel.smd" ))):
6970 return 0
7071 else :
7172 return super ().readSMD (filepath , upAxis , rotMode , newscene , smd_type , target_layer ) # call parent method
7273
73-
7474def ReadString (file ):
7575 buf = bytearray ()
7676 while True :
@@ -330,11 +330,17 @@ class AgrImporter(bpy.types.Operator, vs_utils.Logger):
330330 )
331331
332332 bSkip : bpy .props .BoolProperty (
333- name = "Skip Physic and LOD Meshes " ,
333+ name = "Skip Physic, LOD and Shared_Player_Skeleton meshes " ,
334334 description = "Skips the import of physic (collision) meshes if the .qc contains them." ,
335335 default = True
336336 )
337-
337+
338+ aSkip : bpy .props .BoolProperty (
339+ name = "Skip Stattrack and Stickers" ,
340+ description = "Skips the import of Stattrack and Sticker meshes if the .qc contains them." ,
341+ default = True
342+ )
343+
338344 onlyBones : bpy .props .BoolProperty (
339345 name = "Bones (skeleton) only" ,
340346 description = "Import only bones (skeletons) (faster)." ,
@@ -510,8 +516,10 @@ def copyObj(src,parent=None):
510516 GAgrImporter .smd = None
511517 GAgrImporter .onlyBones = self .onlyBones
512518 modelData = None
513-
519+
514520 try :
521+ if self .aSkip and any (filePath .endswith (a ) for a in ("stattrack.qc" , "decal_a.qc" , "decal_b.qc" , "decal_c.qc" , "decal_d.qc" , "decal_e" )):
522+ return
515523 bpy .ops .advancedfx .smd_importer_ex (filepath = filePath , doAnim = False )
516524 modelData = ModelData (GAgrImporter .smd )
517525 except Exception as e :
0 commit comments