wojtryb / Shortcut-Composer

Krita plugin for creating complex keyboard shortcuts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

animation mouse tracker is broken (gives out a float issue even though it scrolls correctly)

fislysandi opened this issue · comments

General info

  • Plugin version: v1.4.0
  • Operating System: Windows 10
    Bug description
    Describe the issue you encounter
    for some reason when i try to scroll animation it gives me the float issue even though its scrolling correctly im using the lastest version of krita. so far there was no problems with this plugin.

dump

TypeError
Python 3.10.7: krita\current\bin\krita.exe
Thu Oct 19 22:40:00 2023

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 Roaming\krita\pykrita\shortcut_composer\templates\mouse_tracker_utils\slider_handler.py in _value_setting_loop(self=<templates.mouse_tracker_utils.slider_handler.SliderHandler object>)
   98         clipped_value = self._interpreter.interpret(self.read_mouse())
   99         to_set = self._to_cycle.at(clipped_value)
  100         self._slider.controller.set_value(to_set)
  101 
  102     def _update_interpreter(self) -> None:
self = <templates.mouse_tracker_utils.slider_handler.SliderHandler object>
self._slider = <data_components.slider.Slider object>
self._slider.controller = <core_components.controllers.document_controllers.TimeController object>
self._slider.controller.set_value = <bound method TimeController.set_value of <core_...lers.document_controllers.TimeController object>>
to_set = 0.96

 shortcut_composer\core_components\controllers\document_controllers.py in set_value(self=<core_components.controllers.document_controllers.TimeController object>, value=0.96)
   61     def set_value(self, value: int) -> None:
   62         """Set passed frame of animation timeline as active."""
   63         self.document.current_time = value
   64 
   65     def get_label(self, value: int) -> Text:
self = <core_components.controllers.document_controllers.TimeController object>
self.document = Document(document=<PyKrita.krita.Document object at 0x00000000116E43A0>)
self.document.current_time = 1
value = 0.96

 krita\pykrita\shortcut_composer\api_krita\wrappers\document.py in current_time(self=Document(document=<PyKrita.krita.Document object at 0x00000000116E43A0>), time=0.96)
   70     def current_time(self, time: int) -> None:
   71         """Set current time using frame number"""
   72         self.document.setCurrentTime(time)
   73 
   74     def get_top_nodes(self) -> List[Node]:
self = Document(document=<PyKrita.krita.Document object at 0x00000000116E43A0>)
self.document = <PyKrita.krita.Document object>
self.document.setCurrentTime = <built-in method setCurrentTime of Document object>
time = 0.96
TypeError: setCurrentTime(self, int): argument 1 has unexpected type 'float'
    __cause__ = None
    __class__ = <class 'TypeError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of TypeError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of TypeError object>
    __doc__ = 'Inappropriate argument type.'
    __eq__ = <method-wrapper '__eq__' of TypeError object>
    __format__ = <built-in method __format__ of TypeError object>
    __ge__ = <method-wrapper '__ge__' of TypeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of TypeError object>
    __gt__ = <method-wrapper '__gt__' of TypeError object>
    __hash__ = <method-wrapper '__hash__' of TypeError object>
    __init__ = <method-wrapper '__init__' of TypeError object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of TypeError object>
    __lt__ = <method-wrapper '__lt__' of TypeError object>
    __ne__ = <method-wrapper '__ne__' of TypeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of TypeError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of TypeError object>
    __repr__ = <method-wrapper '__repr__' of TypeError object>
    __setattr__ = <method-wrapper '__setattr__' of TypeError object>
    __setstate__ = <built-in method __setstate__ of TypeError object>
    __sizeof__ = <built-in method __sizeof__ of TypeError object>
    __str__ = <method-wrapper '__str__' of TypeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = ("setCurrentTime(self, int): argument 1 has unexpected type 'float'",)
    with_traceback = <built-in method with_traceback of TypeError object>

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "slider_handler.py", line 100, in _value_setting_loop
    self._slider.controller.set_value(to_set)
  File "document_controllers.py", line 63, in set_value
    self.document.current_time = value
  File "document.py", line 72, in current_time
    self.document.setCurrentTime(time)
TypeError: setCurrentTime(self, int): argument 1 has unexpected type 'float'
  • If the plugin crashes and you get a traceback window - make sure to paste its content here.
  • You can attach screenshots if it helps to describe your issue.

Ideally:

  • check if the bug also occurs on the development branch (on github overview page, switch from 'main' to 'development', then download and install the plugin)
  • try to break down when the bug happens (always/occasionally), and what is needed for it to happen

When the bug is fixed, close the issue. After not getting a response from you for a week, I will close it myself.

Thanks for reporting.

It looks like 5.2.0 update of krita broke this action - I released Shortcut Composer 1.4.1 with this and a few other minor fixes.