Commands
View panels and modes
This page describes 48 commands in 6 sections. How to call them is explained in Commands.
View#
Camera, zoom and what the viewport draws.
lg.view.frame_all#
Fit the whole character in the viewport.
Hotkey: A / Home.
Example
lg.view.frame_all()
lg.view.frame_selected#
Fit the selected objects in the viewport.
Hotkey: F.
Example
lg.view.frame_selected()
lg.view.zoom_actual#
Set the zoom to 100%.
Example
lg.view.zoom_actual()
lg.view.zoom_in#
Zoom the viewport in.
Hotkey: Ctrl+=.
Example
lg.view.zoom_in()
lg.view.zoom_out#
Zoom the viewport out.
Hotkey: Ctrl+-.
Example
lg.view.zoom_out()
lg.view.show_rulers#
Rulers in world units along the top and left edges of the viewport
Synopsis
lg.view.show_rulers(state)
A switch: lg.view.show_rulers(True) turns it on, lg.view.show_rulers(False) off, without an argument it flips it.
Example
lg.view.show_rulers(True)
lg.view.pixels#
Pixels: draw region images aligned to whole pixels (display only, exports unchanged)
Synopsis
lg.view.pixels(state)
A switch: lg.view.pixels(True) turns it on, lg.view.pixels(False) off, without an argument it flips it.
Example
lg.view.pixels(True)
lg.view.hide_skin_bones#
Hide bones of skins that are not active; off shows every skin bone and runs every skin constraint in the viewport (editor only, exports unchanged)
Synopsis
lg.view.hide_skin_bones(state)
A switch: lg.view.hide_skin_bones(True) turns it on, lg.view.hide_skin_bones(False) off, without an argument it flips it.
Example
lg.view.hide_skin_bones(True)
lg.view.show_images#
Show or hide the attachment images.
Synopsis
lg.view.show_images(state)
Hotkey: Ctrl+Shift+I.
A switch: lg.view.show_images(True) turns it on, lg.view.show_images(False) off, without an argument it flips it.
Example
lg.view.show_images(True)
lg.view.show_bones#
Show or hide the bones.
Synopsis
lg.view.show_bones(state)
Hotkey: Ctrl+Shift+B.
A switch: lg.view.show_bones(True) turns it on, lg.view.show_bones(False) off, without an argument it flips it.
Example
lg.view.show_bones(True)
lg.view.show_mesh_wireframe#
Show or hide the mesh wireframe.
Synopsis
lg.view.show_mesh_wireframe(state)
Hotkey: Ctrl+Shift+M.
A switch: lg.view.show_mesh_wireframe(True) turns it on, lg.view.show_mesh_wireframe(False) off, without an argument it flips it.
Example
lg.view.show_mesh_wireframe(True)
lg.view.show_outline#
Outline every attachment's image bounds (region: quad, mesh: hull)
Synopsis
lg.view.show_outline(state)
Hotkey: Ctrl+Shift+O.
A switch: lg.view.show_outline(True) turns it on, lg.view.show_outline(False) off, without an argument it flips it.
Example
lg.view.show_outline(True)
lg.view.show_hidden#
Show every bone and slot hidden from the viewport
Hotkey: Ctrl+H / Ctrl+Shift+H.
Example
lg.view.show_hidden()
Viewport#
Actions that only make sense while a viewport gesture is held.
lg.viewport.pan_modifier#
Hold with the left mouse button to pan
Hotkey: Space.
Example
lg.viewport.pan_modifier()
lg.viewport.cancel#
Reverts the edit in progress
Hotkey: Esc.
Example
lg.viewport.cancel()
Mode#
Setup, Animate and 3D view.
lg.mode.setup#
Switch to Setup mode.
Synopsis
lg.mode.setup(state)
A switch: lg.mode.setup(True) turns it on, lg.mode.setup(False) off, without an argument it flips it.
Example
lg.mode.setup(True)
lg.mode.animate#
Switch to Animate mode.
Synopsis
lg.mode.animate(state)
A switch: lg.mode.animate(True) turns it on, lg.mode.animate(False) off, without an argument it flips it.
Example
lg.mode.animate(True)
lg.mode.view3d#
Switch to 3D view.
Synopsis
lg.mode.view3d(state)
A switch: lg.mode.view3d(True) turns it on, lg.mode.view3d(False) off, without an argument it flips it.
Example
lg.mode.view3d(True)
lg.mode.toggle#
Switch between Setup and Animate mode
Example
lg.mode.toggle()
Layouts#
Saving, resetting and managing panel layouts.
lg.layout.save_as#
Save the panels on screen as a named layout.
Opens a dialog and waits for you.
Example
lg.layout.save_as()
lg.layout.reset#
Reset the panel layout to the default one.
Example
lg.layout.reset()
lg.layout.delete#
Delete a saved layout (shows a list).
Opens a dialog and waits for you.
Example
lg.layout.delete()
lg.layout.manage#
Open the layout manager.
Opens a dialog and waits for you.
Example
lg.layout.manage()
Panels#
Show or hide a panel. Each command is a toggle.
| Panel | Command | Hotkey |
|---|---|---|
| Tree | lg.panel.tree(True) | — |
| Skins | lg.panel.skins(True) | — |
| Properties | lg.panel.properties(True) | — |
| Mesh | lg.panel.mesh(True) | — |
| Weights | lg.panel.weights(True) | Ctrl+Shift+W |
| Timeline | lg.panel.playback(True) | — |
| Dopesheet | lg.panel.dopesheet(True) | Ctrl+Shift+D |
| Graph | lg.panel.graph(True) | Ctrl+Shift+G |
| Warnings | lg.panel.warnings(True) | — |
| Metrics | lg.panel.metrics(True) | — |
| Preview | lg.panel.preview(True) | — |
| Slot Color | lg.panel.slot_color(True) | — |
| Audio | lg.panel.audio(True) | — |
| Images | lg.panel.images(True) | — |
| Constraints | lg.panel.constraints(True) | — |
| Scripts | lg.panel.scripts(True) | Ctrl+Shift+P |
| Animations | lg.panel.animations(True) | — |
| Bookmarks | lg.panel.bookmarks(True) | — |
| Playback | lg.panel.playback_settings(True) | — |
| AI Assistant | lg.panel.ai(True) | Ctrl+Shift+A |
Example
lg.panel.tree(True)
Help#
The Help menu.
lg.help.controls#
Show the viewport controls.
Example
lg.help.controls()
lg.help.check_updates#
Check for a new version.
Opens a dialog and waits for you.
Example
lg.help.check_updates()
lg.help.versions#
Show the installed and available versions.
Opens a dialog and waits for you.
Example
lg.help.versions()
lg.help.license#
Show the license.
Opens a dialog and waits for you.
Example
lg.help.license()
lg.help.about#
Show the About window.
Example
lg.help.about()