VS:ResolveByClassTextureRef
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Function ResolveByClassTextureRef returns the internal index, or name, of the texture assigned to the referenced object.
Primary, secondary, or tertiary texture assignments can be returned for objects that support multiple textures, such as roofs or walls. For objects that do not support multiple textures, pass 0 to the partID parameter.
Texture | Index Value |
---|---|
Primary | 0 |
Secondary | 1 |
Tertiary | 2 |
FUNCTION ResolveByClassTextureRef(
obj :HANDLE;
partID :INTEGER) : LONGINT;
def vs.ResolveByClassTextureRef(obj, partID): return LONGINT
Parameters
obj HANDLE Handle to object. partID INTEGER Primary, secondary, or tertiary texture ID to be returned.
Remarks
If the texture ref for an object is set to -1, it will use the texture of its class. This routine will look up the object's class and return the class' texture ref.
Example
textureID := ResolveByClassTextureRef(handleToObject, 0);
Version
Availability: from VectorWorks 8.0
See Also
VS Functions:
VS:SetTextureRef | VS:GetTextureRef
VS Functions:
[[VS:SetTextureRef]]
| [[VS:GetTextureRef]]