Hello!
Once again I am stumped at something I hope is just simple:
How can you read, or get, the currently selected individual RGB color values , and store them in variables? Thanks in advance!
Hello!
Once again I am stumped at something I hope is just simple:
How can you read, or get, the currently selected individual RGB color values , and store them in variables? Thanks in advance!
Just so you know, the reason the thing EZ linked to works is that in the color palette are three sliders: R, G, and B. This allows you to type in exact RGB values, and allows scripts to find the color.
Thank you, that is just what I needed.
Actually, I still had another question:
How would you create a specified stroke on an active 3D object without relying on any data from the last brush stroke? For example, to paint with a color in a given shape or direction with a press of a button.
I appreciate the input and patience.
You can do it several ways. If the “stroke” (the recorded movements of the mouse) is fairly short, you can use the [CanvasClick…] command. This lets you move the mouse from a starting point to a maximum of seven more places.
For example, [CanvasClick,100,100,200,200] would mean, “Move the mouse to 100, 100, then press and hold the left button, then drag to 200, 200.”
However, if you need it longer than eight points, you need a full stroke, such as you might find after a recording session. This will use the [CanvasStroke…] command. With this command you could use the previous stroke, or a recorded stroke. (You can record a stroke with the Stroke Palette.) I’m not sure whether or not you could write a stroke with variables.
Anyway, I hope this is the info you need, let me know if it isn’t.
If you need more strokes info take a look at these three links:
ZScript Lesson III
Zscript Lesson IV
Canvas Stroke Perameters