Exemple #1
0
void MeshInstancePropertyControl::OnComboIndexChanged(PropertyList *forList, const String &forKey, 
                                               int32 newItemIndex, const String &newItemKey)
{
	if(forKey[0] == '#')
    {
        int32 index = GetIndexFromKey(forKey);

        MeshInstanceNode *mesh = dynamic_cast<MeshInstanceNode *> (currentSceneNode);
        mesh->ReplaceMaterial(materials[newItemIndex], index);
        
        UpdateFieldsForCurrentNode();
    }

    NodesPropertyControl::OnComboIndexChanged(forList, forKey, newItemIndex, newItemKey);
}