本文整理汇总了Python中animeditor.AnimEditor类的典型用法代码示例。如果您正苦于以下问题:Python AnimEditor类的具体用法?Python AnimEditor怎么用?Python AnimEditor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AnimEditor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: editAreaWidth
def editAreaWidth(self):
temp = self.chooseBox.currentIndex()
self.eAreaWidthEditor = AnimEditor()
self.eAreaWidthEditor.setAnimBlock(self.m2.particle_emitters[temp].emission_area_width,self.m2.gSequ)
self.eAreaWidthEditor.show()
self.connect(self.eAreaWidthEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setAreaWidth)
示例2: editLifespan
def editLifespan(self):
temp = self.chooseBox.currentIndex()
self.lifespanEditor = AnimEditor()
self.lifespanEditor.setAnimBlock(self.m2.particle_emitters[temp].lifespan,self.m2.gSequ)
self.lifespanEditor.show()
self.connect(self.lifespanEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setLifespan)
示例3: editEmissionRate
def editEmissionRate(self):
temp = self.chooseBox.currentIndex()
self.eRateEditor = AnimEditor()
self.eRateEditor.setAnimBlock(self.m2.particle_emitters[temp].emission_rate,self.m2.gSequ)
self.eRateEditor.show()
self.connect(self.eRateEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setEmissionRate)
示例4: editAmbientColor
def editAmbientColor(self):
temp = self.lightList.currentIndex()
self.AmbColEditor = AnimEditor()
self.AmbColEditor.setAnimBlock(self.m2.lights[temp].AmbientCol,self.m2.gSequ)
self.AmbColEditor.show()
self.connect(self.AmbColEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setAmbientColor)
示例5: editHorizontalRange
def editHorizontalRange(self):
temp = self.chooseBox.currentIndex()
self.HorRangeEditor = AnimEditor()
self.HorRangeEditor.setAnimBlock(self.m2.particle_emitters[temp].hor_range,self.m2.gSequ)
self.HorRangeEditor.show()
self.connect(self.HorRangeEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setHorizontalRange)
示例6: editTransparency
def editTransparency(self):
transparency = self.comboBox.currentIndex()
self.TransparencyEditor = AnimEditor()
self.TransparencyEditor.setAnimBlock(self.m2.transparency[transparency].alpha, self.m2.gSequ)
self.TransparencyEditor.show()
self.connect(self.TransparencyEditor, QtCore.SIGNAL("AnimBlockEdited()"), self.setTransparency)
示例7: editRotation
def editRotation(self):
temp = self.comboBox.currentIndex()
self.RotationEditor = AnimEditor()
self.RotationEditor.setAnimBlock(self.m2.bones[temp].rotation,self.m2.gSequ)
self.RotationEditor.show()
self.connect(self.RotationEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setRotation)
示例8: editAlpha
def editAlpha(self):
temp = self.colorList.currentIndex()
self.AlphaEditor = AnimEditor()
self.AlphaEditor.setAnimBlock(self.m2.colors[temp].alpha,self.m2.gSequ)
self.AlphaEditor.show()
self.connect(self.AlphaEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setAlpha)
示例9: UVAnimEditor
class UVAnimEditor(QtGui.QDialog):
def __init__(self):
QtGui.QDialog.__init__(self)
self.setupUi(self)
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(514, 300)
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
self.buttonBox.setGeometry(QtCore.QRect(410, 10, 101, 81))
self.buttonBox.setOrientation(QtCore.Qt.Vertical)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.comboBox = QtGui.QComboBox(Dialog)
self.comboBox.setGeometry(QtCore.QRect(10, 10, 85, 27))
self.comboBox.setObjectName("comboBox")
self.addIcon = QtGui.QIcon("Icons/edit-add.png")
self.addButton = QtGui.QPushButton(self.addIcon,"Add",self)
self.addButton.setGeometry(QtCore.QRect(110, 10, 92, 28))
self.addButton.setObjectName("addButton")
self.connect(self.addButton, QtCore.SIGNAL("clicked()"), self.adduvanimation)
self.line = QtGui.QFrame(Dialog)
self.line.setGeometry(QtCore.QRect(10, 40, 201, 21))
self.line.setFrameShape(QtGui.QFrame.HLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName("line")
self.translationIcon = QtGui.QIcon("Icons/edit-translation.png")
self.editTranslationButton = QtGui.QPushButton(self.translationIcon,"Edit Translation",Dialog)
self.editTranslationButton.setGeometry(QtCore.QRect(10, 50, 120, 28))
self.editTranslationButton.setObjectName("editTranslationButton")
self.connect(self.editTranslationButton, QtCore.SIGNAL("clicked()"), self.editTranslation)
self.scalingIcon = QtGui.QIcon("Icons/edit-scaling.png")
self.editScalingButton = QtGui.QPushButton(self.scalingIcon,"Edit Scaling",Dialog)
self.editScalingButton.setGeometry(QtCore.QRect(10, 90, 120, 28))
self.editScalingButton.setObjectName("editScalingButton")
self.connect(self.editScalingButton, QtCore.SIGNAL("clicked()"), self.editScaling)
self.rotationIcon = QtGui.QIcon("Icons/edit-rotation.png")
self.editRotationButton = QtGui.QPushButton(self.rotationIcon,"Edit Rotation",Dialog)
self.editRotationButton.setGeometry(QtCore.QRect(10, 130, 120, 28))
self.editRotationButton.setObjectName("editRotationButton")
self.connect(self.editRotationButton, QtCore.SIGNAL("clicked()"), self.editRotation)
self.retranslateUi(Dialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Edit UV-Animations", None, QtGui.QApplication.UnicodeUTF8))
self.editTranslationButton.setText(QtGui.QApplication.translate("Dialog", "Edit Translation", None, QtGui.QApplication.UnicodeUTF8))
self.editScalingButton.setText(QtGui.QApplication.translate("Dialog", "Edit Scaling", None, QtGui.QApplication.UnicodeUTF8))
self.editRotationButton.setText(QtGui.QApplication.translate("Dialog", "Edit Rotation", None, QtGui.QApplication.UnicodeUTF8))
self.addButton.setText(QtGui.QApplication.translate("Dialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
def setModel(self,m2,skin):
self.m2 = m2
self.skin = skin
for i in range(len(self.m2.uv_anim)):
self.comboBox.addItem(str(i))
def setTranslation(self):
self.m2.uv_anim[self.comboBox.currentIndex()].translation = self.TranslationEditor.getAnimBlock()
def editTranslation(self):
temp = self.comboBox.currentIndex()
self.TranslationEditor = AnimEditor()
self.TranslationEditor.setAnimBlock(self.m2.uv_anim[temp].translation,self.m2.gSequ)
self.TranslationEditor.show()
self.connect(self.TranslationEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setTranslation)
def setScaling(self):
self.m2.uv_anim[self.comboBox.currentIndex()].scaling = self.ScalingEditor.getAnimBlock()
def editScaling(self):
temp = self.comboBox.currentIndex()
self.ScalingEditor = AnimEditor()
self.ScalingEditor.setAnimBlock(self.m2.uv_anim[temp].scaling,self.m2.gSequ)
self.ScalingEditor.show()
self.connect(self.ScalingEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setScaling)
def setRotation(self):
self.m2.uv_anim[self.comboBox.currentIndex()].rotation = self.RotationEditor.getAnimBlock()
def editRotation(self):
temp = self.comboBox.currentIndex()
self.RotationEditor = AnimEditor()
self.RotationEditor.setAnimBlock(self.m2.uv_anim[temp].rotation,self.m2.gSequ)
self.RotationEditor.show()
self.connect(self.RotationEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setRotation)
#.........这里部分代码省略.........
示例10: editEnabled
def editEnabled(self):
temp = self.comboBox.currentIndex()
self.EnabledEditor = AnimEditor()
self.EnabledEditor.setAnimBlock(self.m2.attachments[temp].Enabled,self.m2.gSequ)
self.EnabledEditor.show()
self.connect(self.EnabledEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setEnabled)
示例11: ColorEditor
class ColorEditor(QtGui.QDialog):
def __init__(self):
QtGui.QDialog.__init__(self)
self.setupUi(self)
self.last = -1
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(450, 150)
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
self.buttonBox.setGeometry(QtCore.QRect(90, 110, 341, 32))
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.colorList = QtGui.QComboBox(Dialog)
self.colorList.setGeometry(QtCore.QRect(10, 10, 69, 22))
self.colorList.setObjectName("colorList")
self.connect(self.colorList, QtCore.SIGNAL("currentIndexChanged(int)"), self.changeEdit)
self.line = QtGui.QFrame(Dialog)
self.line.setGeometry(QtCore.QRect(10, 40, 211, 16))
self.line.setFrameShape(QtGui.QFrame.HLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName("line")
self.addIcon = QtGui.QIcon("Icons/edit-add.png")
self.addButton = QtGui.QPushButton(self.addIcon,"Add",Dialog)
self.addButton.setGeometry(QtCore.QRect(100, 10, 75, 23))
self.addButton.setObjectName("addButton")
self.connect(self.addButton, QtCore.SIGNAL("clicked()"), self.addColor)
self.colorButton = QtGui.QPushButton(Dialog)
self.colorButton.setGeometry(QtCore.QRect(150, 60, 75, 23))
self.colorButton.setObjectName("colorButton")
self.connect(self.colorButton, QtCore.SIGNAL("clicked()"), self.editColor)
self.alphaButton = QtGui.QPushButton(Dialog)
self.alphaButton.setGeometry(QtCore.QRect(240, 60, 75, 23))
self.alphaButton.setObjectName("alphaButton")
self.connect(self.alphaButton, QtCore.SIGNAL("clicked()"), self.editAlpha)
self.retranslateUi(Dialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Color Editor", None, QtGui.QApplication.UnicodeUTF8))
self.addButton.setText(QtGui.QApplication.translate("Dialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
self.colorButton.setText(QtGui.QApplication.translate("Dialog", "Edit Color", None, QtGui.QApplication.UnicodeUTF8))
self.alphaButton.setText(QtGui.QApplication.translate("Dialog", "Edit Alpha", None, QtGui.QApplication.UnicodeUTF8))
def editColor(self):
temp = self.colorList.currentIndex()
self.ColEditor = AnimColorEditor()
self.ColEditor.setAnimBlock(self.m2.colors[temp].color,self.m2.gSequ)
self.ColEditor.show()
self.connect(self.ColEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setColor)
def setColor(self):
self.m2.colors[self.colorList.currentIndex()].color = self.ColEditor.getAnimBlock()
def editAlpha(self):
temp = self.colorList.currentIndex()
self.AlphaEditor = AnimEditor()
self.AlphaEditor.setAnimBlock(self.m2.colors[temp].alpha,self.m2.gSequ)
self.AlphaEditor.show()
self.connect(self.AlphaEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setAlpha)
def setAlpha(self):
self.m2.colors[self.colorList.currentIndex()].alpha = self.AlphaEditor.getAnimBlock()
def finalizeMe(self):
self.saveOld()
self.accept()
def setCurrentEditing(self,i):
self.colorList.setCurrentIndex(i)
self.changeEdit()
def setModel(self,m2,skin):
self.m2 = m2
self.skin = skin
for i in range(len(self.m2.colors)):
self.colorList.addItem(str(i))
self.changeEdit()
def addColor(self):
l = m2.Color()
l.color.type = m2.DATA_VEC3
l.alpha.type = m2.DATA_FLOAT
self.m2.colors.append(l)
#.........这里部分代码省略.........
示例12: AttachmentEditor
#.........这里部分代码省略.........
self.label.setObjectName("label")
self.xEdit = QtGui.QLineEdit(Dialog)
self.xEdit.setGeometry(QtCore.QRect(20, 130, 50, 26))
self.xEdit.setObjectName("xEdit")
self.yEdit = QtGui.QLineEdit(Dialog)
self.yEdit.setGeometry(QtCore.QRect(80, 130, 50, 26))
self.yEdit.setObjectName("yEdit")
self.zEdit = QtGui.QLineEdit(Dialog)
self.zEdit.setGeometry(QtCore.QRect(140, 130, 50, 26))
self.zEdit.setObjectName("zEdit")
self.boneBox = QtGui.QComboBox(Dialog)
self.boneBox.setGeometry(QtCore.QRect(20, 170, 100, 27))
self.boneBox.setObjectName("boneBox")
self.enabledIcon = QtGui.QIcon("Icons/edit-enabled.png")
self.enabledButton = QtGui.QPushButton(self.enabledIcon,"Edit Enabled",Dialog)
self.enabledButton.setGeometry(QtCore.QRect(20, 200, 140, 28))
self.enabledButton.setObjectName("enabledButton")
self.connect(self.enabledButton, QtCore.SIGNAL("clicked()"), self.editEnabled)
self.retranslateUi(Dialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), self.finalizeMe)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def finalizeMe(self):
self.saveOld()
self.accept()
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Attachment Editor", None, QtGui.QApplication.UnicodeUTF8))
self.addButton.setText(QtGui.QApplication.translate("Dialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("Dialog", "Position:", None, QtGui.QApplication.UnicodeUTF8))
for i in range(50):
self.typeBox.setItemText(i, QtGui.QApplication.translate("Dialog", str(i)+": "+attachment_types[i], None, QtGui.QApplication.UnicodeUTF8))
def setModel(self,m2,skin):
self.m2 = m2
self.skin = skin
for i in range(len(self.m2.attachments)):
self.comboBox.addItem(str(i)+": "+attachment_types[self.m2.attachments[i].Id])
for i in range(len(self.m2.bones)):
self.boneBox.addItem("Bone: "+str(i)+"/"+str(self.m2.bones[i].KeyBoneId))
self.changeEdit()
def setCurrentEditing(self,i):
self.comboBox.setCurrentIndex(i)
self.changeEdit()
def addAttachment(self,parbone = 0):
att = m2.Attachment()
att.Enabled.type = m2.DATA_INT
att.bone = parbone
lu = m2.Lookup()
lu.Id = self.m2.hdr.attachments.count
self.m2.attach_lookup.append(lu)
self.m2.attachments.append(att)
self.comboBox.addItem(str(self.m2.hdr.attachments.count)+": "+attachment_types[self.m2.attachments[self.m2.hdr.attachments.count].Id])
self.m2.hdr.attachments.count += 1
self.m2.hdr.attach_lookup.count += 1
def changeEdit(self):
self.saveOld()
self.last = self.comboBox.currentIndex()
if not len(self.m2.attachments)<1:
self.typeBox.setCurrentIndex(self.m2.attachments[self.comboBox.currentIndex()].Id)
self.xEdit.setText(str(self.m2.attachments[self.comboBox.currentIndex()].pos.x))
self.yEdit.setText(str(self.m2.attachments[self.comboBox.currentIndex()].pos.y))
self.zEdit.setText(str(self.m2.attachments[self.comboBox.currentIndex()].pos.z))
self.boneBox.setCurrentIndex(self.m2.attachments[self.comboBox.currentIndex()].bone)
def saveOld(self):
if (self.last == -1):
return
self.m2.attachments[self.last].Id = self.typeBox.currentIndex()
self.m2.attachments[self.last].pos.x = float(self.xEdit.text())
self.m2.attachments[self.last].pos.y = float(self.yEdit.text())
self.m2.attachments[self.last].pos.z = float(self.zEdit.text())
self.m2.attachments[self.last].bone = self.boneBox.currentIndex()
self.comboBox.setItemText(self.last,str(self.last)+": "+attachment_types[self.m2.attachments[self.last].Id])
def editEnabled(self):
temp = self.comboBox.currentIndex()
self.EnabledEditor = AnimEditor()
self.EnabledEditor.setAnimBlock(self.m2.attachments[temp].Enabled,self.m2.gSequ)
self.EnabledEditor.show()
self.connect(self.EnabledEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setEnabled)
def setEnabled(self):
self.m2.attachments[self.comboBox.currentIndex()].Enabled = self.EnabledEditor.getAnimBlock()
示例13: editAttenuationEnd
def editAttenuationEnd(self):
temp = self.lightList.currentIndex()
self.AttEndEditor = AnimEditor()
self.AttEndEditor.setAnimBlock(self.m2.lights[temp].AttEnd,self.m2.gSequ)
self.AttEndEditor.show()
self.connect(self.AttEndEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setAttenuationEnd)
示例14: editDiffuseIntensity
def editDiffuseIntensity(self):
temp = self.lightList.currentIndex()
self.DiffIntEditor = AnimEditor()
self.DiffIntEditor.setAnimBlock(self.m2.lights[temp].DiffuseInt,self.m2.gSequ)
self.DiffIntEditor.show()
self.connect(self.DiffIntEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setDiffuseIntensity)
示例15: editStrongGravity
def editStrongGravity(self):
temp = self.chooseBox.currentIndex()
self.strongGravEditor = AnimEditor()
self.strongGravEditor.setAnimBlock(self.m2.particle_emitters[temp].gravity2,self.m2.gSequ)
self.strongGravEditor.show()
self.connect(self.strongGravEditor,QtCore.SIGNAL("AnimBlockEdited()"),self.setStrongGravity)