Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacey committed Jun 24, 2022
1 parent 2372b9e commit 878bdc9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 12 deletions.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,33 @@ Written in Python 3 so will only work with more modern version of Maya testing o

See [TODO.md](TODO.md) for roadmap

Testest
## Installing

There is a simple python script to install and create the module file for the maya plugin. This is in the root of the project folder and is called installEditor.py. This will locate the modules folder for the OS and generate the file MayaEditor.mod. This file is located in the Users home folder in one of the following locations.

- Linux : $HOME/maya
- Mac : $HOME/Library/Preferences/Autodesk/maya
- Windows %HOMEPATH%\\Documents\\maya\\


If this install doesn't work you can edit the provided file and modify the path to the correct locations

```
+ MayaEditor 1.0 /Users/jmacey/teaching/Code/MayaEditor
MAYA_PLUG_IN_PATH +:= plug-ins
```

## Loading

The plugin can be loaded from the plugin manager as shown

![alt](images/loadplugin.png)

The editor will auto load and display. If you close the window it can be re-opened using the following code

```
import maya.cmds as cmds
cmds.MayaEditor()
```


Binary file modified images/Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/loadplugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion installEditor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
import argparse
import os
import platform
import sys
Expand Down Expand Up @@ -41,7 +42,7 @@ def check_maya_installed(op_sys):


if __name__ == "__main__":
op_sys = platform.system()

try:
m_loc = check_maya_installed(op_sys)
except:
Expand Down
20 changes: 10 additions & 10 deletions plug-ins/MayaEditorCore/EditorDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ def __init__(self, parent=None):
self.settings = QSettings("NCCA", "NCCA_Maya_Editor")
# Next the UI as again required for other things
self.root_path = cmds.moduleInfo(path=True, moduleName="MayaEditor")
if os.system =="Windows" :
if os.system == "Windows":
UiLoader().loadUi(self.root_path + "\\plug-ins\\ui\\form.ui", self)
# load icons
self.python_icon = QIcon(self.root_path + "\\plug-ins\\icons\\python.png")
self.mel_icon = QIcon(self.root_path + "\\plug-ins\\icons\\mel.png")
self.text_icon = QIcon(self.root_path + "\\plug-ins\\icons\\text.png")
else :
else:
UiLoader().loadUi(self.root_path + "/plug-ins/ui/form.ui", self)
# load icons
self.python_icon = QIcon(self.root_path + "/plug-ins/icons/python.png")
Expand Down Expand Up @@ -136,9 +136,9 @@ def load_settings(self) -> None:
)
self.resize(self.settings.value("size", QSize(1024, 720)))
workspace = self.settings.value("workspace")
try :
try:
self.load_workspace_to_editor(workspace)
except :
except:
pass
self.settings.beginGroup("Font")
name = self.settings.value("font-name", type=str)
Expand Down Expand Up @@ -585,14 +585,14 @@ def create_output_window(self) -> None:
self.output_splitter.addWidget(self.output_window)
# add the help section and wire up
self.help_frame = QFrame()
if os.system=="Windows" :
if os.system == "Windows":
UiLoader().loadUi(
self.root_path + "\\plug-ins\\ui\\helpwidget.ui", self.help_frame
)
else :
self.root_path + "\\plug-ins\\ui\\helpwidget.ui", self.help_frame
)
else:
UiLoader().loadUi(
self.root_path + "/plug-ins/ui/helpwidget.ui", self.help_frame
)
self.root_path + "/plug-ins/ui/helpwidget.ui", self.help_frame
)
frame_layout = self.help_frame.grid_layout
self.help_output_window = TextEdit(
parent=self.help_frame, read_only=True, show_line_numbers=False
Expand Down

0 comments on commit 878bdc9

Please sign in to comment.