Batch Renamer

batch_rename_screenshot2

batch_rename_screenshot

[Download]

I’ve had this one for a while now, but it’s been a mess of slightly working code until recently – but now I like to think it’s unbreakable! (yes, that’s a challenge)

It’s a simple renaming tool meant for a bunch of similar objects. All it will do is rename them to something consistent with incrementing numbers (name_01, name_02, name_03…)

You have control over the starting number and the sorting of the objects, and that’s about all you need really. I have considered doing something more complicated with bones and left/right versions and whatever, but I seldom need such a thing anyway.

Here’s an explanation of each item in the interface:

separator

Get base-name: (first icon-button at the top left) Sets the base-name to that of the active object (stripping it of any numbering it already has)

Base-name: What to name the objects as (base_name_01, base_name_02….)

Rename: The big button to do the renaming

Advanced: Show all the options and controls

Separator: How to separate the base name and the numbers (name_01, name.01, name-01 or any separator of your choice, doesn’t have to be a single letter)

Padding: The number of digits in the numbering, adding trailing zeros to fill the space (name_01, name_001 or name_0001…) – Auto mode will figure out how many objects are selected and thus how much padding is needed. Manual mode will allow you to choose how much padding you want, but will increase it automatically if it’s not enough. None mode will not add any trailing zeroes.

Start Number: Begin naming the objects with number starting from here.

Continued Numbering: (ellipse icon just to the right of the start number) Increase the start number every time you rename objects such that you can carry on numbering from where you left off last. I suggest you use Manual padding for this one, since if the total number of objects renamed goes above the next level of padding (above 100 for example) then there will be inconsistent padding (name_05, name_89, name_134 – different amount of digits)

Sorting: How to sort the objects, by location, scale or dimensions. Dimensions is useful to use as a “visual” scale – think 1000 rocks of different sizes but all with 1.0 scaling.

Sorting Axis: In which direction to sort them – on one of the axes or on the average of them (‘All’)?

Reverse: Flip the order of the sorting, E.g: go right-to-left instead of left-to-right

separator

And that’s it!

Please rip it to shreds. Find any bugs, suggest any features. And if you feel like it, I’d appreciate a code-review too.

Progressive Animation Render Addon and Image Stacking

I remember when Cycles first came out, people loved the progressive rendering, where it shows you the whole image and gets clearer and clearer the longer you wait. But one of the first things people asked was “Can you render an animation progressively too?“. The answer was no. Until now that is.

I’ve created an addon that allows you to do exactly that.

proganim

(Download it!)

It’ll render each frame of the animation to its own folder (like path/to/render/frame_15/image.jpg), and then repeat the whole animation render again using a different seed, which means that there’ll be a different noise pattern. Then you can hit the Merge Seeds button and it’ll gather all the different images for each frame, average the pixel values and make a nice clean animation.

Continue Reading…

Node Wrangler!

Let your nodes arrange themselves!

(Download)

I challenged myself to some coding this past long-weekend. I have a nice big list of all the features I wish Blender had, and despite my recent addiction to python, are all way too hardcore for me to code myself… that is until now.

At work we use Maya mostly, so I often find a neat little feature that I wish Blender had and add it to my list. This time it was little button that arranged all your nodes for you, all nice and neat and linear. Surely something like this can’t be that hard to code, right? Well the more I thought about it, the more problems I found.

I checked out some weird and wonderful methods that other software uses, like Spring Force Directed Layouts where you basically simulate the nodes as if each connection was a spring to attract two nodes together, and all nodes that don’t connect, repel each other. After some simulation you get a pretty perfect node tree. Magic right?

The problem is that this technique is more for multi-directional graphs.

Graphs!

At least that was my excuse. Implementing physics algorithms is mostly beyond me for the time being.

So instead I did the logical approach. Fetch all the nodes that have no inputs (start nodes), and look at the nodes that connect to these. Put them to the right of the start nodes, then repeat for all nodes.

Node Wrangler UI

This ends up with one big long overlapping stream of nodes. So to separate them, I did another loop in all the nodes, if one overlaps another, move it down (by the dimensions of the node it collides with – thanks to lukas_t for adding this to the python API by my request!)

And after a couple more loops to make sure everything runs from left to right, it’s basically done.

Apart from this, I also added a button to delete all unused nodes and a tool to display the Backdrop image nicely fit in the window, but those were pretty tedious after the arranging thing.

So I suppose this means I should start tackling some more epic coding projects.

I work with nodes a heck of a lot, so if you’ve got an idea or request for an addon, let me know :) If you convince me that it’d be useful, I’ll do it for ya!