three.MF.V3.Descriptors.ProjectActions

 1from MF.V3.Descriptors.Project import Project as MF_V3_Descriptors_Project_Project
 2from typing import List
 3
 4
 5class ProjectAction:
 6
 7    """
 8     Descriptor for a project undo/redo action.
 9    """
10    class Scan:
11
12        """
13         Scan vertices removal/insertion metadata.
14        """
15        def __init__(self, index: int, vertices: int, triangles: int):
16            # The scan index.
17            self.index = index
18            # The number of vertices after undo or redo.
19            self.vertices = vertices
20            # The number of triangles after undo or redo.
21            self.triangles = triangles
22
23    def __init__(self, task: str, project: MF_V3_Descriptors_Project_Project = None, scans: List['Scan'] = None):
24        # The original websocket task that the action is undoing or redoing.
25        self.task = task
26        """
27        The updated project data after undo or redo.
28        If undefined, then there was no change to the project.
29        """
30        self.project = project
31        # The list of scans whose vertex/triangle elements were changed by the undo/redo action.
32        self.scans = scans
33
34
35class ProjectActions:
36
37    """
38     Project undo and redo action descriptors.
39    """
40    def __init__(self, undo: List[str] = None, redo: List[str] = None):
41        # Project undo action descriptors.
42        self.undo = undo
43        # Project redo action descriptors.
44        self.redo = redo
class ProjectAction:
 6class ProjectAction:
 7
 8    """
 9     Descriptor for a project undo/redo action.
10    """
11    class Scan:
12
13        """
14         Scan vertices removal/insertion metadata.
15        """
16        def __init__(self, index: int, vertices: int, triangles: int):
17            # The scan index.
18            self.index = index
19            # The number of vertices after undo or redo.
20            self.vertices = vertices
21            # The number of triangles after undo or redo.
22            self.triangles = triangles
23
24    def __init__(self, task: str, project: MF_V3_Descriptors_Project_Project = None, scans: List['Scan'] = None):
25        # The original websocket task that the action is undoing or redoing.
26        self.task = task
27        """
28        The updated project data after undo or redo.
29        If undefined, then there was no change to the project.
30        """
31        self.project = project
32        # The list of scans whose vertex/triangle elements were changed by the undo/redo action.
33        self.scans = scans

Descriptor for a project undo/redo action.

ProjectAction( task: str, project: MF.V3.Descriptors.Project.Project = None, scans: List[ProjectAction.Scan] = None)
24    def __init__(self, task: str, project: MF_V3_Descriptors_Project_Project = None, scans: List['Scan'] = None):
25        # The original websocket task that the action is undoing or redoing.
26        self.task = task
27        """
28        The updated project data after undo or redo.
29        If undefined, then there was no change to the project.
30        """
31        self.project = project
32        # The list of scans whose vertex/triangle elements were changed by the undo/redo action.
33        self.scans = scans
task

The updated project data after undo or redo. If undefined, then there was no change to the project.

project
scans
class ProjectAction.Scan:
11    class Scan:
12
13        """
14         Scan vertices removal/insertion metadata.
15        """
16        def __init__(self, index: int, vertices: int, triangles: int):
17            # The scan index.
18            self.index = index
19            # The number of vertices after undo or redo.
20            self.vertices = vertices
21            # The number of triangles after undo or redo.
22            self.triangles = triangles

Scan vertices removal/insertion metadata.

ProjectAction.Scan(index: int, vertices: int, triangles: int)
16        def __init__(self, index: int, vertices: int, triangles: int):
17            # The scan index.
18            self.index = index
19            # The number of vertices after undo or redo.
20            self.vertices = vertices
21            # The number of triangles after undo or redo.
22            self.triangles = triangles
index
vertices
triangles
class ProjectActions:
36class ProjectActions:
37
38    """
39     Project undo and redo action descriptors.
40    """
41    def __init__(self, undo: List[str] = None, redo: List[str] = None):
42        # Project undo action descriptors.
43        self.undo = undo
44        # Project redo action descriptors.
45        self.redo = redo

Project undo and redo action descriptors.

ProjectActions(undo: List[str] = None, redo: List[str] = None)
41    def __init__(self, undo: List[str] = None, redo: List[str] = None):
42        # Project undo action descriptors.
43        self.undo = undo
44        # Project redo action descriptors.
45        self.redo = redo
undo
redo