RGB Values
Hi! I want to build a simple plugin that requires the use of RGB values, variables, and simple mathematical calculations.
I have experience in C-based programming languages, but have never programmed in C before. I'm beginning to pick up some of the basic concepts and understanding how everything works. For the past week, I've been reading though the SDK, and am finally to the point where I am ready to start writing some code. I've changed my skeleton example to the name of my plugin, and am ready to go.
Here is my goal:
I would like to build a plugin, that, for each frame, adds the red, green, and blue values to the red, green, and blue values of the last frame, and divides that number by two.
Before I get started though, there's a few bits of knowledge that I need (that I can't seem to find in the SDK or any of these forums) and those are:
1) How do I access RGB values, and how do I assign them to a variable?
2) How to perform basic mathematical functions (addition and division)
3) Building off of the first question, how to create a variable, and assign a value to it. Do I use #define to do this?
If you have any other suggestions on how to optimize this plugin, and/or if there are better ways to do the simple tasks that I'm proposing to do, please let me know.
Thank you! Help is greatly appreciated!