So if you offer your customers a simple, clickable solution to easily change the colour of a prop, a material, or even multiple props and materials in one go, you will be their best friend!
• The "Ambient_Color" is rarely used anyway (except for light emitting thingies).
• Same rarety is a "simple_color" node attached to that node.
• First, right-click with your mouse in the Material Room workspace and spawn a new "Simple Colour" node.
• Next (and that's the most important step) connect the "Simple_Color" node to the "Ambient_Color" input and set it's colour to black (1)
As you can see (and as intended), nothing happens.
• Now connect the "Simple_Color" node to the "Diffuse_Color" input (2)
• Run the "Set Colour" script and see how the node changes to the new colour (3)
(Click image for larger view)
ADDITIONAL NOTE:
In this most basic setup it can occur that the preview window won't show the new colour (even though Poser renders correct).
In this case just put a "Blender" node between the "Simple Colour" node and the "Diffuse_Color" input of the PoserSurface:
A model of a dice.
By default it's ebony-coloured, but I want different colours without having to provide an extra texture map per colour!
• Here is the basic setup of the texture:
(Click image for larger view)
NOTE: For less clutter I've omitted the bump and displacement nodes.
> Run the gadget with the "• Current Figure" selected
or
> "• All Figures" selected
(if you have to colour all the fingernails of the Bolshoi Ballet)
BUT REMEMBER:
Only props or figures with this specific texture setup will be affected. Anything else in the scene is simply ignored!
For distribution you must adhere a certain scheme for the storage of the files, because the library .cm2 and the adherent Python scripts and .html files need defined folder locations.
_______________________________________________________
If you look at the file structure in the archive of your download, you'll notice two main FOLDERS:
The runtime in this folder is to be included in your product.
It contains all the files needed for the "SetColour" gadget to work.
Your users will get the gadget as a standalone in the "Aleks Props" folder in Poser's "Props" library. You also can copy the four files:
The runtime in this folder is for your own use.
Basically it contains the same files and folders as the User's Runtime,
except that it has a different, much more detailed manual version and a couple more images for it.
You do not need to install the "Users Runtime" too as both runtimes provide the same functionality, apart from the different manuals.
_______________________________________________________
---> Both versions of the runtimes include these folders:
The "Data" and "Python" folders (and their contained files) must go to the exact runtime location, or the gadget won't work!
If you bundle your product for distribution, include these folders
(and their subfolders and files!)
in your runtime and place the:
SET! - Happy colouring!
Karina
Special Thanks to:
• "Perpetualrevision" who had the idea that lead to this gadget, and worked very hard to test my ill-fated first attempts.
• "an0malaus" for his coding efforts to make this MAC compatible, and for his patience with my meagre Python skills.
• "ironsoul" for his code examples and comments, and pointing us the right direction.
• "adp", "amethystpendant", "phdubrov", "shvrdavid", for their comments and feedback.