# 上半分 円柱 上 center = (30, 0, 30)
import bpy
center = (30, 0, 30)
radius_start = 0
radius_end = 60
num_frames = 600
# Create a new sphere object
bpy.ops.mesh.primitive_uv_sphere_add(location=center)
# オブジェクトに名前を付ける
bpy.context.object.name = "球30 大きくなる"
# 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)
# aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# 上半分 円柱no 真ん中 center = (30, 0, 15)
import bpy
center = (30, 0, 15)
radius_start = 0
radius_end = 60
num_frames = 600
# Create a new sphere object
bpy.ops.mesh.primitive_uv_sphere_add(location=center)
# オブジェクトに名前を付ける
bpy.context.object.name = "球15 大きくなる"
# 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)
# aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# 上半分 円柱no floor center = (30, 0, 0)
import bpy
center = (30, 0, 0)
radius_start = 0
radius_end = 60
num_frames = 600
# Create a new sphere object
bpy.ops.mesh.primitive_uv_sphere_add(location=center)
# オブジェクトに名前を付ける
bpy.context.object.name = "球00 大きくなる"
# 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