Page 1 of 2

working with external styles

Posted: Mon Aug 12, 2013 5:08 pm
by amanandink
Hey all

I have been doing alot of work with styles lately and I was just curious, is there a way to keep the styles files external, to I can update a text file say and it would update the styles colours in multiple scenes all accessing this file?

J

Re: working with external styles

Posted: Mon Aug 12, 2013 5:29 pm
by slowtiger
No, but when you import an AS object with applied styles, all the styles will be imported with it.

Re: working with external styles

Posted: Mon Aug 12, 2013 5:35 pm
by amanandink
yeah thats the issue, once I import the ASP object into a new scenes I have to manually update the styling in the scenes if the director wants to change the colour of the line. There must be a better way to work with styles in multiple scenes and a series. might be worth bringing up over in Lennys place.

J

Re: working with external styles

Posted: Mon Aug 12, 2013 6:44 pm
by slowtiger
I agree that this needs some major overhaul, especially since the importing leads to duplicate styles with the same name and I never know which one's the one to edit.

Re: working with external styles

Posted: Mon Aug 12, 2013 6:47 pm
by Danimal
This was brought up years ago and was a great idea then. I'm surprised no progress has been made in that direction as it would make global changes super simple and allow for more variation in animating (i.e., Bart not wearing that same outfit for 2 decades).

Re: working with external styles

Posted: Mon Aug 12, 2013 7:16 pm
by heyvern
I just had a brainstorm!

If you have a whole pile of documents with all the same named styles, and you had an external file with matching named styles, it should be relatively simple* to create a script to import a master style file to replace the style properties of the destination file. However, it would not be possible to do this globally for a bunch of documents. The master styles could not be "linked". You would have to import the modified styles for each document.

Still not that bad. So you edit styles in the master document or even in one of any document that uses the same named styles, then import that into another document to update those styles. I think I could even add a "style selection" in a script pop up. You could choose styles to import and replace or simply import styles.

*the term "Relatvely Simple" does not imply this is easy to do. It merely implies that it could be done and the process would be based on straight forward scripting features I have worked with before and am familiar with. It would still be a pain in the arse but cool as heck. I have been meaning to do this... I think the time is right. ;)

Re: working with external styles

Posted: Mon Aug 12, 2013 7:55 pm
by Danimal
The description sounds pretty simple, heyvern. For my addled brain, seeing it would be simpler though. No file that automatically imports, but can be done manually?

Re: working with external styles

Posted: Mon Aug 12, 2013 9:21 pm
by heyvern
Let's say you have a document open with "old" styles you need to update from another file. You would click the button or select the menu script and a pop up would allow you to select the file to import styles from. Then an additional pop would show a select list of the styles in the document that you could shift select and then import. The imported styles would update the styles in the open document.

It would be very simple and easy once you see it. :)

Image

Re: working with external styles

Posted: Mon Aug 12, 2013 9:25 pm
by heyvern
Oops... you can't do mulitselection in a script select list. So it wouldn't work exactly like the image but close enough. There would be two lists, click to transfer.

Re: working with external styles

Posted: Tue Aug 13, 2013 12:29 am
by Danimal
That does look downright easy, if not a little difficult on the back end.

Re: working with external styles

Posted: Tue Aug 13, 2013 6:06 am
by RichardU
It would be awesome to be able to merge styles as well. I do this too often using a text editor to search and replace in the. anme file.

Re: working with external styles

Posted: Tue Aug 13, 2013 8:37 am
by amanandink
emm Vern that script does sound interesting, and even replacing one style at a time would be useful. And I do agree with slowtiger, the duplicate styles are quite annoying sometimes. To be able to merge or automatically replace them might be of some use.

J

Re: working with external styles

Posted: Tue Aug 13, 2013 1:09 pm
by heyvern
Ah yes, the freaking duplicate styles. That drives me crazy. I also use a text editor and regex to replace the style references.
Updating styles won't be as effective without fixing duplicates. I will put that on the list of features.

Re: working with external styles

Posted: Tue Aug 13, 2013 3:03 pm
by heyvern
Awesome!

I never used that new scripting feature moho:LoadDocument() that was added a while ago. It's freaking COOL AS HECK! You can "open" another AS file in the background without closing the current document. Then the whole document is available to pull stuff out and add to the "actual" open document. Yeehaa! Got a partial prototype working fairly quickly but still a bunch to do.

I am actually thinking now that an "auto style updater" using "metadata" keys with a link to another document is possible. This would create an "auto update" of styles as requested by the OP. For auto updating without doing anything but open the file, It would have to be a layer script. You could simply include a "blank" layer in the document with the layer script in this layer that would activate the style updater every time the file is opened.

So, running the update styles script and linking to a master file would add a key to the document or group layer with a link to the master styles document. The layer script runs as soon as the file is loaded, and the styles would automatically be updated. An alternative would need updating using a button script. This might be better anyway if you don't want the automatic updating. Then you could just leave out the "blank" updating layer with layer script.

This is looking FREAKING cool! I am excited!

Re: working with external styles

Posted: Tue Aug 13, 2013 3:21 pm
by Lukas
Styles should really get their place in the library!