|-- addons
| |-- auto_lod
| | |-- art
| | |-- core
| | |-- binaries
| |-- spring_arm
|-- generic_shooter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PyQt5.QtCore import QDate, QTime, QDateTime, Qt | |
| now = QDate.currentDate() | |
| print(now.toString(Qt.ISODate)) | |
| print(now.toString(Qt.DefaultLocaleLongDate)) | |
| print(now.toString(Qt.DefaultLocaleShortDate)) | |
| date_time = QDateTime.currentDateTime() | |
| print(date_time.toString()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PyQt5.QtCore import QDate, QTime, QDateTime, Qt | |
| now = QDate.currentDate() | |
| print(now.toString(Qt.ISODate)) | |
| print(now.toString(Qt.DefaultLocaleLongDate)) | |
| print(now.toString(Qt.DefaultLocaleShortDate)) | |
| date_time = QDateTime.currentDateTime() | |
| print(date_time.toString()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PySide2 import QtWidgets, QtCore | |
| def _maya_main_window(): | |
| """Return Maya's main window""" | |
| for obj in QtWidgets.qApp.topLevelWidgets(): | |
| if obj.objectName() == 'MayaWindow': | |
| return obj | |
| raise RuntimeError('Could not find MayaWindow instance') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PyQt4 import QtGui, QtCore, uic | |
| def p(x): | |
| print x | |
| class MainWindow(QtGui.QMainWindow): | |
| def __init__(self): | |
| QtGui.QWidget.__init__(self) | |
| uic.loadUi('redirect.ui', self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*Complex Selector Example*/ | |
| QLineEdit { color: red } | |
| QLineEdit[readOnly="true"] { color: gray } | |
| QDialog QLineEdit { color: brown } | |
| /*Customizing QAbstractScrollArea*/ | |
| QTextEdit, QListView { | |
| background-color: white; | |
| background-image: url(draft.png); | |
| background-attachment: scroll; /*If the background-image is to be fixed with the viewport: scroll or fixed*/ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| class AttrDict(object): | |
| def __init__(self, init=None): | |
| if init is not None: | |
| self.__dict__.update(init) | |
| def __getitem__(self, key): | |
| return self.__dict__[key] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local beginX | |
| local beginY | |
| local endX | |
| local endY | |
| local startTime | |
| local xDistance | |
| local yDistance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # Automatic versioning the code using GIT | |
| # need GIT instaled on OS | |
| func _dev_auto_commit(): | |
| if OS.is_debug_build(): | |
| var path = '/usr/bin/git' | |
| var finder = File.new() | |
| if not finder.file_exists(path): | |
| if finder.file_exists('/usr/sbin/git'): | |
| path = '/usr/sbin/git' |
OlderNewer