Skip to content

Commit

Permalink
added license to properties, fixed a couple layout issues, finished f…
Browse files Browse the repository at this point in the history
…or release
  • Loading branch information
BlendingJake committed Jan 7, 2017
1 parent 1436275 commit e84a0c9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
1 change: 1 addition & 0 deletions jv_flooring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@ def draw(self, context):
layout.operator("mesh.jv_flooring_add", icon="MESH_GRID")
else:
layout.label("Only Mesh Objects Can Be Used", icon="ERROR")
layout.operator("mesh.jv_flooring_add", icon="MESH_GRID")
else:
layout.operator("mesh.jv_flooring_add", icon="MESH_GRID")

Expand Down
25 changes: 20 additions & 5 deletions jv_properties.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
# This file is part of JARCH Vis
#
# JARCH Vis 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 3 of the License, or
# (at your option) any later version.
#
# JARCH Vis 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 JARCH Vis. If not, see <http://www.gnu.org/licenses/>.

import bpy
from bpy.props import FloatProperty, IntProperty, EnumProperty, StringProperty, BoolProperty, FloatVectorProperty
from . jv_utils import METRIC_INCH, METRIC_FOOT, delete_materials, preview_materials, update_roofing_facegroup_selection
from math import radians


def jv_update_object(self, context):
from jv_flooring import update_flooring
from jv_roofing import update_roofing
from jv_siding import update_siding
from jv_stairs import update_stairs
from jv_windows import update_window
from . jv_flooring import update_flooring
from . jv_roofing import update_roofing
from . jv_siding import update_siding
from . jv_stairs import update_stairs
from . jv_windows import update_window

o = context.object
updates = {"flooring": update_flooring, "siding": update_siding, "roofing": update_roofing, "stair": update_stairs,
Expand Down
7 changes: 5 additions & 2 deletions jv_roofing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ def draw(self, context):

# if in edit mode layout UIlist
if ob is not None:
if ob.jv_internal_type in ("roofing", ""):
if ob.jv_internal_type in ("roofing", "") and ob.type == "MESH":
if context.mode == "EDIT_MESH" and ob.jv_object_add == "none":
layout.template_list("OBJECT_UL_jv_face_groups", "", ob, "jv_face_groups", ob,
"jv_face_group_index")
Expand Down Expand Up @@ -1195,7 +1195,10 @@ def draw(self, context):
layout.operator("mesh.jv_roofing_convert", icon="FILE_REFRESH")
layout.operator("mesh.jv_roofing_add", icon="LINCURVE")
else:
layout.label("This Is Already A JARCH Vis Object", icon="INFO")
if ob.type != "MESH":
layout.label("Only Mesh Objects Can Be Used", icon="ERROR")
else:
layout.label("This Is Already A JARCH Vis Object", icon="INFO")
layout.operator("mesh.jv_roofing_add", icon="LINCURVE")
else:
layout.operator("mesh.jv_roofing_add", icon="LINCURVE")
Expand Down
4 changes: 3 additions & 1 deletion jv_siding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,8 @@ def execute(self, context):
bpy.ops.object.move_to_layer(layers=[i == al for i in range(20)])
cutter.name = o.name

cutter.jv_object_add = "none"
cutter.jv_internal_type = ""
cutter.select = False
context.scene.layers = pre_layers

Expand Down Expand Up @@ -1957,7 +1959,7 @@ def execute(self, context):
class OBJECT_UL_jv_cutout_groups(bpy.types.UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
row = layout.row(align=True)
row.label(str(index), icon="FULLSCREEN")
row.label(str(index + 1), icon="FULLSCREEN")
row.label("X: " + str(round(item.x_dist, 2)))
row.label("Z: " + str(round(item.z_dist, 2)))
row.label("Width: " + str(round(item.width, 2)))
Expand Down
3 changes: 2 additions & 1 deletion jv_stairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,8 @@ def draw(self, context):
else:
layout.operator("mesh.jv_stairs_add", icon="MOD_ARRAY")
else:
layout.label("This Is Already A JARCH Vis Object", icon="INFO")
if o.jv_internal_type != "":
layout.label("This Is Already A JARCH Vis Object", icon="INFO")
layout.operator("mesh.jv_stairs_add", icon="MOD_ARRAY")
else:
layout.operator("mesh.jv_stairs_add", icon="MOD_ARRAY")
Expand Down
2 changes: 1 addition & 1 deletion jv_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ def draw(self, context):
layout.operator("mesh.jv_window_add", icon="OUTLINER_OB_LATTICE")

else:
if context.object.jv_internal_type != "window":
if context.object.jv_internal_type != "":
layout.label("This Is Already A JARCH Vis Object", icon="INFO")
layout.operator("mesh.jv_window_add", icon="OUTLINER_OB_LATTICE")

Expand Down

0 comments on commit e84a0c9

Please sign in to comment.