diff --git a/fast64_internal/oot/oot_anim.py b/fast64_internal/oot/oot_anim.py index 57a4a26fc..b32b2f699 100644 --- a/fast64_internal/oot/oot_anim.py +++ b/fast64_internal/oot/oot_anim.py @@ -331,7 +331,7 @@ def ootConvertLinkAnimationData(anim, armatureObj, convertTransformMatrix, *, fr def ootExportNonLinkAnimation(armatureObj, convertTransformMatrix, skeletonName): if armatureObj.animation_data is None or armatureObj.animation_data.action is None: raise PluginError("No active animation selected.") - + anim = armatureObj.animation_data.action stashActionInArmature(armatureObj, anim) @@ -448,7 +448,6 @@ def ootImportNonLinkAnimationC(armatureObj, filepath, animName, actorScale, isCu for frame in range(frameCount): rawTranslation = mathutils.Vector((0, 0, 0)) for propertyIndex in range(3): - if jointIndex[propertyIndex] < staticIndexMax: value = ootTranslationValue(frameData[jointIndex[propertyIndex]], actorScale) else: diff --git a/fast64_internal/oot/oot_collision.py b/fast64_internal/oot/oot_collision.py index 6eca0aaeb..7cad0918a 100644 --- a/fast64_internal/oot/oot_collision.py +++ b/fast64_internal/oot/oot_collision.py @@ -38,7 +38,7 @@ def exportCollisionCommon(collision, obj, transformMatrix, includeChildren, name addCollisionTriangles(obj, collisionDict, includeChildren, transformMatrix, collision.bounds) for polygonType, faces in collisionDict.items(): collision.polygonGroups[polygonType] = [] - for (faceVerts, normal, distance) in faces: + for faceVerts, normal, distance in faces: assert len(faceVerts) == 3 indices = [] for roundedPosition in faceVerts: @@ -203,7 +203,6 @@ def ootCameraDataToC(camData): posC = CData() camC = CData() if len(camData.camPosDict) > 0: - camDataName = "BgCamInfo " + camData.camDataName() + "[" + str(len(camData.camPosDict)) + "]" camC.source = camDataName + " = {\n" diff --git a/fast64_internal/oot/oot_level_writer.py b/fast64_internal/oot/oot_level_writer.py index 122df84c7..33da8d6bb 100644 --- a/fast64_internal/oot/oot_level_writer.py +++ b/fast64_internal/oot/oot_level_writer.py @@ -107,7 +107,6 @@ def ootCombineSceneFiles(levelC): def ootExportSceneToC( originalSceneObj, transformMatrix, f3dType, isHWv1, sceneName, DLFormat, savePNG, exportInfo, bootToSceneOptions ): - checkObjectReference(originalSceneObj, "Scene object") isCustomExport = exportInfo.isCustomExportPath exportPath = exportInfo.exportPath @@ -315,7 +314,6 @@ def readSceneData(scene, scene_properties, sceneHeader, alternateSceneHeaders): def getConvertedTransform(transformMatrix, sceneObj, obj, handleOrientation): - # Hacky solution to handle Z-up to Y-up conversion # We cannot apply rotation to empty, as that modifies scale if handleOrientation: @@ -466,7 +464,6 @@ def readCamPos(camPosProp, obj, scene, sceneObj, transformMatrix): def readCrawlspace(obj, scene, transformMatrix): - splineProp = obj.ootSplineProperty index = splineProp.index @@ -496,7 +493,6 @@ def readPathProp(pathProp, obj, scene, sceneObj, sceneName, transformMatrix): def ootConvertScene(originalSceneObj, transformMatrix, f3dType, isHWv1, sceneName, DLFormat, convertTextureData): - if originalSceneObj.data is not None or originalSceneObj.ootEmptyType != "Scene": raise PluginError(originalSceneObj.name + ' is not an empty with the "Scene" empty type.') @@ -621,7 +617,6 @@ def getEnclosingSphere(self) -> tuple[float, float]: def ootProcessMesh( roomMesh, DLGroup, sceneObj, obj, transformMatrix, convertTextureData, LODHierarchyObject, boundingBox: BoundingBox ): - relativeTransform = transformMatrix @ sceneObj.matrix_world.inverted() @ obj.matrix_world translation, rotation, scale = relativeTransform.decompose() @@ -691,7 +686,6 @@ def ootProcessMesh( def ootProcessLOD( roomMesh, DLGroup, sceneObj, obj, transformMatrix, convertTextureData, LODHierarchyObject, boundingBox: BoundingBox ): - relativeTransform = transformMatrix @ sceneObj.matrix_world.inverted() @ obj.matrix_world translation, rotation, scale = relativeTransform.decompose() ootTranslation = ootConvertTranslation(translation) diff --git a/fast64_internal/oot/oot_model_classes.py b/fast64_internal/oot/oot_model_classes.py index a081c484e..cee3b87b0 100644 --- a/fast64_internal/oot/oot_model_classes.py +++ b/fast64_internal/oot/oot_model_classes.py @@ -126,7 +126,7 @@ def getRenderMode(self, drawLayer): def addFlipbookWithRepeatCheck(self, flipbook: TextureFlipbook): model = self.getFlipbookOwner() - def raiseErr(submsg): + def raiseErr(subMsg): raise PluginError( f"There are two flipbooks {subMsg} trying to write to the same texture array " + f"named: {flipbook.name}.\nMake sure that this flipbook name is unique, or " @@ -490,7 +490,6 @@ def handleApplyTLUT( tlut: bpy.types.Image, index: int, ): - flipbook = getattr(material.flipbookGroup, "flipbook" + str(index)) if usesFlipbook(material, flipbook, index, True, ootFlipbookReferenceIsValid): # Don't apply TLUT to texProp.tex, as it is the same texture as the first flipbook texture. diff --git a/fast64_internal/oot/oot_texture_array.py b/fast64_internal/oot/oot_texture_array.py index 061d98d38..4abf280d4 100644 --- a/fast64_internal/oot/oot_texture_array.py +++ b/fast64_internal/oot/oot_texture_array.py @@ -11,6 +11,7 @@ ootGetLinkData, ) + # Special cases: # z_en_xc: one texture is not stored in any array. # skeletonName only used for en_ossan (shopkeepers) and demo_ec (end credits party), which have multiple skeletons @@ -93,10 +94,9 @@ def ootReadTextureArraysGeneric( f3dContext: OOTF3DContext, ): # find gSPSegment() calls that reference texture arrays - for (flipbookKey, segmentParam, spSegmentMatch) in getSegmentCallsFunc(actorData): - + for flipbookKey, segmentParam, spSegmentMatch in getSegmentCallsFunc(actorData): # check for texture array reference - for (arrayName, flipbook) in flipbookList.items(): + for arrayName, flipbook in flipbookList.items(): directArrayReference = findDirectArrayReference(arrayName, segmentParam) indexIntoArrayReference = findIndexIntoArrayReference(arrayName, segmentParam, actorData) diff --git a/fast64_internal/oot/oot_upgrade.py b/fast64_internal/oot/oot_upgrade.py index 945458dcc..33a5237b7 100644 --- a/fast64_internal/oot/oot_upgrade.py +++ b/fast64_internal/oot/oot_upgrade.py @@ -5,7 +5,6 @@ def upgradeObjectList(objList: CollectionProperty, objData: OoT_ObjectData): """Transition to the XML object system""" for obj in objList: - # In order to check whether the data in the current blend needs to be updated, # we look for the ``objectID`` property, which has been removed in the current version. # If we find ``objectID`` it means that it's an old blend and needs be updated. diff --git a/fast64_internal/oot/skeleton/constants.py b/fast64_internal/oot/skeleton/constants.py index 110cd39f8..b96ebfb72 100644 --- a/fast64_internal/oot/skeleton/constants.py +++ b/fast64_internal/oot/skeleton/constants.py @@ -9,6 +9,7 @@ # - list of tuples, first is root position, rest are euler XYZ rotations # 5. Add object to ootSkeletonImportDict + # Link overlay will be "", since Link texture array data is handled as a special case. class OOTSkeletonImportInfo: def __init__( diff --git a/fast64_internal/oot/spline/properties.py b/fast64_internal/oot/spline/properties.py index fb872ee25..9198866f2 100644 --- a/fast64_internal/oot/spline/properties.py +++ b/fast64_internal/oot/spline/properties.py @@ -40,7 +40,6 @@ def spline_props_register(): def spline_props_unregister(): - for cls in reversed(oot_spline_classes): unregister_class(cls)