Skip to content

Commit

Permalink
Open folder func
Browse files Browse the repository at this point in the history
  • Loading branch information
paulwinex committed Apr 4, 2015
1 parent 8209925 commit a1ebd1d
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 50 deletions.
8 changes: 6 additions & 2 deletions pw_multiScriptEditor/managers/__init__.py
Expand Up @@ -38,7 +38,10 @@ def mayaCompleter(*args):
def mayaDropEvent(*args):
from managers import _maya
return _maya.wrapDroppedText(*args)

def getMayaContextMenu(*args):
from managers import _maya
reload(_maya)
return _maya.contextMenu(*args)
###################################################################


Expand All @@ -50,7 +53,8 @@ def mayaDropEvent(*args):

contextMenus = dict(
hou=getHoudiniContextMenu,
nuke=getNukeContextMenu
nuke=getNukeContextMenu,
maya=getMayaContextMenu
)

dropEvents = dict(
Expand Down
11 changes: 11 additions & 0 deletions pw_multiScriptEditor/managers/_maya.py
Expand Up @@ -146,4 +146,15 @@ def wrapDroppedText(namespace, text, event):
pass
return text

def contextMenu(parent):
m = mayaMenuClass(parent)
return m

class mayaMenuClass(QMenu):
def __init__(self, parent):
super(mayaMenuClass, self).__init__('Maya', parent)
self.par = parent
a = QAction('Still Empty...', parent)
a.setEnabled(0)
self.addAction(a)

2 changes: 1 addition & 1 deletion pw_multiScriptEditor/run.cmd
@@ -1 +1 @@
pythonw.exe scriptEditor.py %*
start pythonw.exe scriptEditor.py %*
2 changes: 1 addition & 1 deletion pw_multiScriptEditor/scriptEditor.py
Expand Up @@ -67,7 +67,7 @@ def fixButton(btn, ico):
self.settingsFile_act.triggered.connect(self.openSettingsFile)
self.splitter.splitterMoved.connect(self.adjustColmpeters)
self.donate_act.triggered.connect(lambda :self.openLink('donate'))
self.openManual_act.triggered.connect(lambda :self.openLink('tutorials'))
self.openManual_act.triggered.connect(lambda :self.openLink('manual'))
self.about_act.triggered.connect(self.about)
self.shortcuts_act.triggered.connect(self.shortcuts)
self.printHelp_act.triggered.connect(self.mse_help)
Expand Down
1 change: 1 addition & 0 deletions pw_multiScriptEditor/style/links.py
@@ -1,5 +1,6 @@
links = dict(
donate = 'http://www.paulwinex.ru/donate/',
tutorials='http://www.paulwinex.ru/multi-script-editor-v2-0/',
manual='https://github.com/paulwinex/pw_MultiScriptEditor',
site='http://www.paulwinex.ru/'
)
16 changes: 16 additions & 0 deletions pw_multiScriptEditor/tested.txt
@@ -0,0 +1,16 @@
Supported applications:
Maya
Houdini
Nuke

Tested on:
Windows 7x64 Maya 2015
Windows 7x64 Maya 2014
Windows 7x64 Maya 2013
Windows 7x64 Houdini 13
Windows 7x64 Houdini 14
Windows 7x64 Nuke 8
Windows 7x64 Nuke 9
Kubuntu Houdini 13
Kubuntu Houdini 14
Ubuntu 12.4
5 changes: 5 additions & 0 deletions pw_multiScriptEditor/widgets/about.py
Expand Up @@ -2,6 +2,7 @@
from PySide.QtGui import *
import icons
import about_UIs
import os

class aboutClass(QDialog, about_UIs.Ui_Dialog):
def __init__(self, parent):
Expand All @@ -14,6 +15,10 @@ def __init__(self, parent):
self.donate_btn.setIconSize(QSize(24,24))
self.donate_btn.setIcon(QIcon(icons.icons['donate']))
self.donate_btn.clicked.connect(lambda :parent.openLink('donate'))
testedFile = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'tested.txt')
if os.path.exists(testedFile):
outText = open(testedFile).read()
self.textBrowser.setPlainText(outText)


text = '''Paul Winex 2015
Expand Down
23 changes: 3 additions & 20 deletions pw_multiScriptEditor/widgets/about.ui
Expand Up @@ -7,13 +7,13 @@
<x>0</x>
<y>0</y>
<width>465</width>
<height>299</height>
<height>393</height>
</rect>
</property>
<property name="windowTitle">
<string>About Multi Script Editor</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1,0">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
Expand Down Expand Up @@ -88,24 +88,7 @@
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Supported applications:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Maya&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Houdini&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Nuke&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Tested on:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Windows 7x64 Maya 2016&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Windows 7x64 Maya 2015&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Windows 7x64 Maya 2014&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Windows 7x64 Maya 2013&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Windows 7x64 Houdini 13&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Windows 7x64 Houdini 14&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Windows 7x64 Nuke 8&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Windows 7x64 Nuke 9&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Kubuntu Houdini 13&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Kubuntu Houdini 14&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;File not Found :(&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
Expand Down
23 changes: 4 additions & 19 deletions pw_multiScriptEditor/widgets/about_UIs.py
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'D:\Dropbox\Dropbox\pw_prefs\RnD\tools\pw_scriptEditor\pw_multiScriptEditor\widgets\about.ui'
#
# Created: Fri Mar 27 10:51:33 2015
# Created: Thu Apr 02 22:56:45 2015
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
Expand All @@ -12,7 +12,7 @@
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(465, 299)
Dialog.resize(465, 393)
self.verticalLayout = QtGui.QVBoxLayout(Dialog)
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout = QtGui.QHBoxLayout()
Expand Down Expand Up @@ -48,6 +48,7 @@ def setupUi(self, Dialog):
self.donate_btn.setObjectName("donate_btn")
self.horizontalLayout_2.addWidget(self.donate_btn)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.verticalLayout.setStretch(2, 1)

self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
Expand All @@ -60,22 +61,6 @@ def retranslateUi(self, Dialog):
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Supported applications:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Maya</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Houdini</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Nuke</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Tested on:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Windows 7x64 Maya 2015</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Windows 7x64 Maya 2014</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Windows 7x64 Maya 2013</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Windows 7x64 Houdini 13</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Windows 7x64 Houdini 14</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Windows 7x64 Nuke 8</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Windows 7x64 Nuke 9</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Kubuntu Houdini 13</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> Kubuntu Houdini 14</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">File not Found :(</span></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.donate_btn.setText(QtGui.QApplication.translate("Dialog", "Donate", None, QtGui.QApplication.UnicodeUTF8))

9 changes: 2 additions & 7 deletions pw_multiScriptEditor/widgets/inputWidget.py
Expand Up @@ -399,23 +399,18 @@ def addText(self, text):
########################### DROP
def dragEnterEvent(self, event):
event.acceptProposedAction()
# if not event.mimeData().hasText():
# event.mimeData().setText(managers.mayaDragTempData)
QTextEdit.dragEnterEvent(self,event)

def dragMoveEvent(self, event):
event.acceptProposedAction()
# QTextEdit.dragMoveEvent(self,event)
# if event.mimeData().hasText():
QTextEdit.dragMoveEvent(self,event)

def dragLeaveEvent(self, event):
event.accept()
# if event.mimeData().hasText():
event.acceptProposedAction()
QTextEdit.dragLeaveEvent(self,event)

def dropEvent(self, event):
event.accept()
event.acceptProposedAction()
if managers.context in managers.dropEvents and event.mimeData().hasText():
mim = event.mimeData()
text = mim.text()
Expand Down

0 comments on commit a1ebd1d

Please sign in to comment.