Blender PythonAPI スクリプト集

この記事を作った動機 Blender には、Python APIがあり、スクリプトを自由に書いて実行でき、いろいろ操作できるというのがある。しかし、なんかドキュメント見たりいちいち調べると、なんか同じことばっかり調べたりしていて、そうこうしているうちに、めんどくさくなって使う気がなくなっていくということがあった。 そこで、自分で記録しておきたいと思ったことをここに適当にぶちまけようという発想をしてみた。特定の操作をするために小さなスクリプトについて、だらだら記録をここにためたいと思う。 ちょっとしたスクリプトリスト Lightという名前の光源の明るさを変更したい for a in [target for target in bpy.data.objects.keys() if "Light" in target]: bpy.data.objects[a].data.energy = 20 参考にしたサイトとか API Reference Usage - Blender Python API https://docs.blender.org/api/current/info_api_reference.html (2025年10月28日) How do I select specific elements from an array in python? - Stack Overflow https://stackoverflow.com/questions/66497607/how-do-i-select-specific-elements-from-an-array-in-python (2025年10月28日) python - what is the quickest way to iterate through a numpy array - Stack Overflow https://stackoverflow.com/questions/40593444/what-is-the-quickest-way-to-iterate-through-a-numpy-array (2025年10月28日)

October 28, 2025