diff --git a/aitviewer/renderables/markers.py b/aitviewer/renderables/markers.py index ebab3ca..fce51f7 100644 --- a/aitviewer/renderables/markers.py +++ b/aitviewer/renderables/markers.py @@ -56,7 +56,6 @@ def __init__( # todo fix color bug for mi, marker_name in enumerate(self.markers_labels): - if colors is not None: color = tuple(colors[mi]) @@ -158,7 +157,6 @@ def from_synthetic( markers_array = synthetic_markers.marker_trajectory if fps_out is not None and abs(1 - fps_in / fps_out) > 1e-4: - assert ( fps_in % fps_out == 0 ), f"fps_out must be a interger divisor of fps_in, but got fps_in={fps_in} fps_out={fps_out}" @@ -226,7 +224,6 @@ def from_SSM_pkl( @classmethod def from_file(cls, mocap_file, **kwargs): - if mocap_file.endswith(".c3d"): return cls.from_c3d(mocap_file, **kwargs) elif mocap_file.endswith(".npz"): diff --git a/aitviewer/renderables/osim.py b/aitviewer/renderables/osim.py index c8a49a0..9c0d0d7 100644 --- a/aitviewer/renderables/osim.py +++ b/aitviewer/renderables/osim.py @@ -172,7 +172,6 @@ def per_part_bone_colors(self): return vertex_colors def per_part_marker_colors(self): - colors = vertex_colors_from_weights(np.arange(len(self.node_names)), alpha=1, shuffle=True) # Try to load a saved rigging file @@ -266,7 +265,6 @@ def generate_meshes_dict(self): print(self.meshes_dict) def create_template(self): - part_meshes = [] for node_name in self.node_names: mesh = self.meshes_dict[node_name] @@ -456,7 +454,6 @@ def fk(self): # continue mesh = self.meshes_dict[node_name] if mesh is not None: - part_verts = mesh.vertices # pose part diff --git a/aitviewer/utils/vtp_to_ply.py b/aitviewer/utils/vtp_to_ply.py index 7cef528..cbf6819 100644 --- a/aitviewer/utils/vtp_to_ply.py +++ b/aitviewer/utils/vtp_to_ply.py @@ -6,7 +6,6 @@ def convert_meshes(src_folder, dst_folder): - src = src_folder if src[-1] != "/": src += "/" @@ -21,7 +20,6 @@ def convert_meshes(src_folder, dst_folder): # for each file in src for filename in os.listdir(src): - ext = os.path.splitext(filename)[-1] if ext not in [".vtp", ".obj"]: print("Skipping " + filename) @@ -41,7 +39,6 @@ def convert_meshes(src_folder, dst_folder): if __name__ == "__main__": - # Parse a vtp file and convert it to a ply file parser = argparse.ArgumentParser(description="Convert a folder of vtp files to a folder of ply files") parser.add_argument( diff --git a/examples/load_SKEL.py b/examples/load_SKEL.py index 97840ec..f5e4167 100644 --- a/examples/load_SKEL.py +++ b/examples/load_SKEL.py @@ -17,7 +17,6 @@ raise e if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Load a SKEL model and display it.") parser.add_argument("-s", "--motion_file", type=str, help="Path to a skel motion file", default=None) parser.add_argument("-z", "--z_up", help="Rotate the mesh 90 deg", action="store_true") @@ -53,7 +52,6 @@ cam_pose = None else: - assert os.path.exists( args.motion_file ), f"Could not find {args.motion_file}, please provide a valid path to a skel motion file." diff --git a/examples/load_bioamass.py b/examples/load_bioamass.py index 5cd9cf9..e06faf6 100644 --- a/examples/load_bioamass.py +++ b/examples/load_bioamass.py @@ -10,7 +10,6 @@ from aitviewer.viewer import Viewer if __name__ == "__main__": - subj_name = "01" seq_name = "03" diff --git a/examples/load_markers.py b/examples/load_markers.py index cbb427d..d62fec5 100644 --- a/examples/load_markers.py +++ b/examples/load_markers.py @@ -11,7 +11,6 @@ from aitviewer.viewer import Viewer if __name__ == "__main__": - # Display in the viewer. v = Viewer() diff --git a/examples/load_osim.py b/examples/load_osim.py index 6205073..dd07057 100644 --- a/examples/load_osim.py +++ b/examples/load_osim.py @@ -92,7 +92,6 @@ def display_model_in_viewer( if __name__ == "__main__": - parser = argparse.ArgumentParser( description="Load an OpenSim model and a motion file and display it in the viewer." )