maya命令 addAttr 運用。

2022-09-17 06:42:10 字數 711 閱讀 2570

import maya.cmds as cmds

cmds.file(new=1,f=1)

sphere_xform, sphere_shape = cmds.polysphere(n='earth')

cmds.addattr(sphere_xform, attributetype = 'float', shortname = 'mass', longname = 'mass', defaultvalue = 5.9742e24)

print(cmds.getattr(sphere_xform+'.mass'))

cmds.addattr(sphere_xform, datatype= 'string', shortname = 'alt', longname = 'alternatename')

cmds.setattr('%s.alternatename'%sphere_xform, 'terra', type='string')

print (cmds.getattr('%s.alt'%sphere_xform))

addattr()新增屬性

上面是新增浮點數和新增字串。新增浮點數時候,設定了預設值。

新增字串屬性時,加datatype標誌,在設定字串時,要指定type。

linux ssh l 命令運用

ssh是遠端登入命令,l選項是最常用的選項,下面是我的一些總結 遠端登入 ssh l username ip 遠端登入到 10.175.23.9ssh l root2 10.175.23.9 執行遠端命令 不登入 ssh l username ip command 不遠端登入到 10.175.23....

adb shell logcat 命令的運用

android 開發的程式設計師開發程式的時候 一定為log而苦惱吧。eclipse老是log找不到,是不是很讓人不爽,雖然android studio的logcat功能很不錯,蛋也沒有在命令列terminal中列印出來更方便。adb logcat 這個命令會輸出log的格式為日誌時間,程序號,執行...

makefile命令基本運用(一)

makefile命令基本運用 一 一 makefile介紹 乙個工程中的原始檔不計其數,其按型別 功能 模組分別放在若干個目錄中,makefile定義了一系列的規則來指定,哪些檔案需要先編譯,哪些檔案需要後編譯,哪些檔案需要重新編譯,甚至於進行更複雜的功能操作,因為 makefile就像乙個shel...