VS:GetTextureSpace

From Vectorworks Developer
Revision as of 07:45, 30 December 2020 by CBM-c- (talk | contribs) (Transfer Orso to _c_)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Function GetTextureSpace returns a handle to the texture space attached to the referenced object(or object part).

FUNCTION GetTextureSpace(
obj :HANDLE;
partID :INTEGER) : HANDLE;
def vs.GetTextureSpace(obj, partID):
    return HANDLE

Parameters

obj HANDLE Handle to object.
partID INTEGER Part ID (pass 1 for non-supporting objects).

Remarks

_c_, (2018.12.29) Don't use this: it works but on walls will remove the mapping, tested on VW 2017, 2018. The new GetTexMapXXX routines accept a direct object handle, without needing the texture space handle.


Returns the texture space attached to this object, with the same part ID as partID. Walls may have three texture spaces attached to them if they have expanded textures, for example.

Example

VectorScript

PROCEDURE Example; 
VAR
XAxis, YAxis, ZAxis :REAL; 
hObj :HANDLE; 
BEGIN
hObj := GetTextureSpace(FSActLayer, 0); 
GetTexSpaceOrientU(hObj, XAxis, YAxis, ZAxis); 
Writeln('U', ' : ', XAxis, ' : ', YAxis, ' : ', ZAxis); 
GetTexSpaceOrientV(hObj, XAxis, YAxis, ZAxis); 
Writeln('V', ' : ', XAxis, ' : ', YAxis, ' : ', ZAxis); 
GetTexSpaceOrientW(hObj, XAxis, YAxis, ZAxis); 
Writeln('W', ' : ', XAxis, ' : ', YAxis, ' : ', ZAxis); 
END; 
RUN(Example); 

Python

def Example():
	hObj = vs.GetTextureSpace(vs.FSActLayer(), 0)
	XAxis, YAxis, ZAxis = vs.GetTexSpaceOrientU(hObj)
	vs.Message('U', ' : ', XAxis, ' : ', YAxis, ' : ', ZAxis)
	XAxis, YAxis, ZAxis = vs.GetTexSpaceOrientV(hObj) 
	vs.Message('V', ' : ', XAxis, ' : ', YAxis, ' : ', ZAxis)
	XAxis, YAxis, ZAxis = vs.GetTexSpaceOrientW(hObj)
	vs.Message('W', ' : ', XAxis, ' : ', YAxis, ' : ', ZAxis)

Example()

Version

Availability: from VectorWorks 8.0