Wednesday, 3 June 2015

Blender Quick Reference

I have used Blender a lot for 3D models for games but my use has long periods away doing coding or other projects.

That means whenever I return to 3D modelling I have to remember how to use Blender again. Typically Blender has progressed a version or two as it is very actively being developed. It always takes me a while to get back up to speed.

I hunted round for quick start guides and keyboard shortcuts but none quite had what I needed.

What I wanted was the common features used to make most models to get me up to speed as quickly as possible. I don't need every feature because I can look up the rarely used ones as needed. Therefore, in my usual way, I have created a desktop quick reference guide that has the features I need to remember each time.




This will continue to be a work in progress. I will add more reminders as and when I know what I need to use.

Downloads

I've made a couple of versions available for download:

PDF to print or view
Source PowerPoint to edit to make your own changes

3D Printing

If you are interested in 3D printing see my other blog.

==

Last Updated - 3 March 2016

Cross post on my other blog

Blender Set Origin Script

I have not done much work on my game recently but to do so I need to get round to creating the levels and I'm back to using Blender again.

When I started to tidy up one of my models I came across an odd feature in Blender. You can only set the origin on the active object.

My main reason for setting an origin is to get all of the origins of all of the objects in a scene at the zero point. I find it easier to import in to other programmes and line them up if they all have the same centre.


Using the built in button, it is frustrating having to select one object at a time to set all the origins. I decided to create a script to do this for me.

Not as easy as I expected because even in code the set origin only works on the active object.


I just typed the lines in to the console to run it. After the last line press return one extra time to run it.



for item in bpy.context.scene.objects: 
 if item.type == 'MESH': 
  item.select = True 
  bpy.context.scene.objects.active = item 
  bpy.ops.object.origin_set(type='ORIGIN_CURSOR') 
  item.select = False



The above worked in version 2.74 of Blender. It goes through ALL objects in the scene which is what I wanted.



for item in bpy.context.selected_objects:
 if item.type == 'MESH': 
  bpy.context.scene.objects.active = item 
  bpy.ops.object.origin_set(type='ORIGIN_CURSOR') 



In theory the above should work for the currently selected objects but I have not tested that script.



I came across another oversight when trying to copy that code to save it. To get the Windows Ctrl-C (copy) and Ctrl-V (paste) to work in the console window you first have to click on the console menu item at least once. After that Ctrl-C and Ctrl-V work as expected.