Skip to content

Commit

Permalink
Merge pull request #7 from BlendingJake/2.x.x
Browse files Browse the repository at this point in the history
2.x.x
  • Loading branch information
BlendingJake authored Mar 4, 2019
2 parents 2804c31 + 906f996 commit 4f890a2
Show file tree
Hide file tree
Showing 14 changed files with 4,563 additions and 8,270 deletions.
138 changes: 135 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,140 @@
# JARCH-Vis
JARCH Vis is add-on for Blender 3D that helps create commonly used objects for architectural visualization.
Some of these objects are:

## Introduction
JARCH Vis is add-on for Blender 3D that helps create certain
architectural objects in a way that makes them easily customizable.

The architecture types that can be created are:

* Siding
* Flooring
* Windows
* Stairs
* Roofing

## Usage
The JARCH Vis (JV) panel is found in the 3D Viewport Toolbar, under a
section called "JARCH Vis." There is always at least four buttons within
that panel, allowing an object of each architecture type to be easily
added to the scene. If a JV object is selected, then the options
specific to the architecture type of the selected object will be
displayed in the panel.

Modifying any value within the panel will automatically update the mesh
object, assuming that the `Update Automatically?` option is selected. If
that option is unchecked, then the `Update Object` button has to be
clicked to get the object to update. If the mesh object is really large
or complicated, then it might be a good idea to not update automatically.

#### Converting Objects
There are times when you might want to add objects that aren't
rectangular. This can be done by converting an object made up of planes
into a JV object. To convert an object, start by entering editmode.
Then, select all faces that are in the same plane/group and click the `+`
button in the JV panel. Repeat for all groups of faces.

##### Face Group
> In JARCH Vis, a face group is a collection of faces that all lie in
the same plane and will be used as a mask/boolean object for a JV object.
Essentially, a face group is used as a cookie-cutter. It is important
that all points lie in the same plane within a face group to ensure
expected results.

JV has two ways to use the face groups as cutter objects. One way is with
the boolean modifier, which supports non-convex face groups. However,
the boolean modifier sometimes returns odd results. If the face group
is convex, then check the `Convex?` option, which will cause JV to use a
different method of cutting the face group.

##### Convex
> A shape or polygon is convex if there does not exist a line segment
between two points on the surface that passes outside of the surface.
More specifically, a face group is convex if all interior angles between
boundary edges are less than or equal to 180 degrees and there are no
parts missing from the interior of the shape.

Once all face groups have been added, exit editmode and make sure that
the rotation and scale have been applied for the object: `CTRL+A ->
Rotation & Scale`. After that, just click `Convert Object` within the JV
panel. The newly converted JV object will have most of the same options
as a regular JV object, except the overall dimension values.

##### Cutouts
Cutouts provide an easy way to cut rectangles out of siding, roofing, and
flooring objects. Cutouts can even be added to objects that have been
converted. To add a cutout, first check the `Cutouts?` box, then click
`Add Cutout`. Every cutout has the following options:

* `Location` - the X, Y, and Z position of the corner of the cutout
* `Dimensions` - the X, Y, and Z dimensions of the cutout
* `Rotation` - the X, Y, and Z rotation of the cutout
* `Local` - whether or not the location and rotation of the cutout are in
local coordinates or not

A cutout can be removed by clicking the `Remove Cutout` button right below
the `Local` option.

> The `Local` option for a cutout can dramatically change where the
cutout is located. If `Local` is checked, then the `Location` and `Rotation`
values are offsets from object's origin and rotation. If `Local` is not
checked, then the values are in reference to the world and are absolute
positions.

#### Materials
The faces within JV objects are created in such a way that materials
can be added easily. By default, all faces will use the material in the
first slot on the object. However, glass and mortar faces will use the
second slot. Therefore adding materials is as easy as putting the primary
material in the first slot, and a secondary material, if needed, in the
second slot.

#### UV Unwrapping
All JV objects have UV seams added and are unwrapped automatically.

## Installation
1. Download the latest release or `.zip` version of the
repository.
2. Extract the downloaded folder and rename the it to `jarch_vis`.
Make sure that the file structure is like `jarch_vis/__init__.py` and not
`jarch_vis/some_folder/__init__.py`.
3. Move the `jarch_vis` folder to your Blender install location under
`2.8x/scripts/addons`. On Windows, this is generally found at
`Program Files/Blender Foundation/Blender/2.8x/...`
4. Open Blender, go to `Edit -> Preferences -> Add-ons` and check the
option that is `Add Mesh: JARCH Vis`.

## Revision Log
### JV 2.0.0 for Blender 2.8x
Version 2.0.0 represents a massive change in JARCH Vis. The entire add-on was re-written from the ground up. Changing the user-interface,
simplifying the backing code, allowing new architecture types to be
added more easily, and updating JV to work with Blender 2.8x.
It is important to note that backwards compatibility has been broken.
JV objects created with previous versions of JV will
not work with this newest version.

Changes in no particular order include:

* Stairs have been removed for the time being
* Two new patterns of flooring: Corridor and Octagons
* Hexagons and Octagons can have dots/cubes added between the tiles
* Several flooring patterns were renamed
* A new way of handling cutouts was added that is faster and allows for an
"unlimited" number of cutouts
* Most architecture pattern types are more customizable and many
arbitrary min and max bounds on values have been removed
* Several types of siding have been combined
* Shiplap siding, shakes, and scallop shakes have been added
* Tongue & Groove and Stone siding have been removed. Stone will hopefully
be added back in at some point. Tongue & Groove is likely gone for awhile.
* Shakes for roofing have been added
* Terracotta tiles have been updated to a slightly different look
* Gliding, double-hung, and stationary windows have all been combined
into the "Regular" pattern, with new options added to allow all the old
looks to be created
* Arch and Ellipse windows are built differently to make them smoother
at a lower resolution

## Goals
1. Add a much more customizable and faster version of stone siding
then previously existed
1. Add stairs back in
1. Add railing
94 changes: 35 additions & 59 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,86 +16,62 @@
bl_info = {
"name": "JARCH Vis",
"author": "Jacob Morris",
"version": (1, 0, 1),
"blender": (2, 78, 0),
"version": (2, 0, 0),
"blender": (2, 80, 0),
"location": "View 3D > Toolbar > JARCH Vis",
"description": "Allows The Creation Of Architectural Objects Like Flooring, Siding, Stairs, Roofing, and Windows",
"category": "Add Mesh"
}
}

if "bpy" in locals():
import importlib

importlib.reload(jv_properties)
importlib.reload(jv_siding)
importlib.reload(jv_flooring)
importlib.reload(jv_stairs)
importlib.reload(jv_roofing)
importlib.reload(jv_windows)
modules = [
jv_utils,
jv_types,
jv_properties,

jv_builder_base,
jv_flooring,
jv_siding,
jv_roofing,
jv_windows,

jv_operators,
jv_panel
]

for module in modules:
importlib.reload(module)
else:
from . import jv_utils
from . import jv_types
from . import jv_properties
from . import jv_siding

from . import jv_builder_base
from . import jv_flooring
from . import jv_stairs
from . import jv_siding
from . import jv_roofing
from . import jv_windows

import bpy
from bpy.props import StringProperty, CollectionProperty, IntProperty, FloatProperty


class FaceGroup(bpy.types.PropertyGroup):
data = StringProperty()
num_faces = IntProperty()
face_slope = FloatProperty()
rot = FloatProperty(unit="ROTATION")
from . import jv_operators
from . import jv_panel


class CutoutGroup(bpy.types.PropertyGroup):
x_dist = FloatProperty(subtype="DISTANCE")
z_dist = FloatProperty(subtype="DISTANCE")
width = FloatProperty(subtype="DISTANCE")
height = FloatProperty(subtype="DISTANCE")


class INFO_MT_mesh_jv_menu_add(bpy.types.Menu):
bl_idname = "INFO_MT_mesh_jv_menu_add"
bl_label = "JARCH Vis"

def draw(self, context):
layout = self.layout
layout.operator("mesh.jv_flooring_add", text="Add Flooring", icon="MESH_GRID")
layout.operator("mesh.jv_roofing_add", text="Add Roofing", icon="LINCURVE")
layout.operator("mesh.jv_siding_add", text="Add Siding", icon="UV_ISLANDSEL")
layout.operator("mesh.jv_stairs_add", text="Add Stairs", icon="MOD_ARRAY")
layout.operator("mesh.jv_window_add", text="Add Window", icon="OUTLINER_OB_LATTICE")


def menu_add(self, context):
self.layout.menu("INFO_MT_mesh_jv_menu_add", icon="PLUGIN")
import bpy


def register():
bpy.utils.register_module(__name__)
bpy.types.INFO_MT_mesh_add.append(menu_add)
bpy.types.Object.jv_face_groups = CollectionProperty(type=FaceGroup)
bpy.types.Object.jv_cutout_groups = CollectionProperty(type=CutoutGroup)

wm = bpy.context.window_manager
km = wm.keyconfigs.addon.keymaps.new(name="3D View", space_type="VIEW_3D")
km.keymap_items.new("mesh.jv_add_face_group_item", "A", "PRESS", ctrl=True)
jv_properties.register()
jv_operators.register()
jv_panel.register()


def unregister():
bpy.utils.unregister_module(__name__)
del bpy.types.Object.jv_face_groups
del bpy.types.Object.jv_cutout_groups

wm = bpy.context.window_manager
if wm.keyconfigs.addon:
for kmi in wm.keyconfigs.addon.keymaps['3D View'].keymap_items:
if kmi.idname == "mesh.jv_add_face_group_item":
wm.keyconfigs.addon.keymaps['3D View'].keymap_items.remove(kmi)
jv_panel.unregister()
jv_operators.unregister()
jv_properties.unregister()


if __name__ == "__main__":
register()
Loading

0 comments on commit 4f890a2

Please sign in to comment.