assign/unassign process - add descriptions

This commit is contained in:
Andrej730
2024-11-14 14:21:49 +05:00
parent 2be6afa411
commit 77bc704563
@@ -510,6 +510,10 @@ class AssignProcess(bpy.types.Operator, tool.Ifc.Operator):
related_object_type: bpy.props.StringProperty()
related_object: bpy.props.IntProperty()
@classmethod
def description(cls, context, properties):
return f"Assign selected {properties.related_object_type} to the selected task"
def _execute(self, context):
if self.related_object_type == "RESOURCE":
core.assign_resource(tool.Ifc, tool.Sequence, tool.Resource, task=tool.Ifc.get().by_id(self.task))
@@ -537,6 +541,10 @@ class UnassignProcess(bpy.types.Operator, tool.Ifc.Operator):
related_object: bpy.props.IntProperty()
resource: bpy.props.IntProperty()
@classmethod
def description(cls, context, properties):
return f"Unassign selected {properties.related_object_type} from the selected task"
def _execute(self, context):
if self.related_object_type == "RESOURCE":
core.unassign_resource(