This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Blender用のボーンに対するこまごました操作 | |
import bpy | |
D = bpy.data | |
# 選択ボーンの回転順を一括変更する | |
bones = bpy.context.selected_pose_bones | |
for bone in bones: | |
bone.rotation_mode = 'XZY' | |
# 全Driverをリフレッシュする | |
for oObj in bpy.data.objects: | |
if oObj.animation_data is not None: | |
for oDrv in oObj.animation_data.drivers: | |
oDrv.driver.expression += " " | |
oDrv.driver.expression = oDrv.driver.expression[:-1] | |
# print ('%s.%s is driven to %s' % (oObj.name, oDrv.data_path, oDrv.driver.expression) ) | |
# アニメーションにCyclesモディファイアを追加する | |
for act in D.actions: | |
for f in act.fcurves: | |
for m in f.modifiers: | |
if (m.type == 'CYCLES'): | |
f.modifiers.remove(m) | |
m = f.modifiers.new('CYCLES') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment