Transparency issue in Unexploded sketchup models

#1

Hi,

I tried to access the material info of an unexploded sketchup model using C sdk, it doesn’t give any opacity values.
I exploded the model and then i could see opacity values and transparency.

I am using this api to get opacity values
SUMaterialGetOpacity(Material_m, &MaterialOpacity);

Any idea what’s the issue?

0 Likes

#2

It’s hard to tell without seeing the skp file…

From what I understand, to get Opacity values of a material, you first need to check if an Opacity value has been set:

SU_RESULT SUMaterialGetUseOpacity ( SUMaterialRef material, bool * use_opacity)
http://extensions.sketchup.com/developer_center/sketchup_c_api/sketchup/material_8h.html#a5ec103e21860b9646b06cb0e4f310349

But I am guessing that is not your problem?

0 Likes

#3

Issue is fixed. I was not using the opacity values properly.
Anyways, I used SUMaterialGetOpacity.

0 Likes

closed #4

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.

0 Likes