Integrating up through commit 90f050496

This commit is contained in:
alexpete
2021-04-07 14:03:29 -07:00
parent 8f2ed080a9
commit c2cbd430fe
2694 changed files with 285622 additions and 176874 deletions
@@ -0,0 +1,83 @@
# coding:utf-8
#!/usr/bin/python
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# -- This line is 75 characters -------------------------------------------
# send each line to maya with > send_py_cmd_to_maya
print('Hello World: Command received from WingIDE')
import maya.cmds as cmds
foo = cmds.polySphere(n='DemoSphere', radius=1.0)
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
# more complex example
import maya.cmds as cmds
import random
import time
name = 'DemoCube'
size = random.uniform(0.5, 2.0)
variation = random.uniform(1.5, 5.0)
amount = random.randint(9, 21)
# remove previous
obj_list = cmds.ls('{}*'.format(name))
if len(obj_list) > 0:
cmds.delete(obj_list)
for i in range(0, amount - 1):
depth_rand = random.uniform(size, size * variation)
tegel = cmds.polyCube(name='{}#'.format(name),
w=size, h=size, d=depth_rand)
cmds.move(size * i, 0, 5)
i += 1
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
import maya.cmds as cmds
import random
import time
name = 'DemoCube'
size = random.uniform(0.5, 2.0)
variation = random.uniform(1.5, 5.0)
amount = random.randint(9, 21)
def make_some_wonky_cubes(name=, size, variation, amount):
# remove previous
obj_list = cmds.ls('{}*'.format(name))
if len(obj_list) > 0:
cmds.delete(obj_list)
for i in range(0, amount - 1):
depth_rand = random.uniform(size, size * variation)
tegel = cmds.polyCube(name='{}#'.format(name),
w=size, h=size, d=depth_rand)
cmds.move(size * i, 0, 5)
i += 1
return
foo = make_some_wonky_cubes()
time.sleep(10)
foo = make_some_wonky_cubes()
while 1:
foo = make_some_wonky_cubes()
time.sleep(5)
foo = make_some_wonky_cubes(size=0.5, amount=20)
time.sleep(5)
break