# 上半分 円柱no floor center = (0, 0, 0)
import bpy
center = (0, 0, 0)
radius_start = 0
radius_end = 600
num_frames = 600
# Create a new sphere object
bpy.ops.mesh.primitive_uv_sphere_add(location=center)
# オブジェクトに名前を付ける
bpy.context.object.name = "球000 大きくなる"
# Set the initial scale to zero
bpy.context.object.scale = (0, 0, 0)
# Animate the scale of the sphere from zero to the desired radius
for frame in range(num_frames):
# Calculate the scale factor for the current frame
scale_factor = radius_start + ((radius_end - radius_start) / num_frames) * frame
# Set the scale of the sphere for the current frame
bpy.context.object.scale = (scale_factor, scale_factor, scale_factor)
# Insert a keyframe for the scale of the sphere for the current frame
bpy.context.object.keyframe_insert(data_path="scale", frame=frame)
# Insert a final keyframe for the scale of the sphere at the end of the animation
bpy.context.object.scale = (radius_end, radius_end, radius_end)
bpy.context.object.keyframe_insert(data_path="scale", frame=num_frames)
bbb