I’ve been reading Code Breakers by Rudolf Kippenhahn. What hooked me into it was the part about the Wheel Cipher, a device envisioned by Thomas Jefferson in the late 1700’s. You can see Jefferson’s note about the wheel in his very own, genuinely awful handwriting here.
Continue reading “Processing: How to Code A Wheel Cipher Layout”
This is Bob. Bob is a gelatinous organism from outer space. He’s also a bit of a diva, so he requires that he be announced by text that drifts upwards in a graceful and organized fashion.
So that’s how I spent the first chunk of my long weekend—figuring out text objects in Blender. For the sliding script, just scroll to the bottom. For more description, keep reading below.
Continue reading “PYTHON: How to Get Sliding Text in Blender”
Sometimes I get embarrassingly excited about being able to do things in Python that I will probably never need to do again. This is one of those times.
I had a mesh—a plane that I had turned into an a spiral walk-way. And I had the thought, this thing can’t have walls. Eventually I want the walk-way to be the center of a large arena that’s coated in fog. And the only way you’d really be able to see that it’s a spiral is if it’s semi-transparent and lined in lights.
Continue reading “Python: How to Loop through Every Vertex in a Mesh”
A couple weeks back, I posted a confetti function that was wildly fun to play with, but frustrating because all the confetti was oriented in the same direction.
In the end, I started selecting the individual planes at random to rotate the manually, but well, let’s face it. There were over 200 planes. That was just stupid. Two new lines of Python. That’s all it took. I actually wasn’t even the Python that threw me in the first place—it was the rotation operator.
Continue reading “Python: How to Randomize Rotation in Blender”
There are times when I feel the need to take a step back and re-evaluate all my life decisions. Those moments tend to be preceded by questions like how the crap did I end up in this field of kudzu, and where the hell did that snake go? Or how hard could it be to script random materials in Blender with Python—an hour tops?
That last one led me to three days of HELL. This was, by far, the most difficult Blender script I’ve tackled because the API doesn’t have much on how to create materials.
Continue reading “PYTHON: How to Code Materials in Blender Cycles”
This week is not a Python breakdown week. It’s just the code because my brain is still recovering from Scheme tutorials. And I really wanted to make a functional (or semi-functional) batch UV layout exporter. The script below does a blanket Smart UV Project for all selected objects and stashes the resultant UV layouts into a specified folder.
Continue reading “Python: How to Export All the UV Layouts in Blender”
Today is less of a how-to day. It’s more of a blind hate rant day because everyone needs those on occasion.
Continue reading “PYTHON: How to Code Circles with the Math Module”
Last week, I wrote a script to pull objects in Blender into the shape of an H and I. But after running it with a couple different sets of objects, the text seemed a bit bland. After everything finds a place, it just sits there. I’d like it to twirl around a little. So I wrote it into a function—dance().
Continue reading “Python: How to Write a dance() Function in Blender”
I’ve been plowing through Automate the Boring Stuff with Python by Al Sweigart. Since I generally skip over chapters with scary names or giant blocks of text, the bit about nested dictionaries and lists went blazing right over my head. But when I wanted to start shaping objects in Blender into letters (as pictured above), I went right back to it because they’re actually quite useful.
Continue reading “Python: What are Nested Lists?”
So you want to get a text file with the coordinates of all the objects in a Blender scene? Luckily, Python has some wonderful built-in functions that can do exactly that.
Continue reading “Python: How to Put Blender Data into a Text File”