0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Maya | 複数のobjファイルをインポートする

Last updated at Posted at 2019-07-16

スクリプトを実行すると、ファイル選択ダイアログが表示されます。
インポートしたいobjを複数選択して、一度にインポートできます。

import maya.cmds as cmds

files = cmds.fileDialog2(dialogStyle=1, fileMode=4, fileFilter='*.obj', caption='OBJファイル選択')
if files:
    for f in files:
        cmds.file(
            f,
            i=True,
            type="OBJ",
            ignoreVersion=True,
            renameAll=True,
            mergeNamespacesOnClash=False,
            namespace="c1",
            options="mo=1;lo=0",
            preserveReferences=True,
            importFrameRate=True,
            importTimeRange="override")
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?