ジャンプ先: 概要. 戻り値. フラグ. Python 例.
modelEditor(
[editorName]
, [activeComponentsXray=boolean], [activeOnly=boolean], [activeView=boolean], [addObjects=string], [addSelected=boolean], [allObjects=boolean], [backfaceCulling=boolean], [bufferMode=string], [bumpResolution=[uint, uint]], [camera=string], [cameraName=string], [cameraSetup=boolean], [cameras=boolean], [colorMap=boolean], [colorResolution=[uint, uint]], [control=boolean], [controlVertices=boolean], [cullingOverride=string], [default=boolean], [defineTemplate=string], [deformers=boolean], [dimensions=boolean], [displayAppearance=string], [displayLights=string], [displayTextures=boolean], [docTag=string], [dynamicConstraints=boolean], [dynamics=boolean], [editorChanged=script], [exists=boolean], [filter=string], [filteredObjectList=boolean], [fluids=boolean], [fogColor=[float, float, float, float]], [fogDensity=float], [fogEnd=float], [fogMode=string], [fogSource=string], [fogStart=float], [fogging=boolean], [follicles=boolean], [forceMainConnection=string], [grid=boolean], [hairSystems=boolean], [handles=boolean], [headsUpDisplay=boolean], [highlightConnection=string], [hulls=boolean], [ignorePanZoom=boolean], [ikHandles=boolean], [imagePlane=boolean], [interactive=boolean], [isFiltered=boolean], [jointXray=boolean], [joints=boolean], [lights=boolean], [lineWidth=float], [locators=boolean], [lockMainConnection=boolean], [lowQualityLighting=boolean], [mainListConnection=string], [manipulators=boolean], [maxConstantTransparency=float], [modelPanel=string], [nCloths=boolean], [nParticles=boolean], [nRigids=boolean], [noUndo=boolean], [nurbsCurves=boolean], [nurbsSurfaces=boolean], [objectFilter=script], [objectFilterList=script], [objectFilterListUI=script], [objectFilterShowInHUD=boolean], [objectFilterUI=script], [occlusionCulling=boolean], [panel=string], [parent=string], [pivots=boolean], [planes=boolean], [pluginObjects=[string, boolean]], [polymeshes=boolean], [queryPluginObjects=string], [removeSelected=boolean], [rendererDeviceName=boolean], [rendererList=boolean], [rendererListUI=boolean], [rendererName=string], [rendererOverrideList=boolean], [rendererOverrideListUI=boolean], [rendererOverrideName=string], [selectionConnection=string], [selectionHiliteDisplay=boolean], [setSelected=boolean], [shadows=boolean], [smoothWireframe=boolean], [sortTransparent=boolean], [stateString=boolean], [strokes=boolean], [subdivSurfaces=boolean], [textureAnisotropic=boolean], [textureDisplay=string], [textureHilight=boolean], [textureMaxSize=int], [textureMemoryUsed=boolean], [textureSampling=int], [textures=boolean], [transpInShadows=boolean], [transparencyAlgorithm=string], [twoSidedLighting=boolean], [unParent=boolean], [unlockMainConnection=boolean], [updateColorMode=boolean], [updateMainConnection=boolean], [useBaseRenderer=boolean], [useColorIndex=boolean], [useDefaultMaterial=boolean], [useInteractiveMode=boolean], [useRGBImagePlane=boolean], [useTemplate=string], [userNode=string], [viewObjects=boolean], [viewSelected=boolean], [viewType=boolean], [wireframeBackingStore=boolean], [wireframeOnShaded=boolean], [xray=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
modelEditor は、取り消し可能、照会可能、および編集可能です。
モデル エディタの作成、編集、照会が行われます。 このコマンドのフラグの一部で、通常モードとインタラクティブ/再生モードの設定が異なることに注意してください。たとえば、通常はシェーディング モードを使用しますが、処理速度を上げるために再生中はワイヤフレームを使用するように設定できます。一部のフラグでは既定設定をサポートし、新しいモデル エディタをその設定で作成できます。string | エディタの名前 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
exists(ex)
|
boolean
|
|||
|
||||
defineTemplate(dt)
|
string
|
|||
|
||||
useTemplate(ut)
|
string
|
|||
|
||||
panel(pnl)
|
string
|
|||
|
||||
parent(p)
|
string
|
|||
|
||||
unParent(up)
|
boolean
|
|||
|
||||
control(ctl)
|
boolean
|
|||
|
||||
mainListConnection(mlc)
|
string
|
|||
|
||||
forceMainConnection(fmc)
|
string
|
|||
|
||||
selectionConnection(slc)
|
string
|
|||
|
||||
highlightConnection(hlc)
|
string
|
|||
|
||||
filter(f)
|
string
|
|||
|
||||
lockMainConnection(lck)
|
boolean
|
|||
|
||||
stateString(sts)
|
boolean
|
|||
|
||||
unlockMainConnection(ulk)
|
boolean
|
|||
|
||||
updateMainConnection(upd)
|
boolean
|
|||
|
||||
docTag(dtg)
|
string
|
|||
|
||||
camera(cam)
|
string
|
|||
|
||||
cameraName(cn)
|
string
|
|||
|
||||
displayLights(dl)
|
string
|
|||
|
||||
bufferMode(bm)
|
string
|
|||
|
||||
activeOnly(ao)
|
boolean
|
|||
|
||||
interactive(i)
|
boolean
|
|||
|
||||
default(d)
|
boolean
|
|||
|
||||
ignorePanZoom(ipz)
|
boolean
|
|||
|
||||
twoSidedLighting(tsl)
|
boolean
|
|||
|
||||
displayAppearance(da)
|
string
|
|||
|
||||
wireframeOnShaded(wos)
|
boolean
|
|||
|
||||
headsUpDisplay(hud)
|
boolean
|
|||
|
||||
selectionHiliteDisplay(sel)
|
boolean
|
|||
|
||||
useDefaultMaterial(udm)
|
boolean
|
|||
|
||||
useColorIndex(uci)
|
boolean
|
|||
|
||||
userNode(un)
|
string
|
|||
|
||||
wireframeBackingStore(wbs)
|
boolean
|
|||
|
||||
useRGBImagePlane(ip)
|
boolean
|
|||
|
||||
imagePlane(imp)
|
boolean
|
|||
|
||||
updateColorMode(ucm)
|
boolean
|
|||
|
||||
colorMap(cm)
|
boolean
|
|||
|
||||
backfaceCulling(bfc)
|
boolean
|
|||
|
||||
xray(xr)
|
boolean
|
|||
|
||||
jointXray(jx)
|
boolean
|
|||
|
||||
activeComponentsXray(acx)
|
boolean
|
|||
|
||||
maxConstantTransparency(mct)
|
float
|
|||
|
||||
displayTextures(dtx)
|
boolean
|
|||
|
||||
smoothWireframe(swf)
|
boolean
|
|||
|
||||
lineWidth(lw)
|
float
|
|||
|
||||
textureMaxSize(tms)
|
int
|
|||
|
||||
textureMemoryUsed(tmu)
|
boolean
|
|||
|
||||
textureAnisotropic(ta)
|
boolean
|
|||
|
||||
textureSampling(ts)
|
int
|
|||
|
||||
textureDisplay(td)
|
string
|
|||
|
||||
textureHilight(th)
|
boolean
|
|||
|
||||
fogging(fg)
|
boolean
|
|||
|
||||
fogSource(fsc)
|
string
|
|||
|
||||
fogMode(fmd)
|
string
|
|||
|
||||
fogDensity(fdn)
|
float
|
|||
|
||||
fogEnd(fen)
|
float
|
|||
|
||||
fogStart(fst)
|
float
|
|||
|
||||
fogColor(fcl)
|
[float, float, float, float]
|
|||
|
||||
shadows(sdw)
|
boolean
|
|||
|
||||
rendererName(rnm)
|
string
|
|||
|
||||
rendererDeviceName(rdn)
|
boolean
|
|||
|
||||
rendererList(rls)
|
boolean
|
|||
|
||||
rendererListUI(rlu)
|
boolean
|
|||
|
||||
rendererOverrideName(rom)
|
string
|
|||
|
||||
rendererOverrideList(rol)
|
boolean
|
|||
|
||||
rendererOverrideListUI(rou)
|
boolean
|
|||
|
||||
colorResolution(crz)
|
[uint, uint]
|
|||
|
||||
bumpResolution(brz)
|
[uint, uint]
|
|||
|
||||
transparencyAlgorithm(tal)
|
string
|
|||
|
||||
transpInShadows(tis)
|
boolean
|
|||
|
||||
cullingOverride(cov)
|
string
|
|||
|
||||
lowQualityLighting(lql)
|
boolean
|
|||
|
||||
occlusionCulling(ocl)
|
boolean
|
|||
|
||||
useBaseRenderer(ubr)
|
boolean
|
|||
|
||||
nurbsCurves(nc)
|
boolean
|
|||
|
||||
nurbsSurfaces(ns)
|
boolean
|
|||
|
||||
polymeshes(pm)
|
boolean
|
|||
|
||||
subdivSurfaces(sds)
|
boolean
|
|||
|
||||
planes(pl)
|
boolean
|
|||
|
||||
lights(lt)
|
boolean
|
|||
|
||||
cameras(ca)
|
boolean
|
|||
|
||||
controlVertices(cv)
|
boolean
|
|||
|
||||
grid(gr)
|
boolean
|
|||
|
||||
hulls(hu)
|
boolean
|
|||
|
||||
joints(j)
|
boolean
|
|||
|
||||
ikHandles(ikh)
|
boolean
|
|||
|
||||
deformers(df)
|
boolean
|
|||
|
||||
dynamics(dy)
|
boolean
|
|||
|
||||
fluids(fl)
|
boolean
|
|||
|
||||
hairSystems(hs)
|
boolean
|
|||
|
||||
follicles(fo)
|
boolean
|
|||
|
||||
nCloths(ncl)
|
boolean
|
|||
|
||||
nParticles(npa)
|
boolean
|
|||
|
||||
nRigids(nr)
|
boolean
|
|||
|
||||
dynamicConstraints(dc)
|
boolean
|
|||
|
||||
locators(lc)
|
boolean
|
|||
|
||||
manipulators(m)
|
boolean
|
|||
|
||||
dimensions(dim)
|
boolean
|
|||
|
||||
handles(ha)
|
boolean
|
|||
|
||||
pivots(pv)
|
boolean
|
|||
|
||||
textures(tx)
|
boolean
|
|||
|
||||
strokes(str)
|
boolean
|
|||
|
||||
pluginObjects(po)
|
[string, boolean]
|
|||
|
||||
queryPluginObjects(qpo)
|
string
|
|||
|
||||
allObjects(alo)
|
boolean
|
|||
|
||||
useInteractiveMode(ui)
|
boolean
|
|||
|
||||
activeView(av)
|
boolean
|
|||
|
||||
sortTransparent(st)
|
boolean
|
|||
|
||||
viewSelected(vs)
|
boolean
|
|||
|
||||
setSelected(ss)
|
boolean
|
|||
|
||||
addSelected(addSelected)
|
boolean
|
|||
|
||||
removeSelected(rs)
|
boolean
|
|||
|
||||
addObjects(aob)
|
string
|
|||
|
||||
viewObjects(vo)
|
boolean
|
|||
|
||||
noUndo(nud)
|
boolean
|
|||
|
||||
cameraSetup(cs)
|
boolean
|
|||
|
||||
editorChanged(ec)
|
script
|
|||
|
||||
objectFilter(obf)
|
script
|
|||
|
||||
objectFilterUI(obu)
|
script
|
|||
|
||||
objectFilterList(ofl)
|
script
|
|||
|
||||
objectFilterListUI(ofu)
|
script
|
|||
|
||||
objectFilterShowInHUD(ofs)
|
boolean
|
|||
|
||||
isFiltered(isFiltered)
|
boolean
|
|||
|
||||
filteredObjectList(fol)
|
boolean
|
|||
|
||||
modelPanel(mp)
|
string
|
|||
|
||||
viewType(vt)
|
boolean
|
|||
|
フラグはコマンドの作成モードで表示できます | フラグはコマンドの編集モードで表示できます |
フラグはコマンドの照会モードで表示できます | フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。 |
import maya.cmds as cmds # Create a window with a model editor and some buttons that # change the editor's display of objects in the scene. # window = cmds.window('window') form = cmds.formLayout() editor = cmds.modelEditor() column = cmds.columnLayout('true') # Create some buttons that will alter the display appearance of # objects in the model editor, eg. wireframe vs. shaded mode. # cmds.button(label='Wireframe', command= "cmds.modelEditor(editor, edit=True, displayAppearance='wireframe')") cmds.button(label='Points', command= "cmds.modelEditor(editor, edit=True, displayAppearance='points')") cmds.button(label='Bounding Box', command= "cmds.modelEditor(editor, edit=True, displayAppearance='boundingBox')") cmds.button(label='Smooth Shaded', command= "cmds.modelEditor(editor, edit=True, displayAppearance='smoothShaded')") cmds.button(label='Flat Shaded', command= "cmds.modelEditor(editor, edit=True, displayAppearance='flatShaded')") # Set up the window layout attachments. # cmds.formLayout( form, edit=True, attachForm=[(column, 'top', 0), (column, 'left', 0), (editor, 'top', 0), (editor, 'bottom', 0), (editor, 'right', 0)], attachNone=[(column, 'bottom'), (column, 'right')], attachControl=(editor, 'left', 0, column)) # Create a camera for the editor. This particular camera will # have a close up perspective view of the centre of the ground plane. # camera= cmds.camera(centerOfInterest=2.450351, position = (1.535314, 1.135712, 1.535314), rotation = (-27.612504, 45, 0), worldUp = (-0.1290301, 0.3488592, -0.1290301)) # Attach the camera to the model editor. # cmds.modelEditor( editor, edit=True, camera=camera[0] ) # Put an object in the scene. # cmds.cone() cmds.showWindow( window ) # The following two examples assume a custom model editor command # defined via the MPxModelEditorCommand API class, named 'myEditor'. # # Create a custom editor, and use it as the model editor of Maya's # default modelPanel4 (the perspective view). # cmds.myEditor( modelPanel='modelPanel4' ) # Restore the default model editor. # cmds.modelEditor( modelPanel='modelPanel4' ) # # The following example shows usage of the render override flags # with model panel 'modelPanel4' # cmds.modelEditor( 'modelPanel4', q=True, rol=True ) # Query for non-UI names for any render overrides cmds.modelEditor( 'modelPanel4', q=True, rou=True ) # Query for UI names for any render overrides cmds.modelEditor( 'modelPanel4', q=True, rom=True ) # Query for any active override cmds.modelEditor( 'modelPanel4', e=True, rom='myOverride' ) # Set active override to 'myOverride' if it exists cmds.modelEditor( 'modelPanel4', e=True, rom='' ) # Clear out the active override cmds.modelEditor( 'modelPanel4', e=True, rnm='base_OpenGL_Renderer' ) # Set the renderer used for a 3d modeling viewport cmds.modelEditor( 'modelPanel4', q=True, rnm=True ) # Query for the renderer used for a 3d modeling viewport cmds.modelEditor( 'modelPanel4', q=True, rdn=True ) # Query for device name for current renderer.