Skip to content

Commit be1a5af

Browse files
authored
Merge pull request #31 from Devostated/main
v1.12.6 (2021-08-31T17:17Z)
2 parents 3858dd6 + bd9291e commit be1a5af

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

advancedfx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
bl_info = {
44
"name": "advancedfx Blender Scripts",
55
"author": "advancedfx.org",
6-
"version": (1, 12, 5),
6+
"version": (1, 12, 6),
77
"blender": (2, 80, 0),
88
"location": "File > Import/Export",
99
"description": "For inter-operation with HLAE.",

advancedfx/import_agr.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
7474
def 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:

advancedfx/readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ For more informations visit it's Advancedfx Wiki page ( https://github.com/advan
5050

5151
Changelog:
5252

53+
1.12.6 (2021-08-31T17:17Z):
54+
- added skip import option for Stattrack and Stickers
55+
- added skip import for shared_player_skeleton to Skip Physic and LOD Meshes
56+
5357
1.12.5 (2020-04-28T21:03Z):
5458
- added support for Blender 3.0 Alpha
5559
- fixed changing Root Bone Name

0 commit comments

Comments
 (0)