Skip to content

Commit

Permalink
length of end frame to last keyframe automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
lka committed May 30, 2022
1 parent 657c66b commit a4cedb5
Show file tree
Hide file tree
Showing 21 changed files with 105 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
updating
findLastKey
| last |

last:= self endTime.
self property subproperties do:[:subproperty | subproperty targetValues keysDo: [:key | key > last ifTrue:[last:= key]]].
^last


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
property: anObject
property := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
property
^ property
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
updating
update: aSymbol
aSymbol = #addKeyframes
ifTrue:[self endTime < self findLastKey ifTrue:[self endTime: self findLastKey]].


Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
"endTime" : "FH 8/1/2021 19:29",
"endTime:" : "FH 8/1/2021 19:29",
"endTimeAsString" : "FH 8/1/2021 19:29",
"initialize" : "mjs 7/31/2021 17:24",
"findLastKey" : "lka 5/30/2022 11:27",
"initialize" : "lka 5/30/2022 11:44",
"isStartEnd" : "mjs 7/31/2021 17:19",
"property" : "lka 5/27/2022 11:52",
"property:" : "lka 5/27/2022 11:52",
"startTime" : "FH 8/1/2021 19:29",
"startTime:" : "FH 8/1/2021 19:29",
"startTimeAsString" : "FH 8/1/2021 19:30" } }
"startTimeAsString" : "FH 8/1/2021 19:30",
"update:" : "lka 5/27/2022 12:25" } }
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"commentStamp" : "tk 8/7/2020 17:54",
"instvars" : [
"endTime",
"startTime" ],
"startTime",
"property" ],
"name" : "AnimationsEditorPropertyStartEnd",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ initialize
self
extent: self initialExtent;
color: Color lightGray;
initializeStartEndTime;
setDefaultProperty.
setDefaultProperty;
initializeStartEndTime.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ switchTimelineTo: aProperty
self updateExtent.
self property: aProperty.
self createTracks.
self addTimebar.
self addTimebar.
self updateStartEndProperty.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
updating
updateStartEndProperty
| startEndProperty |

startEndProperty := self animationsEditor propertyStartEnd.
startEndProperty property: self property.
self property subproperties
do:[:subproperty | subproperty addDependent: startEndProperty].
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
"endTime" : "MH 8/1/2021 18:57",
"endTime:" : "MH 8/1/2021 18:57",
"initialExtent" : "MH 8/1/2021 18:57",
"initialize" : "MH 8/1/2021 18:48",
"initializeStartEndTime" : "mjs 7/31/2021 17:38",
"initialize" : "lka 5/27/2022 10:51",
"initializeStartEndTime" : "lka 5/27/2022 12:32",
"property" : "MH 8/1/2021 18:57",
"property:" : "MH 8/1/2021 18:57",
"scrollPane" : "MH 8/1/2021 18:57",
"setDefaultProperty" : "MH 8/1/2021 18:58",
"startTime" : "MH 8/1/2021 18:57",
"startTime:" : "MH 8/1/2021 18:57",
"switchTimelineTo:" : "MH 8/1/2021 18:58",
"switchTimelineTo:" : "lka 5/27/2022 12:31",
"timebar" : "MH 8/1/2021 18:57",
"timebar:" : "MH 8/1/2021 18:57",
"trackHeight" : "MH 8/1/2021 18:57",
"update:" : "CL 8/2/2021 08:51",
"updateExtent" : "MH 8/1/2021 18:58" } }
"updateExtent" : "MH 8/1/2021 18:58",
"updateStartEndProperty" : "lka 5/27/2022 12:33" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
animationsEditorInstance: anObject
animationsEditorInstance := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
animationsEditorInstance
^ animationsEditorInstance
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
morph: anObject
morph := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
morph
^ morph
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
property: anObject
property := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
property
^ property
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
running
setUp
super setUp.
self propertyStartEnd: AnimationsEditorPropertyStartEnd new.
self animationsEditorInstance: AnimationsEditor open.
self propertyStartEnd: self animationsEditorInstance propertyStartEnd.
self morph: Morph new openInWorld.
self animationsEditorInstance addTargetMorph: self morph.
self property: self animationsEditorInstance propertyList second.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
running
tearDown
self morph isFlexed
ifTrue: [self morph owner abandon].
self morph abandon.
self animationsEditorInstance windowReference abandon.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
testing
testAddKeyframeAfterEndtime
| positionProperty oldEndtime propertyStartEnd newEndtime|

positionProperty := self property subproperties at: 'position'.
propertyStartEnd := self animationsEditorInstance propertyStartEnd.
oldEndtime := propertyStartEnd endTime.
positionProperty
positionX: 555;
positionY: 555;
frame: oldEndtime + 1;
addKeyframe.
newEndtime := propertyStartEnd endTime.
self assert: oldEndtime + 1 =newEndtime.



Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"class" : {
},
"instance" : {
"animationsEditorInstance" : "lka 5/30/2022 10:38",
"animationsEditorInstance:" : "lka 5/30/2022 10:38",
"morph" : "lka 5/30/2022 10:38",
"morph:" : "lka 5/30/2022 10:38",
"property" : "lka 5/30/2022 10:38",
"property:" : "lka 5/30/2022 10:38",
"propertyStartEnd" : "MH 8/1/2021 18:35",
"propertyStartEnd:" : "MH 8/1/2021 18:35",
"setUp" : "MH 7/8/2021 12:08",
"setUp" : "lka 5/30/2022 11:43",
"tearDown" : "lka 5/30/2022 10:39",
"testAddKeyframeAfterEndtime" : "lka 5/30/2022 11:55",
"testInstanceCreation" : "LW 6/27/2021 13:09" } }
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
],
"commentStamp" : "",
"instvars" : [
"propertyStartEnd" ],
"propertyStartEnd",
"animationsEditorInstance",
"morph",
"property" ],
"name" : "AnimationsEditorPropertyStartEndTest",
"pools" : [
],
Expand Down

0 comments on commit a4cedb5

Please sign in to comment.