Jump to content
Forum Maintenance - Thursday, June 21st 2018 - 4PM EST Read more... ×
JBenghiat

Accessing render options

Recommended Posts

Does anyone know how to use the constants in RenderOptionValues.h to read or write those options?  I want to make sure the user has "show shadows" turned on in OpenGL.

Share this post


Link to post

I don't think we have such functions to read and write the OpenGL options for each layer, but we are considering to add them.

Share this post


Link to post
On 5/29/2018 at 5:31 PM, Sangmin said:

I don't think we have such functions to read and write the OpenGL options for each layer, but we are considering to add them.

 

I've found that you can access settings through the data object specified by kOpenGLDataType, however the data structure doesn't quite match what one would think from the constant list in RenderOptionValues.h.

Share this post


Link to post

Do you need the "show shadows" (= true or false) in Vectorworks scripts?

Share this post


Link to post
1 hour ago, Sangmin said:

Do you need the "show shadows" (= true or false) in Vectorworks scripts?

 

Nope, just the SDK.

Share this post


Link to post

"kOpenGLDataType" is the right place to start. BTW, can you access all the source codes?

Plus, if I add a new SDK function for Vectorworks 2019, you can use it right away?

Or you need to wait until the next release?

Share this post


Link to post

My current project needs to support 2018, though assuming the data format hasn't changed for 2019, it would be easy to recreate the calls.  As a start, just adding the correct user data structs to RenderOptionValues.h would be really helpful.

Share this post


Link to post

If I add the following functions for Vectorworks 2019, will it be good enough?

gSDK->SetObjectVariable (layerHandle, kOpenGLCastShadow, value);
gSDK->GetObjectVariable (layerHandle, kOpenGLCastShadow, value);

 

The first parameter is for the viewport or layers. 

The second parameter is for the OpenGL options such as Textures, Colors, Anti-Aliasing, Draw Edges, Shadows and so on.

The third parameter contains the value. 


 

Share this post


Link to post

That would be useful, though the render options are stored per document, not per layer.  Passing either null or the document header would make more sense.

Share this post


Link to post

Okay! I will add one more parameter for the document header when I add those functions.

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×