2022-10-21から1日間の記事一覧
で、できるみたい。 そのうち試すかもしれないので、メモ https://www.kabuku.co.jp/developers/blender2minecraft-by-python https://blender.stackexchange.com/questions/253355/collision-detection
import bpy import copy import math import bmesh import sys from mathutils import Vector def main(): #全object削除 remove_all_obj() bpy.ops.mesh.primitive_cube_add() bpy.ops.mesh.primitive_cube_add(location = (1,1,1)) boolean("Cube") def bo…
import bpy import copy import math import bmesh import sys from mathutils import Vector def main(): #全object削除 remove_all_obj() #球追加 new_obj = add_sphere() # mirror適用 set_mirror_modifier( new_obj.name ) def set_mirror_modifier( obj…
import bpy import copy import math import bmesh import sys from mathutils import Vector def main(): select_end_edge( "Cube" ) # 縁の辺を選択 def select_end_edge( obj_name ) -> bool: # 一旦、全てを選択解除 for ob in bpy.context.scene.object…
import bpy import copy import math import bmesh import sys from mathutils import Vector def main(): touchup_mesh_object( "Cube" ) def touchup_mesh_object( obj_name ): for ob in bpy.context.scene.objects: # 一旦、全選択を解除 ob.select_set(…
詳細は、script内のcommentの通り 以下のurlも参考になります BlenderをPythonで操作する - Qiita Blender PythonのMeshデータアクセスのチートシート - Qiita Blender bpy でvertexとfaceとedgeを追加 | ぬの部屋(仮) import bpy import copy import math…
import bpy import copy import math import bmesh import sys from mathutils import Vector def main(): #全object削除 remove_all_obj() #cube 追加 new_obj_1 = add_cube_1() new_obj_2 = add_cube_2() # objectの原点位置を変更 (object自体は移動しま…
import bpy import math import bmesh import sys from mathutils import Vector def main(): #全object削除 remove_all_obj() #cube 追加 add_cube_1() add_cube_2() def add_cube_1(): bpy.ops.mesh.primitive_cube_add( size=1.0, align='WORLD', locatio…