Skip to content
Snippets Groups Projects
Commit 39916487 authored by neomonkeus's avatar neomonkeus
Browse files

Fix issues with move to f-strings

parent 2ce35186
No related branches found
No related tags found
No related merge requests found
v0.1.0
\ No newline at end of file
v0.0.1
\ No newline at end of file
......@@ -56,7 +56,7 @@ from io_scene_niftools import properties, operators, ui
from io_scene_niftools.utils.util_logging import NifLog
with open(os.path.join(current_dir, "VERSION.txt")) as version:
NifLog.info(f"Loading: Blender Niftools Addon: {version.read()}")
NifLog.info(f"Loading: Blender Niftools Addon: {version.read():s}")
import pyffi
NifLog.info(f"Loading: Pyffi: {pyffi.__version__}")
......
......@@ -69,7 +69,7 @@ class BhkCollision(Collision):
rigid_body = b_obj.rigid_body
if not rigid_body:
NifLog.warn(f"'{0b_obj.name}' has no rigid body, skipping rigid body export")
NifLog.warn(f"'{b_obj.name}' has no rigid body, skipping rigid body export")
return
# is it packed
......
......@@ -51,7 +51,6 @@ from io_scene_niftools.modules.nif_export.geometry.mesh import Mesh
from io_scene_niftools.modules.nif_export.property.object import ObjectDataProperty
from io_scene_niftools.modules.nif_export.block_registry import block_store
from io_scene_niftools.utils import util_math
from io_scene_niftools.utils.util_global import NifOp
from io_scene_niftools.utils.util_logging import NifLog
# dictionary of names, to map NIF blocks to correct Blender names
......
......@@ -111,7 +111,7 @@ class MaterialAnimation(Animation):
# so we have to repeat the import for each used tex slot
for i, texture_slot in enumerate(b_material.texture_slots):
if texture_slot:
fcurves = self.create_fcurves(b_mat_action, f'texture_slots["{i:s}"].{data_path}', (array_ind),), n_ctrl.flags)
fcurves = self.create_fcurves(b_mat_action, "texture_slots[" + str(i) + "]." + data_path, (array_ind,), n_ctrl.flags)
for key in n_uvgroup.keys:
if "offset" in data_path:
self.add_key(fcurves, key.time, (-key.value,), interp)
......
......@@ -41,8 +41,9 @@ import logging
class _MockOperator:
"""A default implementation of the report function in the case where the operator has not been initialised."""
def report(self, level, message):
print(f"{level:s}: {message}")
print(f"{level}: {message}")
class NifLog:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment