how to get "enable in renderer" option in C++

how to get "enable in renderer" option in C++

xiesansi
Enthusiast Enthusiast
644 Views
3 Replies
Message 1 of 4

how to get "enable in renderer" option in C++

xiesansi
Enthusiast
Enthusiast

Hi,

 

I was trying to get "Enable In Renderer" value in C++.

 

I tried 

node->Renderable()

but it returns 1 all the time whether I check this box or not.

 

Should I use some other method?

 

Thank you!

 

xiesansi_0-1651822267727.png

 

0 Likes
Accepted solutions (1)
645 Views
3 Replies
Replies (3)
Message 2 of 4

tagopinath
Enthusiast
Enthusiast

Hello,

 

If you are ok to use maxscript inside your C++ code, then you can try this.

 

$.baseobject.renderable

 

The result bool value will give you the status.

 

Regards,

Gopinath.

Message 3 of 4

Swordslayer
Advisor
Advisor
Accepted solution
0 Likes
Message 4 of 4

xiesansi
Enthusiast
Enthusiast

it works, actually, I made it by 

ObjectState os = node->EvalWorldState(0);
ShapeObject* shape = (ShapeObject*)os.obj;
auto renderable = shape->GetRenderable();
0 Likes