miMayaPlugins/duplicateOverSurface
2024-10-01 19:59:07 +08:00
..
duplicateOverSurface.py Initial commit 2024-10-01 19:59:07 +08:00
README.md Initial commit 2024-10-01 19:59:07 +08:00

DuplicateOverSurface

Duplicate object over surface based on mouse clicks.

Install

Copy duplicateOverSurface.py to you plug-ins directory.

Flags

Longname Shortname Argument types Default Properties
rotation r bool True C

keep rotation if True. Default is True.

  • r=True

  • r=False

Modifiers

Scale : Shift + drag to left/right

Rotate : Ctrl + drag

Snap to vertices : Ctrl + Shift

Caution

UVs

Target object must have UVs. If object has no UVs or bad UVs, the command will fail to execute or snap object will have unintentional deformation.
スナップ対象のオブジェクトにUVが無いか、または不正なUVの場合、コマンドの実行に失敗もしくは複製オブジェクトが意図しない不必要な変形をします。

Surface normal

  • Target normal soften
  • Target normal harden

Python examples

from maya import cmds
# Duplicate pCube1 over surface.
cmds.duplicateOverSurface("pCube1")

# Duplicate selected object over surface.
cmds.duplicateOverSurface(cmds.ls(sl=True, long=True)[0])

# Duplicate selected object over surface but keep original rotations.
cmds.duplicateOverSurface(cmds.ls(sl=True, long=True)[0], rotation=False)