Cleaned up formatting to align with master v0.6 branch

This commit is contained in:
Kristoffer
2020-11-09 13:40:14 +01:00
parent 2a585c98d8
commit 26510de9e0
3 changed files with 76 additions and 79 deletions
@@ -146,8 +146,7 @@ class SelectGlobalId(bpy.types.Operator):
index = obj.BIMObjectProperties.attributes.find("GlobalId") index = obj.BIMObjectProperties.attributes.find("GlobalId")
if ( if (
index != -1 index != -1
and obj.BIMObjectProperties.attributes[ and obj.BIMObjectProperties.attributes[index].string_value == bpy.context.scene.BIMProperties.global_id
index].string_value == bpy.context.scene.BIMProperties.global_id
): ):
obj.select_set(True) obj.select_set(True)
break break
@@ -2978,8 +2977,7 @@ class AddSectionPlane(bpy.types.Operator):
section.show_in_front = True section.show_in_front = True
if bpy.context.active_object.select_get() and isinstance(bpy.context.active_object.data, bpy.types.Camera): if bpy.context.active_object.select_get() and isinstance(bpy.context.active_object.data, bpy.types.Camera):
section.matrix_world = ( section.matrix_world = (
bpy.context.active_object.matrix_world @ Euler((radians(180.0), 0.0, 0.0), bpy.context.active_object.matrix_world @ Euler((radians(180.0), 0.0, 0.0), "XYZ").to_matrix().to_4x4()
"XYZ").to_matrix().to_4x4()
) )
else: else:
section.rotation_euler = Euler((radians(180.0), 0.0, 0.0), "XYZ") section.rotation_euler = Euler((radians(180.0), 0.0, 0.0), "XYZ")
@@ -4346,8 +4344,8 @@ class RemoveFromPresentationLayer(bpy.types.Operator):
def execute(self, context): def execute(self, context):
for el in bpy.context.selected_objects: for el in bpy.context.selected_objects:
if el.BIMObjectProperties.presentation_layer.name != '': if el.BIMObjectProperties.presentation_layer.name != "":
el.BIMObjectProperties.presentation_layer.name = '' el.BIMObjectProperties.presentation_layer.name = ""
return {"FINISHED"} return {"FINISHED"}
@@ -1603,7 +1603,6 @@ class BIMProperties(PropertyGroup):
presentation_layers: CollectionProperty(name="Presentation Layers", type=PresentationLayer) presentation_layers: CollectionProperty(name="Presentation Layers", type=PresentationLayer)
class BCFProperties(PropertyGroup): class BCFProperties(PropertyGroup):
bcf_file: StringProperty(default="", name="BCF File") bcf_file: StringProperty(default="", name="BCF File")
topics: CollectionProperty(name="BCF Topics", type=BcfTopic) topics: CollectionProperty(name="BCF Topics", type=BcfTopic)