用Qt编写Maya插件

先贴个代码,待会解释。import maya.cmds as cmdsfrom maya import OpenMayauiFile = """ Dialog 0 0 400 300 Dialog 90 40 161 41
摘要由CSDN通过智能技术生成

先贴个代码,待会解释。

#
#    Renaming Tool by Clement Chaudat - 2014 v1.1.0
#
#    CONSTANTS IN TEXTFIELDS
#    Multiple constants with right-click on textField:
#        - OldName: good for prefix/suffix
#        - ObjectType
#        - ParentName
#
#    INCREMENT: "###" or "%3d"
#    Right-click on textField then "Set Start/Step" for
#    start number and step value for indent.
#
#    RENAME USING REGEXP:
#    example :   "end$" will replace "end" at the end of the name
#                "^start" will replace "start" at the beginning of the name
#

import re
import functools
import maya.cmds as cmds
from maya import OpenMaya

uiFile = """<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>Dialog</class>
 <widget class="QDialog" name="winRenamer">
  <property name="geometry">
   <rect>
    <x>120</x>
    <y>120</y>
    <width>320</width>
    <height>100</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Rename / Replace</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <property name="spacing">
    <number>4</number>
   </property>
   <property name="margin">
    <number>4</number>
   </property>
   <item>
    <widget class="QLineEdit" name="cc_edit_rename"/>
   </item>
   <item>
    <layout class="QHBoxLayout" name="horizontalLayout">
     <item>
      <widget class="QCheckBox" name="cc_check_replace">
       <property name="text">
        <string>Replace By:</string>
       </property>
      </widget>
     </item>
     <item>
      <widget class="QLineEdit" name="cc_edit_replace">
       <property name="enabled">
        <bool>false</bool>
       </property>
      </widget>
     </item>
    </layout>
   </item>
   <item>
    <layout class="QHBoxLayout" name="horizontalLayout_2">
     <item>
      <widget class="QRadioButton" name="cc_check_all">
       <property name="enabled">
        <bool>false</bool>
       </property>
       <property name="text">
        <string>All</string>
       </property>
      </widget>
     &
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值