#!BPY """ Name: 'Build Walls' Blender: 248 Group: 'Object' Tooltip: 'Writing my python stuff....' """ __author__ = "Matthew Baynham" __date__ ="$08-May-2009 12:33:38$" __name__ = "MyWalls" __module__ = "MyWalls" __url__ = ("blender", "stuff","my homepage, http://www.doesnt-Exist.com",) __version__ = "0.2" __bpydoc__ = """Description: creates a few buttons and stuff. Usage: all controls are self-explanatory. Notes: currently, doesn't really do much....... """ # -------------------------------------------------------------------------- # ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # ***** END GPL LICENCE BLOCK ***** # -------------------------------------------------------------------------- #import Blender #from Blender import Draw, BGL, Window, NMesh, Mathutils #from Blender import NMesh, Mathutils #import math from math import * import sys sys.path.append("./") sys.path.append("./MyWalls/src") sys.path.append("C:/Program Files/Blender Foundation/Blender/.blender/scripts/MyWalls/src") #sys.path.append("C:/Python26/Lib/lib-tk") sys.path.append("C:/Python26/Lib") sys.path.append("C:/Code/C++/Python Import") #sys.path.append("C:/Python26/Lib/site-packages/wx-2.8-msw-unicode/wxPython") #from modulefinder import ModuleFinder # #finder = ModuleFinder() #finder.run_script("C:/Program Files/Blender Foundation/Blender/.blender/scripts/MyWalls/src/MyBrick.py") #finder.run_script("C:/Program Files/Blender Foundation/Blender/.blender/scripts/MyWalls/src/WallWithDoors.py") #finder.run_script("C:/Program Files/Blender Foundation/Blender/.blender/scripts/MyWalls/src/modBasics.py") #finder.run_script("C:/Program Files/Blender Foundation/Blender/.blender/scripts/MyClassProject/src/myClass.py") #finder.run_script("C:/Program Files/Blender Foundation/Blender/.blender/scripts/MyClassProject/src/MyGUI.py") #from MyGUI import MY_GUI #from myClass import MY_BOX #from MyWxPythonGui import MyWxGUI #import MyWxPythonGui import WallWithDoors reload(WallWithDoors) #from WallWithDoors import ClsWall #import C:/Code/C++/Python Import/ModStaticLib/libModStaticLib.a bPrintSystemInfo = False if bPrintSystemInfo == True: print "" print "System Info" print "OS: " + sys.platform print "sys.prefix " + sys.prefix print "Python Version " + sys.version print "" print "Modules loaded:" for mod in sys.modules: print " " + (mod) print "" objWall = WallWithDoors.ClsWall(3.0, 1.0, 10.0) #add dividers iFeatureFirstId = objWall.addFeature("first thing added", "divider", "stuff", 3.0, 0, 4.0, 0) bError, iVariableId = objWall.addFeatureVariables(iFeatureFirstId, "first divider", "extra vertexes", 1) print "Added Feature " + str(iFeatureFirstId) print "Added Variable " + str(iVariableId) iFeatureSecondId = objWall.addFeature("first thing added", "divider", "stuff", 8.0, 0, 2.5, 0) bError, iVariableId = objWall.addFeatureVariables(iFeatureSecondId, "second divider", "extra vertexes", 5) print "Added Feature " + str(iFeatureSecondId) print "Added Variable " + str(iVariableId) #add door #iFeatureId = objWall.addFeature("first thing added", "door", "square", 4.0, 0, 3.0, 0) #bError, iVariableId = objWall.addFeatureVariables(iFeatureId, "door stuff", "doorway hieght", 2) #bError, iVariableId = objWall.addFeatureVariables(iFeatureId, "door stuff", "doorway width", 0.6) #objWall.build() bIsError, fAmount = objWall.getFeatureVariables(iFeatureId = iFeatureFirstId, sVariableType = "extra vertexes") print "Amount " + str(fAmount) bIsError, fAmount = objWall.getFeatureVariables(iFeatureId = iFeatureSecondId, sVariableType = "extra vertexes") print "Amount " + str(fAmount) print "Warnings:" objWall.printWarnings() print "Finished"