Small presentation layers UI fixes

This commit is contained in:
Andrej730
2024-01-30 11:34:09 +05:00
parent 5351966430
commit 8eab7f155e
2 changed files with 4 additions and 0 deletions
@@ -40,6 +40,8 @@ class LayersData:
@classmethod
def active_layers(cls):
if not bpy.context.active_object:
return []
data = bpy.context.active_object.data
if not data:
return []
@@ -137,6 +137,7 @@ class RemovePresentationLayer(bpy.types.Operator):
class AssignPresentationLayer(bpy.types.Operator):
bl_idname = "bim.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"}
item: bpy.props.StringProperty()
layer: bpy.props.IntProperty()
@@ -158,6 +159,7 @@ class AssignPresentationLayer(bpy.types.Operator):
class UnassignPresentationLayer(bpy.types.Operator):
bl_idname = "bim.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"}
item: bpy.props.StringProperty()
layer: bpy.props.IntProperty()