mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 22:16:41 +00:00
Small presentation layers UI fixes
This commit is contained in:
@@ -40,6 +40,8 @@ class LayersData:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def active_layers(cls):
|
def active_layers(cls):
|
||||||
|
if not bpy.context.active_object:
|
||||||
|
return []
|
||||||
data = bpy.context.active_object.data
|
data = bpy.context.active_object.data
|
||||||
if not data:
|
if not data:
|
||||||
return []
|
return []
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ class RemovePresentationLayer(bpy.types.Operator):
|
|||||||
class AssignPresentationLayer(bpy.types.Operator):
|
class AssignPresentationLayer(bpy.types.Operator):
|
||||||
bl_idname = "bim.assign_presentation_layer"
|
bl_idname = "bim.assign_presentation_layer"
|
||||||
bl_label = "Assign Presentation Layer"
|
bl_label = "Assign Presentation Layer"
|
||||||
|
bl_description = "Assign presentation layer to the active representation of the active object"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
item: bpy.props.StringProperty()
|
item: bpy.props.StringProperty()
|
||||||
layer: bpy.props.IntProperty()
|
layer: bpy.props.IntProperty()
|
||||||
@@ -158,6 +159,7 @@ class AssignPresentationLayer(bpy.types.Operator):
|
|||||||
class UnassignPresentationLayer(bpy.types.Operator):
|
class UnassignPresentationLayer(bpy.types.Operator):
|
||||||
bl_idname = "bim.unassign_presentation_layer"
|
bl_idname = "bim.unassign_presentation_layer"
|
||||||
bl_label = "Unassign Presentation Layer"
|
bl_label = "Unassign Presentation Layer"
|
||||||
|
bl_description = "Unassign presentation layer from the active representation of the active object"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
item: bpy.props.StringProperty()
|
item: bpy.props.StringProperty()
|
||||||
layer: bpy.props.IntProperty()
|
layer: bpy.props.IntProperty()
|
||||||
|
|||||||
Reference in New Issue
Block a user