Skip to content

imgui_bundle v1.6.0 breaks things #644

@kushalkolar

Description

@kushalkolar

This occurs when using imgui_bundle v1.6.0 but not on v1.5.2. I will track it down and figure out a fix.

File ~/.pyenv/versions/3.10.15/lib/python3.10/site-packages/wgpu/utils/imgui/__init__.py:2
   1 from .imgui_backend import ImguiWgpuBackend # noqa: F401
----> 2 from .imgui_renderer import ImguiRenderer # noqa: F401
File ~/.pyenv/versions/3.10.15/lib/python3.10/site-packages/wgpu/utils/imgui/imgui_renderer.py:6
   2 import wgpu
   3 from .imgui_backend import ImguiWgpuBackend
----> 6 class ImguiRenderer:
   7   KEY_MAP = {
   8     "ArrowDown": imgui.Key.down_arrow,
   9     "ArrowUp": imgui.Key.up_arrow,
  (...)
   43     "Tab": imgui.Key.tab,
   44   }
   46   KEY_MAP_MOD = {
   47     "Shift": [imgui.Key.im](http://imgui.key.im/)_gui_mod_shift,
   48     "Control": [imgui.Key.im](http://imgui.key.im/)_gui_mod_ctrl,
   49     "Alt": [imgui.Key.im](http://imgui.key.im/)_gui_mod_alt,
   50     "Meta": [imgui.Key.im](http://imgui.key.im/)_gui_mod_super,
   51   }
File ~/.pyenv/versions/3.10.15/lib/python3.10/site-packages/wgpu/utils/imgui/imgui_renderer.py:47, in ImguiRenderer()
   6 class ImguiRenderer:
   7   KEY_MAP = {
   8     "ArrowDown": imgui.Key.down_arrow,
   9     "ArrowUp": imgui.Key.up_arrow,
  (...)
   43     "Tab": imgui.Key.tab,
   44   }
   46   KEY_MAP_MOD = {
---> 47     "Shift": [imgui.Key.im](http://imgui.key.im/)_gui_mod_shift,
   48     "Control": [imgui.Key.im](http://imgui.key.im/)_gui_mod_ctrl,
   49     "Alt": [imgui.Key.im](http://imgui.key.im/)_gui_mod_alt,
   50     "Meta": [imgui.Key.im](http://imgui.key.im/)_gui_mod_super,
   51   }
   53   def __init__(
   54     self, device, canvas: wgpu.gui.WgpuCanvasBase, render_target_format=None
   55   ):
   56     # Prepare present context
   57     self._canvas_context = canvas.get_context("wgpu")
File ~/.pyenv/versions/3.10.15/lib/python3.10/enum.py:437, in EnumMeta.__getattr__(cls, name)
  435   return cls._member_map_[name]
  436 except KeyError:
--> 437   raise AttributeError(name) from None
AttributeError: im_gui_mod_shift

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions