![見出し画像](https://assets.st-note.com/production/uploads/images/101288464/rectangle_large_type_2_c3093237456936cb96efdbedefefa54c.png?width=1200)
blenderでHello World!
import bpy
# テキストオブジェクトを作成
bpy.ops.object.text_add(location=(0, 0, 0))
text_object = bpy.context.object
# テキストオブジェクトのテキストデータを取得
text_data = text_object.data
# テキストオブジェクトのテキストを設定
text_data.body = "Hello World!"
# テキストオブジェクトを選択状態にする
bpy.context.view_layer.objects.active = text_object
# 3Dビューポートを更新
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
この記事が気に入ったらサポートをしてみませんか?