To configure item properties you can get a structure that handles item parameters, change its fields and set it to apply changes. But some types of items (graphics, for example) doesn't have an appropriate structure to change items. There is a common way to change any property.
You can set any properties of any item by using SetItemProperties method. You should specify a property that you want to change in this method. Here is a description how to get correct property name:
Character Generator item has XML description. For example, rectangle graphics item has:
<cg-item id='graphics-000'> <graphics type='rect' round-corners='0.5' color-angle='45' sides='7' star-inset='0.' outline='3.' outline-color='White' color='Red(220)-Yellow(100)-Green(180)'/> <cg-props pos-x='36' pos-y='24' show='yes' move-type='accel-both' alpha='255' bg-color='Black(0)' pixel-ar='0.' play-mode='loop' interlace='auto' scale='fit-ar' align='top-left' width='214' height='256' pause='no' edges-smooth='0'> <indent left='0' right='0' top='0' bottom='0' use-for-bg='no'/> <group-indent left='0' right='0' top='0' bottom='0'/> </cg-props> </cg-item>
To change the graphics filling color you should specify the color property. This property is in <graphics> XML node. So the full name of the color property is 'graphics::color':
string graphicsItemId = "myGraphicsItem"; string propertyName = "graphics::color"; string propertyValue = "Blue"; int timeForChange = 1000; string changeType = ""; myCharGen.SetItemProperties(graphicsItemId, propertyName, propertyValue, changeType, timeForChange);
You can specify a time for applying changes with the timeForChange parameter. A value of this property is in milliseconds. The changes will be implemented as a transition for this time. Also, you can specify a delay before implementing the changes. To do it you should set "wait" as changeType, for example with "wait=1000" the changes will be implemented with a 1-second delay.
Here is a result of the above code:
If the property is deeper in XML then you should use full path from the highest XML level, except <cg-item>. For example, to change left indent property, that is in <indent> node of <cg-props>, you should use 'cg-props::indent::left' in SetItemProperties method.
So to set any property for any item you should get XML description of the item with:
string itemID = "graphics-000"; string itemXMLconfiguration; myCharGen.GetItemProperties(itemID, "", out itemXMLconfiguration);
find required property and set it with SetItemProperties method.