interpolated age
This commit is contained in:
@@ -417,7 +417,7 @@ class Marker:
|
||||
}
|
||||
|
||||
def get_interpolated_point(self, nr=None, index=None):
|
||||
"""{x0,y0,x1,y1, cx, cy, visible,type}"""
|
||||
"""{x0,y0,x1,y1, cx, cy, visible, type, age}"""
|
||||
if nr is None:
|
||||
nr = self.nr
|
||||
if index is None:
|
||||
@@ -434,7 +434,7 @@ class Marker:
|
||||
)
|
||||
return value
|
||||
|
||||
return {"x0": None, "y0": None, "x1": None, "y1": None, "cx": None, "cy": None, "visible": 0, "type": None}
|
||||
return {"x0": None, "y0": None, "x1": None, "y1": None, "cx": None, "cy": None, "visible": 0, "type": None, "age": None}
|
||||
|
||||
def modify_point(self, position, x, y):
|
||||
"""position: tl topleft, br bottomright, c center"""
|
||||
@@ -623,8 +623,8 @@ class World:
|
||||
post: after any keyframes
|
||||
"""
|
||||
|
||||
def i_point(x0=None, y0=None, x1=None, y1=None, t=None, visible=None):
|
||||
return {"x0": x0, "y0": y0, "x1": x1, "y1": y1, "type": t, "visible": visible}
|
||||
def i_point(x0=None, y0=None, x1=None, y1=None, t=None, visible=None, age=None):
|
||||
return {"x0": x0, "y0": y0, "x1": x1, "y1": y1, "type": t, "visible": visible, "age"=age}
|
||||
|
||||
def point2array(p):
|
||||
|
||||
@@ -683,6 +683,13 @@ class World:
|
||||
# clicked points (not necessary, could determine at draw time!)
|
||||
for key in point_keys:
|
||||
self.points_interpolated[self.point_index][key]["type"] = "key"
|
||||
age=0
|
||||
for key in self.points_interpolated[self.point_index]:
|
||||
if self.points_interpolated[self.point_index][key]["type"] == "key":
|
||||
age = 0
|
||||
if self.points_interpolated[self.point_index][key]["type"] == "interp":
|
||||
age += 1
|
||||
self.points_interpolated[self.point_index][key]["type"] = age
|
||||
|
||||
def draw_help(self, frame):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user