Model.hm_attributeindexidentifier_byentityname#

Model.hm_attributeindexidentifier_byentityname(entity_type, entity_name, attribute_index)#

Returns the identifier flag of an indexed attribute on an entity.

Parameters:
  • entity_type (EntityFullType) – The type of entity to query.

  • entity_name (hwString) – The name of the entity.

  • attribute_index (int) – The index of the attribute owned by the queried entity (starting at 1).

Returns:

Example#

Get the attribute identifier of the attribute with index 3 on material with name “ mat1 “#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_attributeindexidentifier_byentityname(
    entity_type=ent.Material, entity_name="mat1", attribute_index=3
)

print("id", result.id)