Jump to content
Developer Wiki and Function Reference Links Read more... ×

Setting texture map

Recommended Posts

I'm having trouble seeing a VWObject's texture mapping.  The code below properly assigns a texture, but the mapping remains unchanged. Is anyone mapping textures successfully with SetTextureMappingInfo()?


void ApplyTextureToObject(VWFC::VWObjects::VWObject &inObject, const double &mf)
    inObject.SetTexture(fTextureID, kTexturePart_Overall);
    TextureMappingInfoSDK txtrMap;
    txtrMap.f2DScale = mf;
    txtrMap.fParamSpaceKind = kParamSpaceKind_Plane;
    inObject.SetTextureMappingInfo(kTexturePart_Overall, txtrMap);


Share this post

Link to post
Posted (edited)

Hi, Joshua(@JBenghiat)


I'm also trying the texture mapping and not going anywhere 💀

Did you finally manage to set up the texture mapping?




Edited by Carles Olle

Share this post

Link to post

Yes, add this line after defining the texture mapping info variable:

inObject.GetTextureMappingInfo(kTexturePart_Overall, txtrMap);

This makes sure the structure is properly initialized for the object type.

  • Like 1

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


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.