| Code: |
|
import bpy verts = (4, 2, 0), (4, -2, 0), (-4, -2, 0), (-4, 2, 0), (4, 2, 4), (4, -2, 4), (-4, -2, 4), (-4, 2, 4), (4, 0, 6), (-4, 0, 6) faces = (0, 1, 2, 3), (8, 9, 6, 5), (0, 4, 8, 5, 1), (1, 5, 6, 2), (2, 6, 9, 7, 3), (4, 0, 3, 7), (4, 7, 9, 8) me = bpy.data.meshes.new("Simple House") me.from_pydata(verts, [], faces) me.validate() me.update() ob = bpy.data.objects.new("Simple House", me) bpy.context.scene.objects.link(ob) bpy.context.scene.update() |
| CoDEmanX wrote: | ||
Here's a simple example:
|
| CoDEmanX wrote: | ||
Here's a simple example:
|
| CoDEmanX wrote: |
| start blender
change to Scripting view click + New button in text editor paste the script hit Alt + P or the Run Script button |
| CoDEmanX wrote: |
| can't help you, works fine here and you didn't post the error
run blender from terminal / command line or toggle console (windows only) inside of blender (Window > Toggle system console) and post the problem |
| CoDEmanX wrote: |
| it works fine here in blender 2.64, your version is 2.62 so you should update to latest stable release |