Search found 7 matches

by Mr.Yeah
Wed Jan 02, 2013 10:47 pm
Forum: Python
Topic: Make add-on as a new mode
Replies: 4
Views: 1024

It's already done and works for my needs. I'm using both for my plugin.
It would be just more comfortable as a mode.
by Mr.Yeah
Thu Dec 27, 2012 10:28 am
Forum: Python
Topic: creating a tetrahedron frame
Replies: 5
Views: 2128

BTW: You can add an option to scale the frame while creating. Replace def tetrahedron_frame(radius=0.1): s = sqrt(2)/3 t = -1/3 u = sqrt(6)/3 v = [(0, 0, 1), (2*s, 0, t), (-s, u, t), (-s, -u, t)] with def tetrahedron_frame(radius=0.1, scale=1.0): s = sqrt(2)/3*scale t = -1/3*scale u = sqrt(6)/3*scal...
by Mr.Yeah
Thu Dec 27, 2012 9:25 am
Forum: Python
Topic: creating a tetrahedron frame
Replies: 5
Views: 2128

I didn't look closely at your code so I don't know why it doesn't work but it's way too complicated. Here's the code I made: import bpy from math import sqrt from mathutils import Vector def cylinder(a, b, radius=1.0): depth = (a-b).length location = a.lerp(b, 0.5) rotation = Vector((0, 0, 1)).rotat...
by Mr.Yeah
Thu Dec 27, 2012 9:17 am
Forum: Python
Topic: Make add-on as a new mode
Replies: 4
Views: 1024

It's an add-on which makes it a lot of easier to build Lego-like models.
by Mr.Yeah
Wed Dec 26, 2012 1:22 pm
Forum: Python
Topic: creating a tetrahedron frame
Replies: 5
Views: 2128

At least I can tell you how to make tetrahedra. There's a script named add_mesh_solid.py in scripts\addons. When the add-on is active, you can create a tetrahedron with bpy.ops.mesh.primitive_solid_add(source='4') Look at the source code so you understand how to get the right vertices. I think you'l...
by Mr.Yeah
Tue Dec 25, 2012 6:30 pm
Forum: Python
Topic: Midpoint of 2 vectors
Replies: 3
Views: 1492

Do it yourself:

Code: Select all

def MidpointVecs(vec1, vec2):
    vec = vec1 + vec2
    vec = vec / 2
    return vec
cu
Mr.Yeah
by Mr.Yeah
Mon Dec 24, 2012 6:00 pm
Forum: Python
Topic: Make add-on as a new mode
Replies: 4
Views: 1024

Make add-on as a new mode

Hello.

Do you know how I can add a new mode (like object or edit mode) with Python API?
Thanks in advance

cu
Mr.Yeah