Esempio n. 1
0
def iconImage():
    iconObject = objectControl.getFromScene(ICON_OBJECT_NAME, SCENE_NAME)

    # Get the first list of commands
    commands = getCommandsList()[0]
    if len(commands) == 0:
        # No commands to display icon for, make icon invisible
        iconObject.setVisible(False)

    else:
        iconObject.setVisible(True)

        filename = commandControl.icon(commands[0])
        # The path to the icon's image file
        path = logic.expandPath("//images/icons/" + filename)

        dynamicMaterial.switchMaterialsImage(path, ICON_OBJECT_NAME)
Esempio n. 2
0
def faceImage(unit):
	model = unit['model']

	path = logic.expandPath('//images/faces/' + model + '.png')
	
	dynamicMaterial.switchMaterialsImage(path, FACE_OBJECT_NAME)
Esempio n. 3
0
def alignmentIcon(align):
	filename = alignControl.icon(align)

	path = logic.expandPath('//images/icons/' + filename)
	
	dynamicMaterial.switchMaterialsImage(path, ALIGNMENT_ICON_OBJECT_NAME)