- 
                Notifications
    
You must be signed in to change notification settings  - Fork 136
 
Development
A basic understanding of Github, Git and blender python api is required.
- 
Make sure you have the following:
- 
Text Editor / IDE of your choice for python.
e.g Sublime Text, Visual Studio code, Pycharm etc.
 - 
Github account.
 
 - 
Navigate to this project's repository.
 - 
Fork the project.
 - 
Navigate to the newly created fork in your Github account.
 - 
Clone the project into your local machine.
 
The source code for building tool is laid out in an obvious manner.
.core
    .window
        __init__.py
        window.py
        window_ops.py
        window_props.py
        window_types.py
    ...
    __init__.py
    generic.py
    register.py
.utils
    util_common.py
    util_geometry.py
    util_material.py
    util_mesh.py
    ...
__init__.py
In the root folder __init__.py can be found which servers as the addon initialization. You can expect to find:
- The addon 
bl_infoused by Blender's Python API for addon meta data. - UI definition for the addon's main panels.
 - 
registerandunregisterfunctions. 
Also in the root folder, a utils folder. This contains a collection of useful reusable modules and functions. Great effort has been taken to keep related functionality in common files.
Finaly, the guts of the addon is a folder called core. This folder contains collections of modules alongside some python files. The files include:
__init__.py- 
register.py- provides a centralized place to register classes. - 
generic.py- contains all properties that are used by more than one module. 
The modules include:
windowdoorrooffloorplanfloors
with more to be added.
Each of this modules contains at least 5 python files:
__init__.py- 
mod.py- contains a class tobuildgeometry andvalidatethe blender context. - 
mod_ops.py- contains operators required by the module - 
mod_props.py- contains properties required by the module. - 
mod_types.py- contains helper functions used by the module operator. 
where mod is the name of the module.
To start contributing to the development of Building Tool you need to have the appropriate environment setup. Developing blender addons can be a somewhat tricky especially when using an external editor. I will provide a short overview of my setup for developing Building Tool.
- You will need to get ScriptWatcher.
 
A very handy blender addon I stumbled across that watches your project files in blender and runs your addon when you make changes.
- 
Once ScriptWatcher is installed in blender, locate the ScriptWacher panel which should be in the
Propertieseditor under theScenetab. - 
Point ScriptWacher to the
__init__.pyfile at the root of your localBuilding Tooldevelopment sources. ClickWatch Scriptto runBuilding Toolin the current blender workspace. 
To avoid having to repeat this steps every time, you can save the current blender workspace as a file, say building_tool_dev.blend. Then in the SciptWatcher settings, enable the Watch on startup checkbox. Now every time you open the .blend file, everything will already be setup.