[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3799] contrib/py/scripts/addons/ add_mesh_cad_objects: SVN maintenance.
gsr b3d
gsr.b3d at infernal-iceberg.com
Mon Oct 1 03:37:40 CEST 2012
Revision: 3799
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3799
Author: gsrb3d
Date: 2012-10-01 01:37:37 +0000 (Mon, 01 Oct 2012)
Log Message:
-----------
SVN maintenance.
Modified Paths:
--------------
contrib/py/scripts/addons/add_mesh_cad_objects/__init__.py
contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_balcony.py
contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_beam_builder.py
contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_sove.py
contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_window.py
Property Changed:
----------------
contrib/py/scripts/addons/add_mesh_cad_objects/__init__.py
contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_balcony.py
contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_beam_builder.py
contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_sove.py
contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_window.py
Modified: contrib/py/scripts/addons/add_mesh_cad_objects/__init__.py
===================================================================
--- contrib/py/scripts/addons/add_mesh_cad_objects/__init__.py 2012-10-01 00:42:58 UTC (rev 3798)
+++ contrib/py/scripts/addons/add_mesh_cad_objects/__init__.py 2012-10-01 01:37:37 UTC (rev 3799)
@@ -1,91 +1,91 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-# Contributed to by
-# SAYproductions, meta-androcto #
-
-bl_info = {
- "name": "Cad Objects",
- "author": "SAYproductions, meta-androcto",
- "version": (0, 2),
- "blender": (2, 6, 4),
- "location": "View3D > Add > Mesh > Cad Objects",
- "description": "Add cad object types",
- "warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
- "Scripts",
- "tracker_url": "https://projects.blender.org/tracker/index.php?"\
- "func=detail&aid=32711",
- "category": "Add Mesh"}
-
-
-if "bpy" in locals():
- import imp
- imp.reload(add_mesh_balcony)
- imp.reload(add_mesh_sove)
- imp.reload(add_mesh_window)
- imp.reload(add_mesh_beam_builder)
-
-else:
- from . import add_mesh_balcony
- from . import add_mesh_sove
- from . import add_mesh_window
- from . import add_mesh_beam_builder
-
-import bpy
-
-
-class INFO_MT_mesh_objects_add(bpy.types.Menu):
- # Define the "mesh objects" menu
- bl_idname = "INFO_MT_cad_objects_add"
- bl_label = "Cad Objects"
-
- def draw(self, context):
- layout = self.layout
- layout.operator_context = 'INVOKE_REGION_WIN'
- layout.menu("INFO_MT_mesh_beambuilder_add",
- text="Beam Builder")
- layout.operator("mesh.add_say3d_balcony",
- text="Balcony")
- layout.operator("mesh.add_say3d_sove",
- text="Sove")
- layout.operator("mesh.add_say3d_pencere",
- text="Window")
-
-
-# Register all operators and panels
-
-# Define "Extras" menu
-def menu_func(self, context):
- self.layout.menu("INFO_MT_cad_objects_add", icon="PLUGIN")
-
-
-def register():
- bpy.utils.register_module(__name__)
-
- # Add "Extras" menu to the "Add Mesh" menu
- bpy.types.INFO_MT_mesh_add.append(menu_func)
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
-
- # Remove "Extras" menu from the "Add Mesh" menu.
- bpy.types.INFO_MT_mesh_add.remove(menu_func)
-
-if __name__ == "__main__":
- register()
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+# Contributed to by
+# SAYproductions, meta-androcto #
+
+bl_info = {
+ "name": "Cad Objects",
+ "author": "SAYproductions, meta-androcto",
+ "version": (0, 2),
+ "blender": (2, 6, 4),
+ "location": "View3D > Add > Mesh > Cad Objects",
+ "description": "Add cad object types",
+ "warning": "",
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
+ "Scripts",
+ "tracker_url": "https://projects.blender.org/tracker/index.php?"\
+ "func=detail&aid=32711",
+ "category": "Add Mesh"}
+
+
+if "bpy" in locals():
+ import imp
+ imp.reload(add_mesh_balcony)
+ imp.reload(add_mesh_sove)
+ imp.reload(add_mesh_window)
+ imp.reload(add_mesh_beam_builder)
+
+else:
+ from . import add_mesh_balcony
+ from . import add_mesh_sove
+ from . import add_mesh_window
+ from . import add_mesh_beam_builder
+
+import bpy
+
+
+class INFO_MT_mesh_objects_add(bpy.types.Menu):
+ # Define the "mesh objects" menu
+ bl_idname = "INFO_MT_cad_objects_add"
+ bl_label = "Cad Objects"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.menu("INFO_MT_mesh_beambuilder_add",
+ text="Beam Builder")
+ layout.operator("mesh.add_say3d_balcony",
+ text="Balcony")
+ layout.operator("mesh.add_say3d_sove",
+ text="Sove")
+ layout.operator("mesh.add_say3d_pencere",
+ text="Window")
+
+
+# Register all operators and panels
+
+# Define "Extras" menu
+def menu_func(self, context):
+ self.layout.menu("INFO_MT_cad_objects_add", icon="PLUGIN")
+
+
+def register():
+ bpy.utils.register_module(__name__)
+
+ # Add "Extras" menu to the "Add Mesh" menu
+ bpy.types.INFO_MT_mesh_add.append(menu_func)
+
+
+def unregister():
+ bpy.utils.unregister_module(__name__)
+
+ # Remove "Extras" menu from the "Add Mesh" menu.
+ bpy.types.INFO_MT_mesh_add.remove(menu_func)
+
+if __name__ == "__main__":
+ register()
Property changes on: contrib/py/scripts/addons/add_mesh_cad_objects/__init__.py
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_balcony.py
===================================================================
--- contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_balcony.py 2012-10-01 00:42:58 UTC (rev 3798)
+++ contrib/py/scripts/addons/add_mesh_cad_objects/add_mesh_balcony.py 2012-10-01 01:37:37 UTC (rev 3799)
@@ -1,492 +1,492 @@
-'''
-bl_info = {
- "name": "Balcony",
- "author": "SayPRODUCTIONS",
- "version": (1, 0),
- "blender": (2, 5, 9),
- "api": 33333,
- "location": "View3D > Add > Mesh > Say3D",
- "description": "Balcony olusturma",
- "warning": "",
- "wiki_url": "",
- "tracker_url": "",
- "category": "Add Mesh"}
-'''
-import bpy, bmesh
-from bpy.props import *
-from bpy_extras.object_utils import object_data_add
-from mathutils import Vector
-import operator
-import os
-from math import pi, sin, cos, sqrt, atan
-def MAT(AD,R,G,B):
- if AD not in bpy.data.materials:
- mtl=bpy.data.materials.new(AD)
- mtl.diffuse_color = ([R,G,B])
- mtl.diffuse_shader = 'LAMBERT'
- mtl.diffuse_intensity = 1.0
- else:
- mtl=bpy.data.materials[AD]
- return mtl
-def Prs(s,v):
- if v=='1':
- s.lst=3
- s.ls0='1';s.by0= 80;s.bk0=20;s.bf0=4;s.fh0=3;s.fd0=2;s.f00=16;s.f01=12;s.f02=12;s.f03=12
- s.ls1='3';s.my1= 4;s.mg1= 4
- s.ls2='4';s.kt2="2";s.ky2= 5;s.kk2=5
- if v=='2':
- s.lst=5
- s.ls0='1';s.by0= 15;s.bk0=20;s.bf0=0
- s.ls1='2';s.py1= 60;s.pd1=10
- s.ls2='1';s.by2= 15;s.bk2=20;s.bf2=0
- s.ls3='3';s.my3= 4;s.mg3= 4
- s.ls4='4';s.kt4="2";s.ky4= 5;s.kk4=5
- if v=='3':
- s.lst=3
- s.ls0='1';s.by0= 40;s.bk0=10;s.bf0=0
- s.ls1='5';s.cy1= 56
- s.ls2='4';s.kt2="1";s.ky2= 0;s.kk2=4
- if v=='4':
- s.lst=2
- s.ls0='1';s.by0= 30;s.bk0=20;s.bf0=0
- s.ls1='3';s.my1= 4;s.mg1= 4
- if v=='5':
- s.lst=2
- s.ls0='1';s.by0= 27;s.bk0=20;s.bf0=2;s.fh0=3;s.fd0=2;s.f00=7;s.f01=7
- s.ls1='3';s.my1= 4;s.mg1= 4
- if v=='6':
- s.lst=6
- s.ls0='1';s.by0= 50;s.bk0=20;s.bf0=2;s.fh0=3;s.fd0=2;s.f00=12;s.f01=20
- s.ls1='3';s.my1= 4;s.mg1= 4
- s.ls2='4';s.kt2="2";s.ky2= 5;s.kk2=4
- s.ls3='4';s.kt3="2";s.ky3= 5;s.kk3=4
- s.ls4='4';s.kt4="2";s.ky4= 5;s.kk4=4
- s.ls5='4';s.kt5="2";s.ky5= 5;s.kk5=5
-def EXT(PR,vr,fc,lz,mz,rz):
- n=len(vr)
- m=len(PR)
- if lz==0:
- for P in PR:vr.append([-mz,P[0],P[1]])
- else:
- for P in PR:vr.append([ P[0]-mz, lz,P[1]])
- for P in PR:vr.append([ P[0]-mz,P[0],P[1]])
- if rz==0:
- for P in PR:vr.append([ mz,P[0],P[1]])
- else:
- for P in PR:vr.append([-P[0]+mz,P[0],P[1]])
- for P in PR:vr.append([-P[0]+mz, rz,P[1]])
- if lz==0 and rz==0:l=1
- elif lz==0 and rz> 0:l=2
- elif lz> 0 and rz==0:l=2
- elif lz> 0 and rz> 0:l=3
- for j in range(0,l):
- for i in range(0,m):
- a=j*m
- if i==m-1:fc.append([a+i+n,a+0+n+0,a+0+n+0+m,a+i+n+m])
- else: fc.append([a+i+n,a+i+n+1,a+i+n+1+m,a+i+n+m])
-def add_object(s,context):
- fc=[];vr=[];SM=[]
- Bal=[];Par=[];Mer=[];Krm=[];Glass=[];Dos=[]
- blok=[]# [ Tip ][ Balcony [ Joint_Gap ] [ Bulwark ] [ Marble ] [ Chrome ] [ Glass ]
- blok.append([s.ls0,[s.by0,s.bk0,s.bf0,s.fh0,s.fd0,[s.f00,s.f01,s.f02,s.f03,s.f04,s.f05,s.f06,s.f07]],[s.py0,s.pd0],[s.my0,s.mg0],[s.kt0,s.ky0,s.kk0],[s.cy0]])
- blok.append([s.ls1,[s.by1,s.bk1,s.bf1,s.fh1,s.fd1,[s.f10,s.f11,s.f12,s.f13,s.f14,s.f15,s.f16,s.f17]],[s.py1,s.pd1],[s.my1,s.mg1],[s.kt1,s.ky1,s.kk1],[s.cy1]])
- blok.append([s.ls2,[s.by2,s.bk2,s.bf2,s.fh2,s.fd2,[s.f20,s.f21,s.f22,s.f23,s.f24,s.f25,s.f26,s.f27]],[s.py2,s.pd2],[s.my2,s.mg2],[s.kt2,s.ky2,s.kk2],[s.cy2]])
- blok.append([s.ls3,[s.by3,s.bk3,s.bf3,s.fh3,s.fd3,[s.f30,s.f31,s.f32,s.f33,s.f34,s.f35,s.f36,s.f37]],[s.py3,s.pd3],[s.my3,s.mg3],[s.kt3,s.ky3,s.kk3],[s.cy3]])
- blok.append([s.ls4,[s.by4,s.bk4,s.bf4,s.fh4,s.fd4,[s.f40,s.f41,s.f42,s.f43,s.f44,s.f45,s.f46,s.f47]],[s.py4,s.pd4],[s.my4,s.mg4],[s.kt4,s.ky4,s.kk4],[s.cy4]])
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list