Adjust Colors Script
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 10264
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
I'm not pushing anyone, just writing about possible solutions.mkelley wrote:I'll let Wes deal with the issue of applying this to anything more than the selected layer, if he wants. Right now I just don't have the time to work on something that I'd never use (because of my workflow).
I tried to say that I rediscovered it.mkelley wrote:The mouse wheel thing is in there -- I'm guessing what you are saying is that you noticed it. For the others, you can turn the wheel of the mouse and it will increment and decrement the number in the field you have selected (I assume it works with negative numbers too, although I haven't yet tried it).
Thank you for new version.

Take your time

Good to know Layer Include/Exclude thing is doable(?).
Good night folks, afterhours here.
--
- synthsin75
- Posts: 10264
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
That's me.Take your time Wes (Wesley?).
Good to know Layer Include/Exclude thing is doable(?).

There is more doable with the current scripting than any of us are likely to make use of. But of course we still ask for more scripting features. Go figure, we want to mess with the few things not accessible.

Glad it could help, D.K. I know I'll be using it a lot.
I'm still working on having presets -- got sidetracked trying to deal with styles, but apparently Mike never did add that to the API. The only real thing you can do with a style is copy it from one shape to another. So if folks are using styles this won't be of any use (and that's a bummer).
I was thinking I might even be able to disable all the styles in a doc, and while you can do that by manipulating the file itself there just isn't any sort of Style access at all via scripting. And given that Mike will be releasing another version (soon?) I don't think I'll worry about this for now.
And, truth be told, I've kind of stopped using them due to the oh so many limitations (things which, if there were script access, could easily be fixed). With a script like mine there really isn't any advantage to a style at all -- indeed, I could easily emulate styles (and do it in a much better manner). Once again -- we'll wait and see what Mike has to offer.
In any case, I'll post this last version (which also warns about using it on frame 0 -- you can still do it if you say yes, but otherwise it keeps you from screwing up your construction colors) and if anyone has any ideas I'll be glad to consider them but for my purposes it will be finished.
I'm still working on having presets -- got sidetracked trying to deal with styles, but apparently Mike never did add that to the API. The only real thing you can do with a style is copy it from one shape to another. So if folks are using styles this won't be of any use (and that's a bummer).
I was thinking I might even be able to disable all the styles in a doc, and while you can do that by manipulating the file itself there just isn't any sort of Style access at all via scripting. And given that Mike will be releasing another version (soon?) I don't think I'll worry about this for now.
And, truth be told, I've kind of stopped using them due to the oh so many limitations (things which, if there were script access, could easily be fixed). With a script like mine there really isn't any advantage to a style at all -- indeed, I could easily emulate styles (and do it in a much better manner). Once again -- we'll wait and see what Mike has to offer.
In any case, I'll post this last version (which also warns about using it on frame 0 -- you can still do it if you say yes, but otherwise it keeps you from screwing up your construction colors) and if anyone has any ideas I'll be glad to consider them but for my purposes it will be finished.
I've found setting the hue and saturation to say 5 then just hitting apply repeatedly will keep generating tons of background colour combinations. Colours are not my strong point so this script, in my book, is just fantastic! Thanks again.
Oh one thing....i'm not sure if the brightness has a bug but sometimes it just wont apply. I have to set it to -100 to get it to do anything but then it seems to come good.
Cheers
D.K
Oh one thing....i'm not sure if the brightness has a bug but sometimes it just wont apply. I have to set it to -100 to get it to do anything but then it seems to come good.
Cheers
D.K
D.K.
I hate intermittent bugs, but I'll see if I can find out what might be affecting brightness (usually boundary conditions -- programmers *hate* boundary conditions :>).
I just uploaded one more version you might want to try -- not a huge change per se, but one that might work for you extremely well. I added a "randomize" checkbox.
What's really cool is to create, oh, ten or twenty objects all the same color and then start randomizing the hues and saturations. Or, for your monochrome stuff, just add 100 blue and randomize that addition.
It works by taking the limit entered as the upper or lower amount (depending on whether you enter a positive or negative number) and then 0 as the upper or lower -- so with this iteration at least you can't generate randoms that cross the 0 boundary (see? Boundary conditions again :>). If anyone wants I can probably change this, but it seemed so very elegant to just have the one switch I didn't want to get too complicated here.
I'm having fun just setting keys and letting the colors mix and match as you add various random color combinations -- way too much fun for this late at night (need to go to bed now).
(Note: There's a tiny bug that sometimes causes the randomize switch to get turned on after a normal apply. I'll fix this but I wanted to get it out for people to play with first, and it's no show stopper -- just hit reset).
I hate intermittent bugs, but I'll see if I can find out what might be affecting brightness (usually boundary conditions -- programmers *hate* boundary conditions :>).
I just uploaded one more version you might want to try -- not a huge change per se, but one that might work for you extremely well. I added a "randomize" checkbox.
What's really cool is to create, oh, ten or twenty objects all the same color and then start randomizing the hues and saturations. Or, for your monochrome stuff, just add 100 blue and randomize that addition.
It works by taking the limit entered as the upper or lower amount (depending on whether you enter a positive or negative number) and then 0 as the upper or lower -- so with this iteration at least you can't generate randoms that cross the 0 boundary (see? Boundary conditions again :>). If anyone wants I can probably change this, but it seemed so very elegant to just have the one switch I didn't want to get too complicated here.
I'm having fun just setting keys and letting the colors mix and match as you add various random color combinations -- way too much fun for this late at night (need to go to bed now).
(Note: There's a tiny bug that sometimes causes the randomize switch to get turned on after a normal apply. I'll fix this but I wanted to get it out for people to play with first, and it's no show stopper -- just hit reset).
It's very fun to keep shifting colors -- there are so many things you can do with it, from simply varying your foliage or bricks on a building, to creating an entire background color scheme.
I've posted one last small fix to version 2.0 (so it's now 2.1) -- it corrects a bug where if you added a value to a hue (either on force or randomly) that resulted in the hue being 360 it would turn the color to black (NOT a desired behavior). Once again, boundary conditions -- my HSB to RGB routine did not handle 360 as a hue properly.
Anyway, it's fixed and I would recommend anyone using this script to make sure they have version 2.1. For now, until I add presets, that's going to be it (and it may be a while before I add presets, as I have a lot on my plate).
I've posted one last small fix to version 2.0 (so it's now 2.1) -- it corrects a bug where if you added a value to a hue (either on force or randomly) that resulted in the hue being 360 it would turn the color to black (NOT a desired behavior). Once again, boundary conditions -- my HSB to RGB routine did not handle 360 as a hue properly.
Anyway, it's fixed and I would recommend anyone using this script to make sure they have version 2.1. For now, until I add presets, that's going to be it (and it may be a while before I add presets, as I have a lot on my plate).
- Víctor Paredes
- Site Admin
- Posts: 5814
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
- Víctor Paredes
- Site Admin
- Posts: 5814
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
- synthsin75
- Posts: 10264
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact: