VS:GetTextureSpace: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
(add comment) |
||
Line 37: | Line 37: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<remark> | <remark> | ||
([[User:Orso.b.schmid|Orso]], 2018 Dec. 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.</remark> | 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.</remark> | ||
Line 75: | Line 78: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<version> | <version> | ||
Availability: from | Availability: from VectorWorks 8.0 | ||
</version> | </version> |
Revision as of 10:14, 29 December 2017
.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
(Orso, 2018 Dec. 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