Hello Utopia780,
Blender stores the coordinates of the render border (which you can add with shift-b) in the properties scene.render.border_max_x, scene.render.border_min_x, … .
The good thing about this is you can access them very easily but unfortunately you cannot add animation curves to them.
I wrote a little script which offers a way around this. It is just for animating the border coordinates, so the user has to set the border first.
import bpy
from bpy.props import FloatProperty, PointerProperty, BoolProperty
def change_border(scn):
rnd = scn.render
anim = scn.anim_border
if scn.anim_border.use_anim_border:
rnd.border_min_x = anim.min_x
rnd.border_max_x = anim.max_x
rnd.border_min_y = anim.min_y
rnd.border_max_y = anim.max_y
class AnimBorderProps(bpy.types.PropertyGroup):
use_anim_border = BoolProperty(
default=False)
min_x = FloatProperty(
name="Min X",
min=0, max=1, default=0)
max_x = FloatProperty(
name="Max X",
min=0, max=1, default=1)
min_y = FloatProperty(
name="Min Y",
min=0, max=1, default=0)
max_y = FloatProperty(
name="Max Y",
min=0, max=1, default=1)
class AnimBorderKeyframe(bpy.types.Operator):
bl_idname = "scene.set_border_keyframe"
bl_label = "Set Border Keyframe"
@classmethod
def poll(cls, context):
return context.scene.anim_border and context.scene.render.use_border
def execute(self, context):
scn = context.scene
rnd = scn.render
anim = scn.anim_border
anim.min_x = rnd.border_min_x
anim.max_x = rnd.border_max_x
anim.min_y = rnd.border_min_y
anim.max_y = rnd.border_max_y
scn.keyframe_insert(data_path="anim_border.min_x")
scn.keyframe_insert(data_path="anim_border.max_x")
scn.keyframe_insert(data_path="anim_border.min_y")
scn.keyframe_insert(data_path="anim_border.max_y")
return {'FINISHED'}
class AnimBorderPanel(bpy.types.Panel):
bl_label = "Animated Border"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "render"
def draw_header(self, context):
self.layout.prop(context.scene.anim_border, "use_anim_border", text="")
def draw(self, context):
layout = self.layout
rnd = context.scene.render
anim = context.scene.anim_border
row = layout.row()
row.prop(rnd, "use_border")
sub = layout.column(align=True)
sub.scale_y = 2
sub.active = rnd.use_border and anim.use_anim_border
# top row
row = sub.row(align=True)
row.label(text="") # empty
row.prop(anim, "max_y")
row.label(text="") # empty
# middle row with operator
row = sub.row(align=True)
row.prop(anim, "min_x")
row.operator("scene.set_border_keyframe")
row.prop(anim, "max_x")
# bottom row
row = sub.row(align=True)
row.label(text="")
row.prop(anim, "min_y")
row.label(text="")
def register():
bpy.utils.register_module(__name__)
bpy.types.Scene.anim_border = PointerProperty(type=AnimBorderProps)
# change the border before render and if frame changes
bpy.app.handlers.render_pre.append(change_border)
bpy.app.handlers.frame_change_pre.append(change_border)
def unregister():
bpy.utils.unregister_module(__name__)
del bpy.types.Scene.anim_border
bpy.app.handlers.render_pre.remove(change_border)
bpy.app.handlers.frame_change_pre.remove(change_border)
if __name__ == "__main__":
register()
You have to copy the text and paste it in blenders text editor. Then press the little button labeled “Run Script” (or alt-p).
It adds a new panel to the render tab:

You can now animate the border coordinates individually but for convenience there is an operator (“Set Border Keyframe”, in the middle of the panel) which will set a keyframe for all 4 coordinates. Animating the border works now like this:
- Activate the animated border with the check-box in the header.
- Go to camera view
- Draw with shift-b a border
- Press “Set Border Keyframe”
→ the properties around the button will turn yellow
- Change the frame, draw a new border and press “Set Border Keyframes” again
If you hit alt-a the border should start moving to the positions you have set.
Note that blenders animation replay may be slower.