mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 18:26:25 +00:00
Fix missing return values in e5a59d0bea
This commit is contained in:
@@ -794,11 +794,11 @@ class EnableEditingMaterialStyle(bpy.types.Operator):
|
|||||||
|
|
||||||
# set already applied style and context if possible
|
# set already applied style and context if possible
|
||||||
if not 0 <= props.active_material_index < len(props.materials):
|
if not 0 <= props.active_material_index < len(props.materials):
|
||||||
return
|
return {"FINISHED"}
|
||||||
|
|
||||||
material = tool.Ifc.get().by_id(props.materials[props.active_material_index].ifc_definition_id)
|
material = tool.Ifc.get().by_id(props.materials[props.active_material_index].ifc_definition_id)
|
||||||
if not material.HasRepresentation:
|
if not material.HasRepresentation:
|
||||||
return
|
return {"FINISHED"}
|
||||||
|
|
||||||
rep = material.HasRepresentation[0].Representations[0] # IfcStyledRepresentation
|
rep = material.HasRepresentation[0].Representations[0] # IfcStyledRepresentation
|
||||||
props.contexts = str(rep.ContextOfItems.id())
|
props.contexts = str(rep.ContextOfItems.id())
|
||||||
|
|||||||
Reference in New Issue
Block a user