Featured post

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...

May 13, 2016

The coordinates of Curve Control Points

See the docs for Curve Objects:
blender_python_api_current/bpy.types.Curve.html

Diego asks

HI... welcome back! :P sorry.. "fast" question... some ref in order to get the coordinates form curve control points???? thanks for any advice :D


take for example this Curve Object, which consists of three sub curve, 1 of which is a closed curve. Run this with the Curve Object in Object mode.


April 19, 2016

Getting Index (indices) of selected faces / polygons

One Way

# assuming the object is currently in Edit Mode.
import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

for f in bm.faces:
    if f.select:
        print(f.index)

# Show the updates in the viewport
# and recalculate n-gon tessellation.
bmesh.update_edit_mesh(me, True)


Another Way

import bpy
import bmesh
from bmesh.types import BMFace

obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

for geom in bm.select_history:
    if isinstance(geom, BMFace):
        print(geom.index)

bmesh.update_edit_mesh(me, True)

Further Reading

I encourage you to know what the documentation says. blender.org/api/blender_python_api_current/bmesh.html?

April 15, 2016

Sverchok / Scripted node | 3d LSystem


..not novel

I haven't written anything on here for a while, this is the first opportunity since quite some time. It won't be in-depth. The following post assumes you've experimented with LSystems before.

Scripted Node MKI can read rules, (text files, one called RULES in the example) as well as the scripts that drive it's own internal node workings (called 3dlsystem.py).


The code for these things is available from github.

So what can it make?

Tragically I've not had much time to play with it, i'm hoping others might find it useful. As proof that It does work i'll include a few Rule sets.
with t_angle set to 0.02 it looks like grass in the wind..

Send me in your Rules files and i'll add them to this post.

November 12, 2015

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/

As of 10/11 november 2015 we can now link to the current api docs and not be worried about having to update old links. The following will always link to the latest docs.


http://www.blender.org/api/blender_python_api_current/

http://www.blender.org/api/blender_python_api_current/search.html?q=bmesh

http://www.blender.org/api/blender_python_api_current/mathutils.geometry.html


This means we don't have to specify the version anymore. If you really must link to older docs that's still possible. Mostly you probably don't care.

Thanks Ideasman42 and Kaito!

September 02, 2015

keyframing shape keys

This is totally a note to self :)

June 14, 2015

Blender Pie Menu with Custom Icons

Easy enough:

- make a directory for your addon
- put an icons folder in it
- fill the operator_behaviours list with the names of your icons (minus their filetype)
will look something like this:

June 03, 2015

Custom Pie Menus. easy.

couldn't be any simpler, this includes how to use icons in the EnumProperty - this can reduce the verbosity