Query available Layer Comps in a file
Moderators: Víctor Paredes, Belgarath, slowtiger
Query available Layer Comps in a file
Is there a way to get the list of Layer Comps that are in a file?
My opinions and comments do not represent those of my employer.
http://www.ernestpchan.com
http://www.zazzle.com/gopuggo
http://www.ernestpchan.com
http://www.zazzle.com/gopuggo
Re: Query available Layer Comps in a file
I haven't tested this code, but I believe it goes something like this...
Code: Select all
Doc = moho.document
for i in Doc:CountLayerComps()-1 do
Comp = Doc:GetLayerComp(i)
print(Comp:Name())
end
Re: Query available Layer Comps in a file
Eh, after seeing this was in the MohoDoc section in aslua.com I shoulda been able to figure this out.
I gotta get my head wrapped around lua/ASP's scripting doc to avoid such noob questions.
Thx dkwroot.
I gotta get my head wrapped around lua/ASP's scripting doc to avoid such noob questions.
Thx dkwroot.
My opinions and comments do not represent those of my employer.
http://www.ernestpchan.com
http://www.zazzle.com/gopuggo
http://www.ernestpchan.com
http://www.zazzle.com/gopuggo
Re: Query available Layer Comps in a file
Just in case others ask, this is the proper syntax.
Code: Select all
Doc = moho.document
for i = 0, Doc:CountLayerComps()-1 do
Comp = Doc:GetLayerComp(i)
print(Comp:Name())
end
My opinions and comments do not represent those of my employer.
http://www.ernestpchan.com
http://www.zazzle.com/gopuggo
http://www.ernestpchan.com
http://www.zazzle.com/gopuggo
- hayasidist
- Posts: 3513
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Query available Layer Comps in a file
Thanks guys -- ASLua updated with this info.