THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/04/2010 at 10:53, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R10+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Howdy,
I need to get the color from these world preferences:
In R9.0 through R9.6, those are available with GetWorldContainer().GetVector() and passing either WPREF_ACTIVEPOLYBOX_COL or WPREF_ACTIVEPOLYCHILDBOX_COL as a parameter. This is done in a MessageData() polling for EVMSG_CHANGE, and then storing the colors in global variables for quicker access later when the Draw() function is called for my joint object.
But from R10 through R11.5, those defines are no where to be found in the api.
I've been getting around this by adding a couple of custom defines in my own header:
// defines for compatibility
#define CD_WPREF_ACTIVEPOLYBOX_COL 10052 // VECTOR
#define CD_WPREF_ACTIVEPOLYCHILDBOX_COL 10053 // VECTOR
...which are simply copied from R9 and renamed, and that seems to work, I'm guessing because those containers are still active. But I'm wondering if it is OK to do that and if that could cause any problems?
Adios,
Cactus Dan