mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:02:29 +00:00
assign/unassign process - add descriptions
This commit is contained in:
@@ -510,6 +510,10 @@ class AssignProcess(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
related_object_type: bpy.props.StringProperty()
|
related_object_type: bpy.props.StringProperty()
|
||||||
related_object: bpy.props.IntProperty()
|
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):
|
def _execute(self, context):
|
||||||
if self.related_object_type == "RESOURCE":
|
if self.related_object_type == "RESOURCE":
|
||||||
core.assign_resource(tool.Ifc, tool.Sequence, tool.Resource, task=tool.Ifc.get().by_id(self.task))
|
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()
|
related_object: bpy.props.IntProperty()
|
||||||
resource: 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):
|
def _execute(self, context):
|
||||||
if self.related_object_type == "RESOURCE":
|
if self.related_object_type == "RESOURCE":
|
||||||
core.unassign_resource(
|
core.unassign_resource(
|
||||||
|
|||||||
Reference in New Issue
Block a user