Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame setting #21

Merged
merged 10 commits into from
Jul 13, 2022
Merged

Frame setting #21

merged 10 commits into from
Jul 13, 2022

Conversation

tagaliac
Copy link
Collaborator

@tagaliac tagaliac commented Jul 7, 2022

add frame setting widget

  • maybe the look of this widget could be improved (suggestions are wellcome)

@AlexanderRitter02
Copy link
Collaborator

@tagaliac Sorry for changing the GUI so much on main, the change for resizability was a long standing improvement I wanted to make.
You will need to change the slider so that it fits in with with the new code.

@AlexanderRitter02 AlexanderRitter02 added the enhancement New feature or request label Jul 11, 2022
Copy link
Collaborator

@AlexanderRitter02 AlexanderRitter02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your latest changes prevent the image from being resized.
Ideally the image should be as large as possible, with the controls being at the bottom of the window.

@AlexanderRitter02
Copy link
Collaborator

I think our main problem is that the controls at the bottom are just too big.
To make the effect of your additional GUI slider smaller, I made a few changes:

  • Adjust the ratio of main window row 1 (preview) and row 2 (bottom controls) to give more weight to the preview
  • Removed a few rowconfigures from you, so the widget stays as small as possible and doesn't resize
  • Changed the sticky tags to always attach south, at the bottom of the screen, instead of north

gui/gui_main.py Outdated Show resolved Hide resolved
gui/gui_main.py Outdated Show resolved Hide resolved
@AlexanderRitter02
Copy link
Collaborator

This may be important for you, @JuppizuppiT.

For syncing the maximum frame value throughout the program I added a system for registering and unregistering animations.

  • First, make sure your animation is known in the Animation enum (utils)
    It has a name and a value which says how much frames it takes
    (for example DAYNIGHT = 360)
  • Add an animation when it is enabled through the GUI, call self.control.frames.add_animation(animation: Animation)
    (for example: self.control.frames.add_animation(utils.Animation.DAYNIGHT))
  • Make sure to remove it with self.control.frames.remove_animation(animation: Animation) if it is disabled or in Jonas case if the user selects another animation

Then get_max_frame() always has the amount of frames from the longest animation, ensuring that everything gets rendered.

Copy link
Collaborator

@j-w-moebius j-w-moebius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether 360 is a suitable length for the DAYNIGHT animation (takes an eternity to render and lasts 15 (!) seconds).
But apart from that, everything seems fine to me.

@tagaliac tagaliac merged commit 6b773b5 into main Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants