Blender Python nulls along a curve

I’ve been trying  to learn python in blender and here’s my first go at scripting something:

To use:

1.make a nurbs curve

2.make 5 nulls/empties

3.select all empties

4.run script


import bpy

selected = bpy.context.selected_objects

count = 0
total = 4
offset = 0.0

for obj in selected:
offset = count/total
bpy.context.scene.objects.active = obj
bpy.ops.object.constraint_add(type='FOLLOW_PATH')
bpy.context.object.constraints["Follow Path"].target = bpy.data.objects["NurbsPath"]
bpy.context.object.constraints["Follow Path"].use_fixed_location = True
bpy.ops.object.location_clear()
bpy.context.object.constraints["Follow Path"].offset_factor = offset
count += 1

curveRigging_01

eyelidSetup

Hoping to make it more generic and dynamic and as a operator.

I tried getting the list.count for the total but it wasn’t returning a decimal number :S so need to find out how to get the count of a selection. list.count()

Also want to make it so that the last object selected is the curve, at the moment it just looks for a curve called NurbsCurve, LAME.

I think it’s a good start for learning python and it’s loads of fun, I’m looking forward to rigging more things with curves.

BB Game Prototype

The BB prototype is my attempt at making a pvp game. Idea stemmed from my enjoyment had in the WoW level 19 arenas. Character Design was highly influenced by characters on newgrounds.

Modeled/unwrapped/rough painting in Blender, rigged in Maya

Check out the details on the BB Page and let me know if you got ideas on how to improve the controls, they very hard :S, a common thread running through my prototypes, need to study some game inputs, need to find me some old games 🙂

Here some pictures:

Joint Based Mouth Rigging

Really wanted to know how to get fine controls, and this is what I have so far with a joint driven system. Seems Fun to animated and I think overall suits my animation style. I like controls in space, feels more like interactive sculpting of a pose rather than the sliding of an attribute off somewhere else.

So here’s the setup and a video showing the results, I was going to make a video tutorial, but seemed easy enough to understand from the diagram.

Rex – Cartoon Dragon Rigging pt_3

Face Rigged!

Quite happy with the shapes I can get with all the blends, I used the blendTaper script (thanks to Mark Behm, Jason Osipa and Harry Michalakeas) to divide a base shape into left and right sides saved many hours!. I still need to tweak their weights so they play nicely with each other, but overall I’m quite happy. Realised I haven’t modelled a tongue for the little fella, but that will come soon when he goes to the dentist to get some pearly whites. Need to tweak weights and maybe even revisit and revise the leg setups, they not the best, also could be due to edge loop problems.

I didn’t manage to figure out the how fine controls ride ontop of blendshapes but that is an ongoing process and hope to implement that into the rig when I do find out how to do it.

I’ll be posting a video on his range of motion soon…