IXpsOMPackageWriter3D::AddModelTexture method

Creates a new 3D model texture from the specified texture part and stream.

Syntax

HRESULT AddModelTexture(
  IOpcPartUri *texturePartName,
  IStream     *textureData
);

Parameters

texturePartName

The Open Package Convention (OPC) name of the texture part. This part is added to the package and becomes a relationship target of the model part.

textureData

A readable stream which holds 3D model texture. When calling this method, you must provide PNG or JPEG data.

Return value

Returns the appropriate HRESULT error code.

Remarks

Each time this method is called, it creates a new part with a specified name, content and hardcoded content type “application/vnd.ms-package.3dmanufacturing-3dmodeltexture”. That part is linked from the model part with relationship type “http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodeltexture”.

Requirements

   
Minimum supported client Windows 8.1 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 R2 [desktop apps | UWP apps]
Target Platform Windows
Header xpsobjectmodel_2.h

See also

IXpsOMPackageWriter3D