Aurora Part 1

  Рет қаралды 155

Kristian Howald

Жыл бұрын

Building the geo...
And here's the Python Script I created to offset any selected CVs and add a Pre and Post Infinity Cycle.
import maya.cmds as cmds
# Get the selected CVs
selected_cvs = cmds.ls(sl=True, fl=True)
if selected_cvs:
for i, cv in enumerate(selected_cvs):
# Calculate the offset for each CV
offset = i * 5
# Tokenize the CV to get curve and CV index
tokens = cv.split("cv[")
curve = tokens[0]
cv_index = tokens[1].split("]")[0]
# The control points attributes we want to animate
attrs = ['xValue', 'yValue', 'zValue']
for attr in attrs:
# Build the attribute name
attr_name = curve + "controlPoints[" + cv_index + "]." + attr
# Get the keys on the attribute
keys = cmds.keyframe(attr_name, query=True, timeChange=True)
if keys:
for key in keys:
# Move each keyframe by the offset amount
new_time = key + offset
cmds.cutKey(attr_name, time=(key, key))
cmds.pasteKey(attr_name, time=(new_time, new_time))
# Set pre and post infinity to cycle
cmds.setInfinity(attr_name, poi='cycle', pri='cycle')
else:
print("No CVs selected.")

Пікірлер
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 7 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,4 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 41 МЛН
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 7 МЛН