1818```python
1919Example:
2020myObject = otio.schemadef.Paint.Paint(
21- name, points, rgba, type, brush, layer_range, visible
21+ name, id, points, rgba, type, brush, layer_range, visible
2222)
2323"""
2424
@@ -35,15 +35,17 @@ class Paint(otio.core.SerializableObject):
3535 def __init__ (
3636 self ,
3737 name : str = "" ,
38- points : list | None = None ,
39- rgba : list | None = None ,
38+ id : str = "" ,
39+ points : list = [],
40+ rgba : list = [],
4041 type : str = "" ,
4142 brush : str = "" ,
4243 layer_range : otio .opentime .TimeRange | None = None ,
4344 visible : bool = True ,
4445 ) -> None :
4546 super ().__init__ ()
4647 self .name = name
48+ self .id = id
4749 self .points = points
4850 self .rgba = rgba
4951 self .type = type
@@ -53,6 +55,8 @@ def __init__(
5355
5456 name = otio .core .serializable_field ("name" , required_type = str , doc = ("name: expects a string" ))
5557
58+ id = otio .core .serializable_field ("id" , required_type = str , doc = ("name: expects a string" ))
59+
5660 _points = otio .core .serializable_field (
5761 "points" , required_type = list , doc = ("points: expects a list of point objects" )
5862 )
@@ -97,13 +101,13 @@ def layer_range(self, val):
97101
98102 def __str__ (self ) -> str :
99103 return (
100- f"Paint({ self .name } , { self .points } , { self .rgba } , { self .type } , "
104+ f"Paint({ self .name } , { self .id } , { self . points } , { self .rgba } , { self .type } , "
101105 f"{ self .brush } , { self .layer_range } , { self .visible } )"
102106 )
103107
104108 def __repr__ (self ) -> str :
105109 return (
106- f"otio.schema.Paint(name={ self .name !r} , points={ self .points !r} , "
110+ f"otio.schema.Paint(name={ self .name !r} , id= { self . id !r } , points={ self .points !r} , "
107111 f"rgba={ self .rgba !r} , type={ self .type !r} , brush={ self .brush !r} , "
108112 f"layer_range={ self .layer_range !r} , visible={ self .visible !r} )"
109113 )
0 commit comments