Jump to content

Chris Chris

Member
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Chris Chris

  1. Hi Joshua, Thanks for the answer. The mesh itself always show up. The Image Prop is never appearing in the viewport or in the Debug List View, also without adding it to the container or with calling reset. Kind Regards, Chris
  2. Hello, I would like to add autorotate behaviour to my custom object in Vectorworks. This billboard effect rotates the object around the up-axis to always face the object towards the camera like the build-in Image Prop. https://app-help.vectorworks.net/2020/eng/index.htm#t=VW2020_Guide%2FTextures%2FCreating_image_prop_objects.htm A solution would be to create an ImageProp and attach the geometry inside it. I use a VWMeshCreator to pass the constructed mesh to Vectorworks. EObjectEvent XXX_EventSink::Recalculate() { VWParametricObj paramObj(fhObject); MCObjectHandle mcObject = gSDK->CreateImageProp( /*const TXString& propName*/ TXString("propName"), /*InternalIndex textureRef,*/ 0, /*WorldCoord height,*/ 100, /*WorldCoord width,*/ 100, /*bool enforceImageAspectRatio,*/ false, /*bool crossedPlanes,*/ false, /*bool createPlugin,*/ true, /*bool autoRotate,*/ true, /*bool createSymbol*/ true); gSDK->AddObjectToContainer(mcObject, fhObject); VWMeshCreator meshCreator; [...] const TMCObjectHandlesSTLArray& mcObjectArray = meshCreator.GetGeneratedMeshes(); gSDK->AddObjectToContainer(mcObjectArray[0], mcObject); } My question is why is the ImageProp not created and the geometry rotating? I am new to Vectorworks and spend some days to read through the docs and SDK. Kind Regards, Chris
×
×
  • Create New...