Difference between revisions of "Api.groups"

From Light Forge Wiki
Jump to: navigation, search
(Methods)
 
Line 25: Line 25:
  
 
Usage:
 
Usage:
  print(api.groups.getAttribute(api.attributeTypes.intensity, "0,0"))
+
<syntaxhighlight lang=python>
 +
print(api.groups.getAttribute(api.attributeTypes.intensity, "0,0"))
 +
</syntaxhighlight>
  
 
==getChildCount==
 
==getChildCount==
Line 34: Line 36:
  
 
Usage:
 
Usage:
  print(api.groups.getChildCount("0,0"))
+
<syntaxhighlight lang=python>
 +
print(api.groups.getChildCount("0,0"))
 +
</syntaxhighlight>
  
 
==getName==
 
==getName==
Line 43: Line 47:
  
 
Usage:
 
Usage:
  print(api.groups.getName("1,1"))
+
<syntaxhighlight lang=python>
 +
print(api.groups.getName("1,1"))
 +
</syntaxhighlight>
  
 
==getProfileName==
 
==getProfileName==
Line 51: Line 57:
  
 
Usage:
 
Usage:
  print(api.groups.getProfileName("1,0,3"))
+
<syntaxhighlight lang=python>
 +
print(api.groups.getProfileName("1,0,3"))
 +
</syntaxhighlight>
  
 
==getSelectedGroups==
 
==getSelectedGroups==
Line 59: Line 67:
  
 
Usage:
 
Usage:
  groupList = api.groups.getSelectedGroups()
+
<syntaxhighlight lang=python>
      for group in groupList:
+
groupList = api.groups.getSelectedGroups()
        print(group)
+
for group in groupList:
 +
print(group)
 +
</syntaxhighlight>
  
 
==releaseAttribute==
 
==releaseAttribute==
Line 69: Line 79:
  
 
Usage:
 
Usage:
  api.groups.releaseAttribute(api.attributeTypes.intensity, "0,1")
+
<syntaxhighlight lang=python>
 +
api.groups.releaseAttribute(api.attributeTypes.intensity, "0,1")
 +
</syntaxhighlight>
  
 
==releaseGroup==
 
==releaseGroup==
Line 77: Line 89:
  
 
Usage:
 
Usage:
  api.groups.releaseGroup("1,0")
+
<syntaxhighlight lang=python>
 +
api.groups.releaseGroup("1,0")
 +
</syntaxhighlight>
  
 
==setAttribute==
 
==setAttribute==
Line 85: Line 99:
  
 
Usage:
 
Usage:
  api.groups.setAttribute(api.attributeTypes.intensity, 65535, "1,1")
+
<syntaxhighlight lang=python>
 +
api.groups.setAttribute(api.attributeTypes.intensity, 65535, "1,1")
 +
</syntaxhighlight>
  
 
==selectGroup==
 
==selectGroup==
Line 93: Line 109:
  
 
Usage:
 
Usage:
  api.groups.selectGroup("0,1,1,2")
+
<syntaxhighlight lang=python>
 +
api.groups.selectGroup("0,1,1,2")
 +
</syntaxhighlight>
  
 
==deselectGroup==
 
==deselectGroup==
Line 101: Line 119:
  
 
Usage:
 
Usage:
  api.groups.deselectGroup("0,1,1,2")
+
<syntaxhighlight lang=python>
 +
api.groups.deselectGroup("0,1,1,2")
 +
</syntaxhighlight>
  
 
==clearSelection==
 
==clearSelection==
Line 109: Line 129:
  
 
Usage:
 
Usage:
  api.groups.clearSelection()
+
<syntaxhighlight lang=python>
 +
api.groups.clearSelection()
 +
</syntaxhighlight>

Latest revision as of 18:32, 9 May 2013

Contents

[edit] Information

[edit] Group Paths

A group path is a method for specifying a group in the group hierarchy. It is defined by use of a string.

An empty string ("") will specify the main group.

To specify a child of the main group you use that child's index number ex. "1"

Note: the indexes are 0 based so fixture 1 in a group is 0, fixture 2 is 1, etc.

To specify a child of a child, you use a comma, and the index of the next child you want to select ex. "1,3"

You can continue in this fashion throughout the group hierarchy. If you are looking at something nested deeply it may look like "1,3,0,2,4".

[edit] Methods

[edit] getAttribute

getAttribute(attribute As api.attributeTypes, groupPath As String) As Integer

Returns the value for a specified attribute on a specified group Returns -1 if the group can't be found

Usage:

print(api.groups.getAttribute(api.attributeTypes.intensity, "0,0"))

[edit] getChildCount

getChildCount(groupPath As String) As Integer

Returns the number of children in a group Returns -1 if the group can't be found

Usage:

print(api.groups.getChildCount("0,0"))

[edit] getName

getName(groupPath As String) As String

Returns the name of the requested group Returns -1 if the group can't be found

Usage:

print(api.groups.getName("1,1"))

[edit] getProfileName

getProfileName(groupPath As String) As String

Returns the name of the profile in use by the specified group. If this group is not a fixture and does not have a profile this function will return -1.

Usage:

print(api.groups.getProfileName("1,0,3"))

[edit] getSelectedGroups

getSelectedGroups() As String[]

Returns a list of group paths for all selected groups. If there are no groups selected then null is returned.

Usage:

groupList = api.groups.getSelectedGroups()
	for group in groupList:
		print(group)

[edit] releaseAttribute

releaseAttribute(attribute As api.attributeTypes, groupPath As String)

Releases the specified attribute on the specified group.

Usage:

api.groups.releaseAttribute(api.attributeTypes.intensity, "0,1")

[edit] releaseGroup

releaseGroup(groupPath As String)

Releases the all attributes on the specified group.

Usage:

api.groups.releaseGroup("1,0")

[edit] setAttribute

setAttribute(attribute As api.attributeTypes, value As Integer, groupPath As String)

Sets the value of an attribute on a specified group.

Usage:

api.groups.setAttribute(api.attributeTypes.intensity, 65535, "1,1")

[edit] selectGroup

selectGroup(groupPath As String)

Sets the given group as selected.

Usage:

api.groups.selectGroup("0,1,1,2")

[edit] deselectGroup

deselectGroup(groupPath As String)

Deselects the given group.

Usage:

api.groups.deselectGroup("0,1,1,2")

[edit] clearSelection

clearSelection()

Deselects all selected groups.

Usage:

api.groups.clearSelection()
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox