Styles in C API


#1

I’m trying to disable the profile edges using the C API. Here’s my code (I removed errors checking for simplicity)

SUStylesRef styles = SU_INVALID;
SUModelGetStyles(model, &styles);
SUStyleRef style = SU_INVALID;
SUStylesGetActiveStyle(styles, &style);
SUTypedValueRef profilesEnabled = SU_INVALID;
SUTypedValueCreate(&profilesEnabled);
SUTypedValueSetBool(profilesEnabled, false);
SUStyleSetProperty(style, SUStyleEdgesProfilesEnabled, profilesEnabled);

This doesn’t work, the generated .skp file has profiles enabled.

Am I missing something?


#2

I’m not sure about Styles. Could you use SURenderingOptionsSetValue?


#3

Indeed that works! Thanks a lot Jim

The options name is DrawSilhouettes by the way, not very consistent with the UI or the rest of the API.