Category Archives: Python

Python: How to Automate Word Docs

Header

Every time I start thinking that my job is bad, I try to remind myself that Stanley Kubrick had a secretary. The guy was notorious for driving actors into the ground. Making them do takes over and over and over. Can you imagine having to handle his administrative work?

If IMDB’s trivia page is to be believed, that poor soul had to spend weeks typing out the infamous ‘All work and no play makes Jack a dull boy’ novel from hell. On the off-chance I ever find myself similarly working for a maniac, I’m attempting to master the Python docx module, and I’ve been pleasantly surprised with how far you can get with just the basics.

Continue reading

Tagged , , , , , , , , , , ,

Python: How to Install 3rd Party Modules without the Command Prompt

Header

FINALLY. After weeks of errors and several bottles of wine, I managed to load a 3rd party module to get some more Python going.

Continue reading

Tagged , , , , , , ,

Python Update: How to Animate Text in Blender

WhereIsMyMind

I’m generally opposed to functions that overload on parameters. But seeing as how Blender functions do it all the time, I figured I’d go nuts for this updated text animation function.

Continue reading

Tagged , , , , , , ,

PYTHON: How to Get Sliding Text in Blender

This is Bob.

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

Tagged , , , , , , , ,

Python: How to Loop through Every Vertex in a Mesh

The Spiral

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

Tagged , , , , , , , ,

Python: How to Randomize Rotation in Blender

The Confetti Function

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

Tagged , , , , , , , ,

Python: How to List Polygon Intersections in QGIS

Header

You know what I love about programming? Once you know a little bit, you can Frankenstein your way out of a lot of problems.

Recently, I wanted to have a way to check two shapefiles in QGIS to see if their features overlap. I know what you’re thinking—there’s an intersect tool for that. But it just creates a new layer of the intersected areas. I wanted a list of which specific features were intersecting which other specific features in two separate layers.

Continue reading

Tagged , , , , , , , ,