Jump to content
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...