Hi all,
I have created my custom color palette over the Document Color List and a serie of vector objects inside a group. Now, what I would like to do is randomly apply specifically those colors from that palette to the objects inside the group.
This could be really helpful for archviz where we can show a "live" preview to customers on different colour options for facades for example if there is a random seed value.
Cheers,
Juan
Random Colors from palette
-
- Mitglied
- Beiträge: 614
- Registriert: Do 06 Okt 2011 08:08
Random Colors from palette
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
-
- Entwickler
- Beiträge: 4176
- Registriert: Di 19 Nov 2002 15:49
Re: Random Colors from palette
The attached script should do this on Windows. Either execute it from Explorer or add it to "Filter > Scripts" by copying it to "%appdata%/PhotoLine/Automation" (create the "Automation" folder, if it doesn't exist yet).Juan hat geschrieben: ↑Mo 25 Mär 2019 14:19I have created my custom color palette over the Document Color List and a serie of vector objects inside a group. Now, what I would like to do is randomly apply specifically those colors from that palette to the objects inside the group.
This could be really helpful for archviz where we can show a "live" preview to customers on different colour options for facades for example if there is a random seed value.
You should use this script in combination with the latest beta version of PhotoLine (21.40B11), because scripting is constantly enhanced.
Martin
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
-
- Mitglied
- Beiträge: 614
- Registriert: Do 06 Okt 2011 08:08
Re: Random Colors from palette
It works perfect, thank you so much.Martin Huber hat geschrieben: ↑Mo 25 Mär 2019 17:59 The attached script should do this on Windows. Either execute it from Explorer or add it to "Filter > Scripts" by copying it to "%appdata%/PhotoLine/Automation" (create the "Automation" folder, if it doesn't exist yet).
You should use this script in combination with the latest beta version of PhotoLine (21.40B11), because scripting is constantly enhanced.
Martin
ApplyRandomColorsToGroup.vbs.zip
In script, can we make a popup window where I can have a button to regenerate the randomness, instead of calling the script every time?
Cheers,
Juan
-
- Mitglied
- Beiträge: 614
- Registriert: Do 06 Okt 2011 08:08
Re: Random Colors from palette
I'm sorry to keep with asking about this, but would it be possible to add randomly only some selected colours from the Document list?
Juan
Cheers,Juan
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
-
- Entwickler
- Beiträge: 4176
- Registriert: Di 19 Nov 2002 15:49
Re: Random Colors from palette
A script can't show non-modal dialogs. If you need to apply it often, you could assign a shortcut to the script.
A script can't query the selected colors, but it is possible to show an input dialog. The attached script does that. By entering "2 4" the colors from your example will be used.
Martin
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
-
- Mitglied
- Beiträge: 614
- Registriert: Do 06 Okt 2011 08:08
Re: Random Colors from palette
That is a good suggestion, thanks.Martin Huber hat geschrieben: ↑Mi 27 Mär 2019 10:51 A script can't show non-modal dialogs. If you need to apply it often, you could assign a shortcut to the script.
Excellent, now it is perfect. I just wish I could know how to code, but my knowledge is bellow zeroMartin Huber hat geschrieben: ↑Mi 27 Mär 2019 10:51 A script can't query the selected colors, but it is possible to show an input dialog. The attached script does that. By entering "2 4" the colors from your example will be used.
Thank you again,
Juan