diff --git a/octoprint_prettygcode/__init__.py b/octoprint_prettygcode/__init__.py index f9c324f..fa43ce0 100644 --- a/octoprint_prettygcode/__init__.py +++ b/octoprint_prettygcode/__init__.py @@ -38,9 +38,12 @@ def get_update_information(self): # ("OctoPrint-PluginSkeleton"), you may define that here. Same goes for the other metadata derived from setup.py that # can be overwritten via __plugin_xyz__ control properties. See the documentation for that. __plugin_name__ = "PrettyGCode" - global __plugin_implementation__ = PrettyGCodePlugin() +def __plugin_load__(): + global __plugin_implementation__ + __plugin_implementation__ = PrettyGCodePlugin() global __plugin_hooks__ __plugin_hooks__ = { "octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.get_update_information } + diff --git a/octoprint_prettygcode/static/css/prettygcode.css b/octoprint_prettygcode/static/css/prettygcode.css index f60e28f..9b3469d 100644 --- a/octoprint_prettygcode/static/css/prettygcode.css +++ b/octoprint_prettygcode/static/css/prettygcode.css @@ -91,7 +91,6 @@ .gwin #webcam_rotator { bottom: 20px; right: 40px; - width:360px; position: absolute; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); z-index:5; diff --git a/octoprint_prettygcode/templates/prettygcode_tab.jinja2 b/octoprint_prettygcode/templates/prettygcode_tab.jinja2 index 090c4f9..87d9c45 100644 --- a/octoprint_prettygcode/templates/prettygcode_tab.jinja2 +++ b/octoprint_prettygcode/templates/prettygcode_tab.jinja2 @@ -38,6 +38,7 @@ Options:
  • Sync to progress. Sync the 3d view to approximately where the printer is printing. See notes on syncing below.
  • Fatlines. Display lines with thickness. This looks much better but can cause a performance hit on slower machines.
  • Mirror. Display a mirrored version of the object below the print bed. This looks better and allows you to see additional parts of the GCode but is a bit slower.
  • +
  • Orbit when idle. After 5 seconds of no mouse/camera movement the camera will orbit around the center.
  • Reflections. Realtime reflections in the 3d nozzle. This is pure eye candy and can be disabled for more performance.
  • @@ -63,14 +64,14 @@ PrettyGCode uses WebGL and Three.js for rendering. WebGL may not be supported on My primary use for this plugin is to visually show print status when I stream my prints on Twitch. I use OBSStudio for streaming, but to get the browser plugin to render the 3D view you need to launch OBS with the --enable-gpu flag:

    -UI:

    -If you understand how to use CSS you can use the below section to customize the user interface. For example, to make the web camera bigger in fullscreen mode paste this code into the CSS window: +UI modifications +If you understand how to use CSS you can use the below section to customize the user interface. For example, to make the web camera smaller in fullscreen mode paste this code into the CSS window:
    -/* Make webcam bigger in fullscreen mode. */ +/* Make webcam smaller in fullscreen mode. */ .pgfullscreen .gwin #webcam_rotator { - width: 640px; + width: 360px; }