ACAPI_​Attribute_​IsPropertyDefinitionValueEditable

Tells whether a property definition is editable for an attribute.

    bool  ACAPI_Attribute_IsPropertyDefinitionValueEditable (        
        const API_Attr_Head&      attrHead,
        const API_Guid&           propertyGuid
    );

 

Parameters

attrHead
[in] Header of the attribute. The attribute is identified by typeID and index
propertyGuid
[in] The property definition GUID to search for.

 

Return Values

true
The given property definition is editable for the attribute.
false
The given property definition is not editable for the attribute or invalid parameters.

Example

GSErrCode GetAvailablePropertyDefinitions (API_AttrTypeID attributeTypeID, short attributeIndex, GS::Array<API_PropertyDefinition>& availableProperties)
{
    GS::Array<API_PropertyDefinition> definitions;
    API_Attr_Head                     attributeHeader;

    BNZeroMemory (&attributeHeader, sizeof (API_Attr_Head));
    attributeHeader.typeID = attributeTypeID;
    attributeHeader.index = attributeIndex;
	
    GSErrCode error = ACAPI_Property_GetPropertyDefinitions (APINULLGuid, definitions);
    if (error == NoError) {
        for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
            if (ACAPI_Attribute_IsPropertyDefinitionAvailable (attributeHeader, definitions[i].guid)) {
                availableProperties.Push (definitions[i]);
            }
        }
    }
    return error;
}
        

Note: this example function is identical to calling ACAPI_Attribute_GetPropertyDefinitions, but that one is more efficient.

For more detailed examples, please see the Property_Test add-on.

 

Requirements

Version: [Not yet released]
Header: ACAPinc.h

 

See Also

Properties,
API Functions