Skip to content

Commit

Permalink
Merge branch 'dev' into movingLine
Browse files Browse the repository at this point in the history
  • Loading branch information
Noel-Bastubbe committed Jun 14, 2022
2 parents fd1e5fe + 399982e commit 2b94c59
Show file tree
Hide file tree
Showing 62 changed files with 270 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"resetTargetMorph" : "FH 8/1/2021 18:48",
"saveAnimations" : "FH 8/1/2021 18:48",
"savedAnimationText" : "mjs 7/31/2021 15:08",
"seedProperties" : "FH 8/1/2021 18:49",
"seedProperties" : "Noel Bastubbe 6/14/2022 15:28",
"selectMorphByHand" : "FH 8/1/2021 18:49",
"selectedTreeNode" : "JIZ 5/27/2020 15:31",
"selectedTreeNode:" : "FH 8/1/2021 18:27",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
as yet unclassified
addMovingLine
| line |
"self movingLine: (self addLineFrom: 105@25 to: 105@125)."

line := LineMorph
from: 105@25
to: 105@125
color: Color black
width: self lineWidth.
self movingLine: line.
self addMorph: line.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
as yet unclassified
initialize

super initialize.
self
"extent: 3@100;"
extent: 3@100;
color: Color black;
position: (self startMargin@25). "get rid of magic number" "Cascade expected ->"
position: self startMargin@25.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
as yet unclassified
lineWidth

^3.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
movingLine: anObject
movingLine := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
movingLine
^ movingLine
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
as yet unclassified
step

| endPositionX|

endPositionX := self timeline width - (self endMargin).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
as yet unclassified
stepTime
^100
^100.
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
@@ -1,12 +1,9 @@
updating
addIntermediateLines
| positionX intermediateStart intermediateEnd lineRepetition |

intermediateStart := self timeline startTime + 1.
intermediateEnd := self timeline endTime - 1.
lineRepetition := 100.
intermediateStart to: intermediateEnd
do: [:frame | frame \\ lineRepetition = 0
ifTrue: [
positionX := self convertFrameToPosition: frame.
self addLineFrom: positionX @ self height to: positionX @ (self height - self lineHeight)]].
| positionX frame |
frame := self timeline startTime + self intermediateLineDistance.
[self timeline endTime > frame]
whileTrue: [positionX := self convertFrameToPosition: frame.
self addLineFrom: positionX @ self height to: positionX @ (self height - self lineHeight).
self addLineLabelFor: (frame asString) to: (positionX - self labelXOffset) @ (self height - self lineHeight - self labelYOffset).
frame := frame + self intermediateLineDistance.].
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
updating
addLineLabelFor: aFrame to: aPosition
| label |

label := StringMorph new.
label contents: aFrame.
label position: aPosition.
label fontName: 'default' size: 13.
self addMorph: label.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
initialization
createDuration

self deleteDuration.
self initializeDuration.
self duration acceptValue: (self getDurationString: self endTime).
self duration comeToFront.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
initialization
deleteDuration

self duration ifNotNil: [self duration abandon].
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
duration: anObject
duration := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
duration
^ duration
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
endTime: anObject
endTime := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
endTime
^ endTime
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
updating
getDurationString: aNumber
|temp|
temp:= (aNumber asInteger)/1000 asFloat.
^ 'Duration: ', temp, ' s'.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ initialization
initialize
Transcript show: 'aa'.
super initialize.
self color: Color lightGray.
self color: Color lightGray.
"self createDuration."
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
initialization
initializeDuration

self duration: StringMorph new;
addMorph: self duration.
self duration position: 5@7;
fontName: ('Bitmap DejaVu Sans') pointSize: 9;
color: Color black.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
constants
intermediateLineDistance
^100.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
labelXOffset

^ 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
labelYOffset

^ 10
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"on:withExtent:" : "FH 8/1/2021 19:32" },
"instance" : {
"addEndLine" : "MH 8/1/2021 19:30",
"addIntermediateLines" : "MH 8/1/2021 19:21",
"addIntermediateLines" : "Noel Bastubbe 6/14/2022 15:23",
"addLineFrom:to:" : "MH 8/1/2021 19:22",
"addMovingLine" : "SG 5/23/2022 17:59",
"addStartEndLine" : "MH 8/1/2021 19:24",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
],
"commentStamp" : "CL 8/2/2021 08:50",
"instvars" : [
"movingLine" ],
"movingLine",
"duration",
"endTime" ],
"name" : "AnimationsEditorTimebar",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ addTimebar
timebar := AnimationsEditorTimebar on: self withExtent: self width @ self trackHeight.
self addMorph: timebar.
self timebar: timebar.
self timebar updateScale.
self timebar updateScale.
self timebar endTime: self endTime.
self timebar createDuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
initialization
addTimebarWithEndTime: aNumber
| timebar |

self timebar
ifNotNil: [self timebar abandon].
timebar := AnimationsEditorTimebar on: self withExtent: self width @ self trackHeight.
self addMorph: timebar.
self timebar: timebar.
self timebar updateScale.
self timebar endTime: aNumber.
self timebar createDuration.
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ numberOfProperties := 0.
self
movingLine: (AnimationsEditorMovingLine on: self withPositionY: self trackHeight withExtent: 3@(numberOfProperties * self trackHeight));
addMorphFront: movingLine.
self movingLine setMovingSpeedPerHundredMilliseconds.
self movingLine setMovingSpeedPerHundredMilliseconds.
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
@@ -1,6 +1,8 @@
creation
switchTimelineTo: aProperty
Transcript show: self endTime.
self updateExtent.
self property: aProperty.
self createTracks.
self addTimebar.
self addTimebar.
self updateStartEndProperty.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
updating
update: aStartEndProperty
self updateExtent.
self startTime: aStartEndProperty startTime.
self endTime: aStartEndProperty endTime.
self endTime: aStartEndProperty endTime.
self updateExtent.
self createTracks.
self addTimebar.
Transcript show: 'update'.
self addTimebar.
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
updating
updateExtent
self extent: self scrollPane extent - (self borderWidth * 2).
| normalHeight fullWidth |

normalHeight := self scrollPane height - self borderWidth.
fullWidth := self endTime + self startMargin + self endMargin.
self width: fullWidth.
fullWidth > self scrollPane width
ifTrue: [self height: normalHeight - self scrollPane scrollBarThickness.]
ifFalse: [self height: normalHeight.].

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. "<--- Ich vermute, dass diese Zeile nicht ausgeführt wird und dadurch den Defekt erzeugt."
self property subproperties
do:[:subproperty | subproperty addDependent: startEndProperty].
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"class" : {
"newWith:" : "FH 8/1/2021 19:32" },
"instance" : {
"addTimebar" : "MH 8/1/2021 18:58",
"addTimebar" : "NR 6/13/2022 15:14",
"addTimebarWithEndTime:" : "NR 6/13/2022 15:15",
"addTrackFor:withPosition:" : "MH 8/1/2021 18:58",
"animationsEditor" : "MH 8/1/2021 18:56",
"animationsEditor:" : "MH 8/1/2021 18:56",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"name" : "AnimationsEditorTimeline",
"pools" : [
],
"super" : "RectangleMorph",
"super" : "AnimationsEditorTimelineObject",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
creation
convertFrameToPosition: aFrame
| position totalDuration framesPerPixel frameOffset |

totalDuration := self timeline endTime - self timeline startTime.
framesPerPixel := totalDuration / self lineSegmentWidth.
frameOffset := aFrame / framesPerPixel.
position := self startMargin + frameOffset.
^ position.
^self startMargin + aFrame.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"class" : {
},
"instance" : {
"convertFrameToPosition:" : "MH 8/1/2021 19:19",
"convertFrameToPosition:" : "Noel Bastubbe 6/9/2022 17:42",
"endMargin" : "MH 8/1/2021 18:59",
"lineSegmentWidth" : "MH 8/1/2021 18:59",
"startMargin" : "MH 8/1/2021 18:59",
"startMargin" : "Noel Bastubbe 6/9/2022 17:45",
"timeline" : "MH 8/1/2021 19:00",
"timeline:" : "MH 8/1/2021 18:48" } }
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"class" : {
"on:withProperty:withPosition:withExtent:" : "FH 8/1/2021 19:32" },
"on:withProperty:withPosition:withExtent:" : "NR 6/13/2022 12:28" },
"instance" : {
"addKeyframes" : "MH 8/1/2021 19:02",
"initialize" : "ob 6/13/2022 13:20",
"initializeMorph" : "MH 8/1/2021 19:01",
"initializeText" : "MH 8/1/2021 19:51",
"initializeTrack" : "MH 8/1/2021 19:01",
"initializeTrack" : "NR 6/13/2022 12:36",
"keyframeMargin" : "MH 8/1/2021 19:48",
"property" : "MH 8/1/2021 19:01",
"property:" : "MH 8/1/2021 19:01",
Expand Down
Loading

0 comments on commit 2b94c59

Please sign in to comment.