Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

What's the benefit of defining your UI with a string?

$
0
0

I see a lot of scripts that define their UI in a string and then add it to the panel, like this:

 

                    var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "My Panel Name", [0, 0, 300, 300]);

 

                    res="group{orientation:'column', alignment:['fill', 'fill'], alignChildren:['fill', 'fill'],\

                              // Then a whole bunch of groups of tabs

                    }"

 

                    //Add resource string to panel

                    myPanel.grp = myPanel.add(res);

 

What benefit does this give you compared to defining each group / tab / etc as a variable and using standard scripting?


Viewing all articles
Browse latest Browse all 2143

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>