Skip to content

Commit

Permalink
Small improvements/fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioNoack committed Dec 3, 2023
1 parent 4961886 commit 89cb14a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 23 deletions.
17 changes: 9 additions & 8 deletions src/me/anno/remsstudio/RenderSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ object RenderSettings : Transform() {
val mbs = vi(
"Motion-Blur-Steps", "0,1 = no motion blur, e.g. 16 = decent motion blur, sub-frames per frame",
project.motionBlurSteps, style
) as IntInput
val mbsListener = mbs.changeListener
mbs.setChangeListener {
)
val mbs0 = mbs.child as IntInput
val mbsListener = mbs0.changeListener
mbs0.setChangeListener {
mbsListener(it)
save()
}
Expand Down Expand Up @@ -153,9 +154,10 @@ object RenderSettings : Transform() {
"[Motion Blur] 1 = full frame is used; 0.1 = only 1/10th of a frame time is used",
project.shutterPercentage,
style
) as FloatInput
val shpListener = shp.changeListener
shp.setChangeListener {
)
val shp0 = shp.child as FloatInput
val shpListener = shp0.changeListener
shp0.setChangeListener {
shpListener(it)
save()
}
Expand Down Expand Up @@ -192,8 +194,7 @@ object RenderSettings : Transform() {
}

updateFileInputColor()
fileInput.setChangeListener {
val file = it//File(it)
fileInput.setChangeListener { file ->
project.targetOutputFile = file
updateFileInputColor()
save()
Expand Down
5 changes: 3 additions & 2 deletions src/me/anno/remsstudio/objects/Transform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import me.anno.remsstudio.animation.AnimatedProperty
import me.anno.remsstudio.objects.modes.TransformVisibility
import me.anno.remsstudio.objects.particles.ParticleSystem
import me.anno.remsstudio.ui.ComponentUIV2
import me.anno.remsstudio.ui.IsAnimatedWrapper
import me.anno.remsstudio.ui.editor.TimelinePanel
import me.anno.remsstudio.ui.editor.TimelinePanel.Companion.global2Kf
import me.anno.studio.Inspectable
Expand Down Expand Up @@ -814,11 +815,11 @@ open class Transform() : Saveable(),
* title, tool tip text, type, start value
* modifies the AnimatedProperty-Object, so no callback is needed
* */
fun vi(title: String, ttt: String, visibilityKey: String, values: AnimatedProperty<*>, style: Style): Panel {
fun vi(title: String, ttt: String, visibilityKey: String, values: AnimatedProperty<*>, style: Style): IsAnimatedWrapper {
return ComponentUIV2.vi(this, title, ttt, visibilityKey, values, style)
}

fun vi(title: String, ttt: String, values: AnimatedProperty<*>, style: Style): Panel {
fun vi(title: String, ttt: String, values: AnimatedProperty<*>, style: Style): IsAnimatedWrapper {
return ComponentUIV2.vi(this, title, ttt, title, values, style)
}

Expand Down
4 changes: 2 additions & 2 deletions src/me/anno/remsstudio/objects/Video.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import me.anno.remsstudio.objects.lists.Element
import me.anno.remsstudio.objects.lists.SplittableElement
import me.anno.remsstudio.objects.models.SpeakerModel.drawSpeakers
import me.anno.remsstudio.objects.modes.VideoType
import me.anno.remsstudio.objects.modes.editorFPS
import me.anno.studio.Inspectable
import me.anno.ui.Panel
import me.anno.ui.base.SpyPanel
Expand Down Expand Up @@ -107,6 +106,8 @@ class Video(file: FileReference = InvalidRef, parent: Transform? = null) :

companion object {

val editorFPS = intArrayOf(1, 2, 3, 5, 10, 24, 30, 60, 90, 120, 144, 240, 300, 360)

private val LOGGER = LogManager.getLogger(Video::class)

private val forceAutoScale get() = DefaultConfig["rendering.video.forceAutoScale", true]
Expand Down Expand Up @@ -1085,5 +1086,4 @@ class Video(file: FileReference = InvalidRef, parent: Transform? = null) :
clone.needsImageUpdate = needsImageUpdate
return clone
}

}
10 changes: 0 additions & 10 deletions src/me/anno/remsstudio/objects/modes/EditorFPS.kt

This file was deleted.

2 changes: 1 addition & 1 deletion src/me/anno/remsstudio/ui/ComponentUIV2.kt
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ object ComponentUIV2 {
self: Transform,
title: String, ttt: String, visibilityKey: String,
values: AnimatedProperty<*>, style: Style
): Panel {
): IsAnimatedWrapper {
val time = self.lastLocalTime
val sl = { self.show(listOf(self), listOf(values)) }
val panel = when (val value = values[time]) {
Expand Down

0 comments on commit 89cb14a

Please sign in to comment.