VCOM:VectorWorks:ISDK::ReadMaterialImageFile: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
(No difference)
|
Latest revision as of 15:05, 12 August 2013
.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference
Description
namespace VectorWorks
Member of VCOM:VectorWorks:ISDK
Reads an image file and creates a material object.
virtual MCObjectHandle VCOM_CALLTYPE ReadMaterialImageFile(
IFileIdentifier* pFileID) = 0;
Parameters
pFileID IFileIdentifier* File identifier to the file that is to be created with the image.
Return Value
Returns MCObjectHandle to the created paint object node, NULL if failed.
Remarks
Using this function requires manual creation of the material:
MCObjectHandle hPaint = gSDK->ReadMaterialImageFile( pFileID ); if ( hPaint ) { MCObjectHandle hMaterial = gSDK->CreateTexture(); gSDK->AddAfterSwapObject( hMaterial ); MCObjectHandle hTexBitmap = gSDK->CreateTextureBitmapFromPaintNode( hPaint ); MCObjectHandle hSharedRecord = gSDK->CreateShaderRecord( hMaterial, 1 /*color*/, 15 /*kWrappedImageColor*/ ); gSDK->AttachAuxObject( hTexBitmap, hSharedRecord ); }
Version
Availability: from Vectorworks 2009