らんだむな記憶

blogというものを体験してみようか!的なー

Blender with python(2)

>>> print(cube)
<bpy_struct, Object("Cube")>

>>> print(dir(cube))
['__doc__', '__module__', '__slots__', 'active_material', 'active_material_index', 'active_shape_key', 'active_shape_key_index', 'animation_data', 'animation_data_clear', 'animation_data_create', 'animation_visualization', 'bl_rna', 'bound_box', 'children', 'closest_point_on_mesh', 'collision', 'color', 'constraints', 'convert_space', 'copy', 'cycles', 'cycles_visibility', 'data', 'delta_location', 'delta_rotation_euler', 'delta_rotation_quaternion', 'delta_scale', 'dimensions', 'draw_bounds_type', 'draw_type', 'dupli_faces_scale', 'dupli_frames_end', 'dupli_frames_off', 'dupli_frames_on', 'dupli_frames_start', 'dupli_group', 'dupli_list', 'dupli_list_clear', 'dupli_list_create', 'dupli_type', 'empty_draw_size', 'empty_draw_type', 'empty_image_offset', 'field', 'find_armature', 'game', 'grease_pencil', 'hide', 'hide_render', 'hide_select', 'image_user', 'is_deform_modified', 'is_duplicator', 'is_library_indirect', 'is_modified', 'is_updated', 'is_updated_data', 'is_visible', 'layers', 'layers_local_view', 'library', 'location', 'lock_location', 'lock_rotation', 'lock_rotation_w', 'lock_rotations_4d', 'lock_scale', 'lod_levels', 'material_slots', 'matrix_basis', 'matrix_local', 'matrix_parent_inverse', 'matrix_world', 'mode', 'modifiers', 'motion_path', 'name', 'parent', 'parent_bone', 'parent_type', 'parent_vertices', 'particle_systems', 'pass_index', 'pose', 'pose_library', 'proxy', 'proxy_group', 'ray_cast', 'rigid_body', 'rigid_body_constraint', 'rna_type', 'rotation_axis_angle', 'rotation_euler', 'rotation_mode', 'rotation_quaternion', 'scale', 'select', 'shape_key_add', 'show_all_edges', 'show_axis', 'show_bounds', 'show_name', 'show_only_shape_key', 'show_texture_space', 'show_transparent', 'show_wire', 'show_x_ray', 'slow_parent_offset', 'soft_body', 'tag', 'to_mesh', 'track_axis', 'type', 'up_axis', 'update_from_editmode', 'update_tag', 'use_dupli_faces_scale', 'use_dupli_frames_speed', 'use_dupli_vertices_rotation', 'use_dynamic_topology_sculpting', 'use_extra_recalc_data', 'use_extra_recalc_object', 'use_fake_user', 'use_shape_key_edit_mode', 'use_slow_parent', 'user_clear', 'users', 'users_group', 'users_scene', 'vertex_groups']

もぅマヂ無理。。。

python - Quickly add cubes - Blender Stack Exchangeとか見よ。

for c in range(5):
    x = c*2
    y = c*2
    z = c*2
    bpy.ops.mesh.primitive_cube_add(location=(x,y,z))

おゎー、沢山のブロックが出来た!
ブロックのサイズ指定が分からん...。てか、Blenderの使い方が分からん...orz