Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoDEmanX <codemanx@gmx.de>2014-02-04 06:05:05 +0400
committerCoDEmanX <codemanx@gmx.de>2014-02-04 06:05:05 +0400
commit049a5a86edcf78b070b73b141b657825145ae9a1 (patch)
tree6e5edf67d7974e0ad8beb209c57fd48c456ecfbe /add_mesh_extra_objects
parentd9fcbd06018165cc2cfca0673c7c2db44b04a833 (diff)
Clean-up: Updated bl_info['tracker_url'] to developer.blender.org, some minor other edits
Diffstat (limited to 'add_mesh_extra_objects')
-rw-r--r--add_mesh_extra_objects/__init__.py9
-rw-r--r--add_mesh_extra_objects/add_mesh_3d_function_surface.py5
-rw-r--r--add_mesh_extra_objects/add_mesh_gears.py13
-rw-r--r--add_mesh_extra_objects/add_mesh_gemstones.py5
-rw-r--r--add_mesh_extra_objects/add_mesh_honeycomb.py80
-rw-r--r--add_mesh_extra_objects/add_mesh_polysphere.py14
-rw-r--r--add_mesh_extra_objects/add_mesh_twisted_torus.py7
7 files changed, 63 insertions, 70 deletions
diff --git a/add_mesh_extra_objects/__init__.py b/add_mesh_extra_objects/__init__.py
index a8c71ae5..93cb7f23 100644
--- a/add_mesh_extra_objects/__init__.py
+++ b/add_mesh_extra_objects/__init__.py
@@ -26,10 +26,9 @@ bl_info = {
"location": "View3D > Add > Mesh > Extra Objects",
"description": "Add extra object types",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Add_Mesh/Add_Extra",
- "tracker_url": "http://projects.blender.org/tracker/index.php?"\
- "func=detail&aid=22457",
+ "tracker_url": "https://developer.blender.org/T22457",
"category": "Add Mesh"}
@@ -89,7 +88,7 @@ class INFO_MT_mesh_gemstones_add(bpy.types.Menu):
layout.operator("mesh.primitive_gem_add",
text="Gem")
-
+
class INFO_MT_mesh_gears_add(bpy.types.Menu):
# Define the "Gears" menu
bl_idname = "INFO_MT_mesh_gears_add"
@@ -133,7 +132,7 @@ class INFO_MT_mesh_basic_add(bpy.types.Menu):
text="Trapezohedron")
layout.operator("mesh.primitive_polysphere_add",
text="Polysphere")
-
+
class INFO_MT_mesh_torus_add(bpy.types.Menu):
# Define the "Simple Objects" menu
bl_idname = "INFO_MT_mesh_torus_add"
diff --git a/add_mesh_extra_objects/add_mesh_3d_function_surface.py b/add_mesh_extra_objects/add_mesh_3d_function_surface.py
index 2fa128a4..64fe9879 100644
--- a/add_mesh_extra_objects/add_mesh_3d_function_surface.py
+++ b/add_mesh_extra_objects/add_mesh_3d_function_surface.py
@@ -24,10 +24,9 @@ bl_info = {
"location": "View3D > Add > Mesh",
"description": "Create Objects using Math Formulas",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
"Scripts/Add_Mesh/Add_3d_Function_Surface",
- "tracker_url": "https://projects.blender.org/tracker/index.php?"\
- "func=detail&aid=21444",
+ "tracker_url": "https://developer.blender.org/T21444",
"category": "Add Mesh"}
'''
diff --git a/add_mesh_extra_objects/add_mesh_gears.py b/add_mesh_extra_objects/add_mesh_gears.py
index 38a3d0be..7dfa46b0 100644
--- a/add_mesh_extra_objects/add_mesh_gears.py
+++ b/add_mesh_extra_objects/add_mesh_gears.py
@@ -27,10 +27,9 @@ bl_info = {
"location": "View3D > Add > Mesh > Gears ",
"description": "Adds a mesh Gear to the Add Mesh menu",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
"Scripts/Add_Mesh/Add_Gear",
- "tracker_url": "https://projects.blender.org/tracker/index.php?"\
- "func=detail&aid=21732",
+ "tracker_url": "https://developer.blender.org/T21732",
"category": "Add Mesh"}
'''
@@ -638,19 +637,19 @@ class AddGear(bpy.types.Operator):
def draw(self, context):
layout = self.layout
-
+
box = layout.box()
box.prop(self, 'number_of_teeth')
-
+
box = layout.box()
box.prop(self, 'radius')
box.prop(self, 'width')
box.prop(self, 'base')
-
+
box = layout.box()
box.prop(self, 'dedendum')
box.prop(self, 'addendum')
-
+
box = layout.box()
box.prop(self, 'angle')
box.prop(self, 'skew')
diff --git a/add_mesh_extra_objects/add_mesh_gemstones.py b/add_mesh_extra_objects/add_mesh_gemstones.py
index 7d3db788..7372d2f7 100644
--- a/add_mesh_extra_objects/add_mesh_gemstones.py
+++ b/add_mesh_extra_objects/add_mesh_gemstones.py
@@ -24,10 +24,9 @@ bl_info = {
"location": "View3D > Add > Mesh > Gemstones",
"description": "Adds various gemstone (Diamond & Gem) meshes.",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
"Scripts/Add_Mesh/Add_Gemstones",
- "tracker_url": "https://projects.blender.org/tracker/index.php?"\
- "func=detail&aid=21432",
+ "tracker_url": "https://developer.blender.org/T21432",
"category": "Add Mesh"}
'''
import bpy
diff --git a/add_mesh_extra_objects/add_mesh_honeycomb.py b/add_mesh_extra_objects/add_mesh_honeycomb.py
index e810e0de..d42f66d5 100644
--- a/add_mesh_extra_objects/add_mesh_honeycomb.py
+++ b/add_mesh_extra_objects/add_mesh_honeycomb.py
@@ -21,13 +21,11 @@ bl_info = {
"author": "Kayo Phoenix <kayo@illumium.org>",
"version": (0, 1),
"blender": (2, 57, 0),
- "api": 35853,
"location": "View3D > Add > Mesh > HoneyComb",
"description": "Adds HoneyComb Mesh",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Add_Mesh/HoneyComb",
- "category": "Add Mesh"
- }
+ "category": "Add Mesh"}
'''
from math import pi, sin, cos
@@ -37,37 +35,37 @@ class honeycomb_geometry():
self.cols = cols
self.D = D
self.E = E
-
+
self.hE = 0.5 * self.E
self.R = 0.5 * self.D
-
+
self.a = sin(pi / 3)
-
+
self.d = self.a * self.D
self.hd = 0.5 * self.d
self.e = self.hE / self.a
self.he = 0.5 * self.e
self.r = self.R - self.e
self.hr = 0.5 * self.r
-
-
+
+
self.H = self.R * (1.5 * self.rows + 0.5) + self.e
if self.rows > 1:
self.W = self.d * (self.cols + 0.5) + self.E
else:
self.W = self.d * self.cols + self.E
-
+
self.hH = 0.5 * self.H
self.hW = 0.5 * self.W
-
+
self.sy = -self.hH + self.he + self.R
self.sx = -self.hW + self.hE + self.hd
-
+
self.gx = self.hd
-
+
self.dy = 1.5 * self.R
self.dx = self.d
-
+
def vert(self, row, col):
# full cell
if row >= 0 and row < self.rows and col >= 0 and col < self.cols: return [0, 1, 2, 3, 4, 5]
@@ -101,20 +99,20 @@ class honeycomb_geometry():
if row % 2 or self.rows == 1: return [2, 3]
else: return [1, 2, 3, 4]
return []
-
+
def cell(self, row, col, idx):
cp = [self.sx + self.dx * col, self.sy + self.dy * row, 0] # central point
if row % 2: cp[0] += self.gx
co = [] # vertexes coords
vi = self.vert(row, col)
ap = {}
-
+
for i in vi:
a = pi / 6 + i * pi / 3 # angle
ap[i] = idx + len(co)
co.append((cp[0] + cos(a) * self.r, cp[1] + sin(a) * self.r, cp[2]))
return co, ap
-
+
def generate(self):
ar = 1
ac = 1
@@ -122,7 +120,7 @@ class honeycomb_geometry():
cells = []
verts = []
faces = []
-
+
for row in range(-ar, self.rows + ar):
level = []
for col in range(-ac, self.cols + ac):
@@ -130,14 +128,14 @@ class honeycomb_geometry():
verts += co
level.append(ap)
cells.append(level)
-
+
# bottom row
row = 0
for col in range(1, len(cells[row]) - 1):
s = cells[row][col]
l = cells[row][col - 1]
u = cells[row + 1][col]
-
+
faces.append((s[1], u[5], u[4], s[2]))
faces.append((s[2], u[4], l[0]))
@@ -151,7 +149,7 @@ class honeycomb_geometry():
d = cells[row - 1][col - cs]
faces.append((s[3], l[5], d[1]))
faces.append([s[3], d[1], d[0], s[4]])
-
+
# middle rows
for row in range(1, len(cells) - 1):
cs = 0
@@ -161,25 +159,25 @@ class honeycomb_geometry():
l = cells[row][col - 1]
u = cells[row + 1][col - cs]
d = cells[row - 1][col - cs]
-
+
faces.append((s[1], u[5], u[4], s[2]))
faces.append((s[2], u[4], l[0]))
faces.append([s[2], l[0], l[5], s[3]])
faces.append((s[3], l[5], d[1]))
faces.append([s[3], d[1], d[0], s[4]])
-
+
# right column
row = 0
col = len(cells[row]) - 1
for row in range(1, len(cells) - 1):
cs = 0
if row % 2: cs += 1
-
+
s = cells[row][col]
l = cells[row][col - 1]
u = cells[row + 1][col - cs]
d = cells[row - 1][col - cs]
-
+
if row % 2 and row < len(cells) - 2:
faces.append((s[1], u[5], u[4], s[2]))
faces.append((s[2], u[4], l[0]))
@@ -187,7 +185,7 @@ class honeycomb_geometry():
faces.append((s[3], l[5], d[1]))
if row % 2 and row > 1:
faces.append([s[3], d[1], d[0], s[4]])
-
+
# final fix
if not self.rows % 2:
row = len(cells) - 1
@@ -196,7 +194,7 @@ class honeycomb_geometry():
d = cells[row - 1][col - 1]
faces.append((s[3], l[5], d[1]))
faces.append([s[3], d[1], d[0], s[4]])
-
+
return verts, faces
import bpy
@@ -211,31 +209,31 @@ class add_mesh_honeycomb(bpy.types.Operator):
bl_idname = 'mesh.honeycomb_add'
bl_label = 'Add HoneyComb'
bl_options = {'REGISTER', 'UNDO'}
-
+
rows = IntProperty(
name = 'Num of rows', default = 2,
min = 1, max = 100,
description='Number of the rows')
-
+
cols = IntProperty(
name = 'Num of cols', default = 2,
min = 1, max = 100,
description='Number of the columns')
-
+
def fix_edge(self, context):
m = edge_max(self.diam)
if self.edge > m: self.edge = m
-
+
diam = FloatProperty(
name = 'Cell Diameter', default = 1.0,
min = 0.0, update = fix_edge,
description='Diameter of the cell')
-
+
edge = FloatProperty(
name = 'Edge Width', default = 0.1,
min = 0.0, update = fix_edge,
description='Width of the edge')
-
+
# generic transform props
view_align = BoolProperty(
name="Align to View",
@@ -246,24 +244,24 @@ class add_mesh_honeycomb(bpy.types.Operator):
rotation = FloatVectorProperty(
name="Rotation",
subtype='EULER')
-
+
##### POLL #####
@classmethod
def poll(cls, context):
return context.scene is not None
-
+
##### EXECUTE #####
def execute(self, context):
mesh = bpy.data.meshes.new(name='honeycomb')
-
+
comb = honeycomb_geometry(self.rows, self.cols, self.diam, self.edge)
verts, faces = comb.generate()
-
+
mesh.from_pydata(vertices = verts, edges = [], faces = faces)
mesh.update()
-
+
object_utils.object_data_add(context, mesh, operator=self)
-
+
return {'FINISHED'}
'''
def menu_func(self, context):
@@ -271,14 +269,14 @@ def menu_func(self, context):
def register():
bpy.utils.register_module(__name__)
-
+
bpy.types.INFO_MT_mesh_add.append(menu_func)
def unregister():
bpy.utils.unregister_module(__name__)
-
+
bpy.types.INFO_MT_mesh_add.remove(menu_func)
-
+
if __name__ == "__main__":
register()
'''
diff --git a/add_mesh_extra_objects/add_mesh_polysphere.py b/add_mesh_extra_objects/add_mesh_polysphere.py
index 3454618c..5c5b1c2e 100644
--- a/add_mesh_extra_objects/add_mesh_polysphere.py
+++ b/add_mesh_extra_objects/add_mesh_polysphere.py
@@ -18,17 +18,17 @@
'''
bl_info = {
"name": "Add PolySphere",
- "author": "Andy Davies (metalliandy)",
+ "author": "Andy Davies (metalliandy)",
"version": (0,1,6),
"blender": (2, 62, 0),
"location": "View3D > Add > Mesh > PolySphere",
"description": "Adds a PolySphere (all quads) for sculpting",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
"Scripts/Add_Mesh/Add_PolySphere",
"tracker_url": "",
"category": "Add Mesh"}
-'''
+'''
import bpy
@@ -50,7 +50,7 @@ def Add_PolySphere():
subsurf = cube.modifiers['Subsurf']
#Changes Subsurf levels
- subsurf.levels = 3
+ subsurf.levels = 3
#Applys Subsurf Modifier
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Subsurf")
@@ -69,16 +69,16 @@ def Add_PolySphere():
#Change to Objectmode
bpy.ops.object.editmode_toggle()
-
+
#Scales Object to 2.0 Units
bpy.ops.transform.resize(value=(1.15525, 1.15525, 1.15525), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, snap=False, snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=False, snap_normal=(0, 0, 0), release_confirm=False)
-
+
#Applys location, rotation and scale data
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
#makes PolySphere an operator
class AddPolySphere(bpy.types.Operator):
-
+
bl_idname = "mesh.primitive_polysphere_add"
bl_label = "Add PolySphere"
bl_options = {'REGISTER', 'UNDO'}
diff --git a/add_mesh_extra_objects/add_mesh_twisted_torus.py b/add_mesh_extra_objects/add_mesh_twisted_torus.py
index 4ebf7e3e..984c2655 100644
--- a/add_mesh_extra_objects/add_mesh_twisted_torus.py
+++ b/add_mesh_extra_objects/add_mesh_twisted_torus.py
@@ -28,12 +28,11 @@ bl_info = {
"location": "View3D > Add > Mesh ",
"description": "Adds a mesh Twisted Torus to the Add Mesh menu",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
"Scripts/Add_Mesh/Add_Twisted_Torus",
- "tracker_url": "https://projects.blender.org/tracker/index.php?"\
- "func=detail&aid=21622",
+ "tracker_url": "https://developer.blender.org/T21622",
"category": "Add Mesh"}
-
+
Usage:
* Launch from Add Mesh menu