我是一個絕對的新手,但有一種感覺,對於知道python的人來說這是一件容易的事情。在當前選擇範圍內選擇一個隨機範圍的曲線
基本上我選擇了一組nurbs曲線,我想要做的是隨機選擇一個指定的範圍。例如,從100條曲線的列表中,或者基本上我選擇的任何一條曲線,給我一個隨機的隨機50回。希望我明確表達了這一點。
到目前爲止我設法得到的所有內容都是在我的選擇中打印一條隨機曲線。
import maya.cmds as m
import random
sel = m.ls(sl=True)
from random import choice
print choice(sel)
你應該修改你的崗位上正確顯示的代碼 – yemu