2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Blender:キーフレーム登録(Material)

Last updated at Posted at 2019-05-13

はじめに

Materialのキーフレーム登録の方法を調べても乗ってなかったので備忘録的に。
(Python歴2ヶ月ないぐらい)

本文

最初から。このへんは色んなとこに乗ってた
Material生成→カラーセットまで

main.py
    mat = bpy.data.materials.new('Mat')
    obj.data.materials.append(mat) #add the material to the object
    bpy.context.object.active_material.diffuse_color = (0, 0, 0.5) #change color

なんかいい感じにキーフレーム登録させる。

main.py
    bpy.context.object.active_material.keyframe_insert(data_path='diffuse_color')

できる。
今回の場合はディフューズを登録してる。
他のやつでやりたい場合は、data_path='diffuse_color'の部分を変える。

data_pathは
image.png
これでコピれる。

おわり

備忘録的なそれなので頑張って読んで。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?