i’m in the process of writing a sketchup importers for a 3d-application
SUResult res = SURenderingOptionsGetValue(rOpt, “FaceBackColor”, &val);
res is is always SU_ERROR_INVALID_OUTPUT
for any option-name i tried
what i need is EdgeColorMode, FaceColorMode, ForegroundColor, FaceBackColor, FaceFrontColor
every call with this strings returns SU_ERROR_INVALID_OUTPUT
int skp_getRenderParams(SUModelRef model, SkpRenderParams* pRenderParams)
{
SUResult res = SU_ERROR_NONE;
SURenderingOptionsRef rOpt = SU_INVALID;
SUModelGetRenderingOptions(model, &rOpt);
if(SUIsValid(rOpt))
{
SUTypedValueType valType = SUTypedValueType_Empty;
SUTypedValueRef val = SU_INVALID;
SUResult res = SURenderingOptionsGetValue(rOpt, "FaceBackColor", &val);
// here res = SU_ERROR_INVALID_OUTPUT
....
}
....
}
btw. i’m compiling using unicode char set
The key is assumed to be UTF-8 encoded, which is in this case,
just to make sure i used a unicode string L"FaceBackColor", converted it to utf-8…
same result: SU_ERROR_INVALID_OUTPUT
ah, yes, that did it !
seems rather weird to me, as i don’t have to create a face to get its data
but that’s how it works… and i’m not really familiar with COM