Changing styles and effects
Posted: Fri Nov 11, 2005 11:39 pm
I am writing a script to recursively change colors throughout an existing moho document. It works great except where named styles and effects are concerned.
From other posts it appears that I can't touch the named styles at all through LUA. Is that 100% true or could I somehow access the "applied styles" list or otherwise copy a script generated style over the existing applied styles in a layer? I can definitely change the color of every shape in the document but if a named style is applied it overrides the color set by the script. Has anyone come up with a work around to modify named styles? I remember LM replying in another post that named styles are not accessible yet. How soon might that access be available? Seems like there are a number of others who would like to get at them too.
I can't find much at all on changing fill effects through scripting. I see SetSoftEdge and SetShading in M_Style but what I really want to do with the script is temporarily disable any effects that are present. Is the situation the same as with named styles in that they can't be manipulated via script?
I could even be happy if I could write out a new moho file that supresses writing of named styles and fill effects. When I reload the new file I would have all the styles and fill effects removed. That doesn't look possible either.
Does anyone have some suggestions or additional info? thanks!
From other posts it appears that I can't touch the named styles at all through LUA. Is that 100% true or could I somehow access the "applied styles" list or otherwise copy a script generated style over the existing applied styles in a layer? I can definitely change the color of every shape in the document but if a named style is applied it overrides the color set by the script. Has anyone come up with a work around to modify named styles? I remember LM replying in another post that named styles are not accessible yet. How soon might that access be available? Seems like there are a number of others who would like to get at them too.
I can't find much at all on changing fill effects through scripting. I see SetSoftEdge and SetShading in M_Style but what I really want to do with the script is temporarily disable any effects that are present. Is the situation the same as with named styles in that they can't be manipulated via script?
I could even be happy if I could write out a new moho file that supresses writing of named styles and fill effects. When I reload the new file I would have all the styles and fill effects removed. That doesn't look possible either.
Does anyone have some suggestions or additional info? thanks!