Looking For Easy Example Script to Get Started Programming BPY

I have been familiar with blender over the years, and I recently picked up python, so I would like to try my hand at building (or study if one exists already) a bpy script to batch process video files into mp3’s and/or sequences.

It seems a pretty simple request, and it may be such scripts already exist. If so, then please let me know. But, since the idea is to learn how to make such scripts, then I would then probably want to retrofit the existing code to include stuff like effects or something.

In any case, can someone give me a point in the right direction? :slight_smile:

the easiest and most widely used example scripts are the ones that ship with Blender. Open up the script editor and click on Templates->Python for a bunch of examples.

Hey !

It may not be the easiest thing to get started, I recommend you to start something without purpose just to get an idea of how python and python in blender works, by toying with random stuff then you may get inspired by something easy.

You can look at some templates shipped with blender in the text editor. It’s a great way to learn how python in blender works, but maybe not python in general.
Also all the UI part is a bit tricky to grasp, at first you may skip that and things will be much simpler.

This one is a bit old but covers different concepts and is a quick introduction : https://urchn.org/post/python_mesh_tutorial

Maybe other will have better ideas, it’s a bit short to get started.

Once you will be at ease with python, working with the sequencer is similar to adding/manipulating objects to the scene.

The documentation. Also, there’s not such thing as ‘Programming BPY’. Bpy is a Python ‘module’ used to interact with Blender. I would suggest improving your knowledge of Python if that wasn’t just poor phrasing.

Blender is not an appropriate tool for such a task. Instead, it’d be better to use ffmpeg. You could use Python’s subprocess module to interact with the commandline binary or use one of the Python binding modules people have written for it.

Will definitely check out some of the scripting templates.

Awhile back I (like 8 years ago) I knew a guy on here named FunkyWorm. He made a script for me that auto was sort of like a macro used to auto align a camera to a given perspective on an object. Everything is so different on blenderartists and in Blender itself. I would love to have that script, but I dont know if he is still around, and I can’t find the script. :frowning:

Anyway, maybe if I can make some simple macros. I know python pretty well. Just gotta get used to bpy, finding my object and method info in the interface, and so on. The commands are there, I know. It just seems to be a question of where to find them.

Dear Ben,

Let me explain something.

I’m not a bot. I am a human being, and I decidedly speak like one.

I came here hoping to learn something, not be criticized for the way I speak, as if I were a soulless droid - nor did I come here to compete over correct grammar or technology.

So as for my poor phrasing, which you obviously have a problem with, please know I’ll do you the favor of not returning here again, simply because of people (like yourself) with poor attitudes toward human causes. You spend too much time talking to robots. You’ve lost your humanity, if you ever even had the chance to experience what it is like to talk to a human.

To the others on the list, I thank you for your help on my question here; I also apologize for cutting things off, but I’d rather stand on the side of human error than someone who thinks like a speed cam.

It’s an important point. Don’t lose your soul to a machine.

Thank you all anyway. I’d rather figure it out on my own.

No, the statement implied a misunderstanding of a fundamental Python concept and, not knowing anything about you or your abilities, it was appropriate to suggest improving knowledge of Python prior to exploring the bpy module. I don’t personally care about your use of language beyond wanting to provide appropriate advice for your situation.

I’m taking a moment of my day to offer guidance and alternative avenues to explore to meet your goals and you think it appropriate to respond by suggesting I’m inhumane for questioning the meaning of a phrase for the sake of clarity?