본문 바로가기
College Study/Maya (KR,ENG)

[Maya] 파이썬으로 모델링하기 (크기, 회전, 색) Modeling with Python (Scale, Rotate, Color)

by 2den 2020. 11. 7.
728x90

2019. 3. 11. 21:56

 

 

 

import pymel.core as pm

myCubes = []

for n in range (1000):
    myCubes.append(pm.polyCube())

count = 0
for x in range (10):
    for y in range (10):
        for z in range (10):
            pm.select(myCubes[count])
            pm.move(x, y, z)
            pm.scale(x/10.0, y/10.0, z/10.0)
            pm.rotate(x*10.0, y*10.0, z*10.0)
            pm.polyColorPerVertex(colorRGB=[1-x/10.0, 1-y/10.0, 1-z/10.0], colorDisplayOption=True)
            count = count +1

 

이 코드를 짤 때까지만 해도, 파이멜과 cmds의 차이가 무엇인지 정확하게 알지 못했다.

Until this point, the difference between pymel and cmds was not clear to me.

728x90

댓글