-
-
Notifications
You must be signed in to change notification settings - Fork 5
GetSubfixture
Anthony Headley edited this page May 12, 2020
·
2 revisions
GetSubfixture(int:subfixture_index) : subfixture_object
Returns the SubFixture data object for the given index. The SubFixture index is a value between 1 and the GetSubfixtureCount(). Also a subfixture_index of 0 always returns the Universal Fixture.
Name | Type | Description | Optional |
---|---|---|---|
subfixture_index | int | an index between 0 and GetSubfixtureCount() |
Type | Description |
---|---|
subfixture_object | This data object represents the SubFixture Data or nil if the selected subfixture_index does not exist More details on Subfixture Object |
local name = GetSubfixture(0).name
name = GetSubfixture(0)["name"]
Echo(name) -- both above methouds result in "Univ"
local x = 31 -- index 31 is an Alienpix FID 101
local fid = GetSubfixture(x).FID
Echo(GetSubfixture(x):GetClass()) -- "Fixture"
Echo(fid) -- 101
Echo(#GetSubfixture(x):Children()) -- 1 - The root fixture has 1 child
local level1 = GetSubfixture(x):Children()[1] -- Grab the first instance
Echo(level1.Name) -- SubFixture 1
Echo(level1:GetClass()) -- SubFixture
local level2 = level1:Children() -- Grab the children of sub fixture 1
Echo(#level2) -- 6
Echo(level2[3].Name) -- SubFixture 3