Compartir a través de


IXpsOMPackageWriter3D::AddModelTexture method

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

Syntax

HRESULT AddModelTexture(
  [in] IOpcPartUri *texturePartName,
  [in] IStream     *textureData
);

Parameters

  • texturePartName [in]
    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 [in]
    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 “https://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodeltexture”.

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Header

XpsObjectModel_2.h

IDL

XpsObjectModel_2.idl

See also

IXpsOMPackageWriter3D