Python for Blender: Scripting a Video Grid

preview_player
Показать описание

In this video we will be creating a script that creates a grid of videos.

Start Code:

Complete Code:

Cube Loops script:

Blender Python Scripting: Wireframe Cube Loop:

00:00 - Intro
00:23 - Generate Videos
02:10 - Get the code
03:50 - Get paths to videos
06:33 - Import videos as planes
07:30 - Assign X coordinate to the planes
08:50 - Assign Y coordinate to the planes
10:35 - Get video dimensions
12:15 - Tweak shader
13:42 - Shuffle videos
14:09 - Use your videos
14:21 - Outro

Intro Music
Fiery Trails - Silent Partner

Outro Music
Geographer - Easy Shake

#blender #python #scripting
Рекомендации по теме
Комментарии
Автор

Nice one! Really am enjoying your videos.

BrettKromkamp
Автор

Found your channel recently thanks to @CurtisHolt. I've enjoyed following this tutorial and look forward to following more. I just happened to require a procedural solution for creating video sprite sheets that I can use as source video for display on real-time models in the planetarium. (I'm sure there are other ways to do it, but I'm thrilled to learn some python-y goodness along the way) I'll be sure to link to this tutorial when I share my results with colleagues.

waylenamccully
Автор

This is always a pleasure to follow your tutos ( didactic and pedagogic)

But this time I have a problem

It seams to be problematic with blender versions above 3.4 to 4.0
then we have this error message when trying to run the script

File "\Text", line 253, in get_grid_step
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\scripts\modules\bpy\ops.py", line 113, in __call__
ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: error converting a member of a collection from a dicts into an RNA collection, failed with: TypeError: Converting a Python list to an RNA collection: keyword "type" missing

jean-lucdelbecq
Автор

I've found the solution

You must add to empty parameters "type" and "content"
the new line is

bpy.ops.import_image.to_plane(files=[{"name":mp4_path, "type":"", "content":"", "name":mp4_path}],

jean-lucdelbecq
join shbcf.ru