Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8547

Change Brep opacity, color, etc. in C++?

$
0
0

@NathanM1994 wrote:

Hi,

Within a custom CRhinoBrepObject I need to change its transparency inside Draw(). I’ve tried something like this:

        CDisplayPipelineMaterial material = dp.DisplayAttrs()->m_pMaterial->m_FrontMaterial;
	material.m_FrontMaterial.SetTransparency(1.0);
        dp.DrawShadedBrep(*const_cast<ON_Brep*>(Brep()), &material);

However my Brep keeps being opaque:

Though something must be well done, when I translate it looks transparent:

Seems like Rhino will always draw my object on top depth with the opaque default color? How can I manipulate it?

Thx
Nathan

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 8547

Trending Articles