VS:GetTexMapBoolN: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
(expand info)
mNo edit summary
 
(4 intermediate revisions by one other user not shown)
Line 6: Line 6:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<desc>
<desc>
Get map info for specific part of object. partID is texture part, overall is 3. Selector: init:1, flip:2, repH:3, repV:4, long edge:5, worldZ:6, auto align:7</desc>
Get map info for specific part of object. partID is texture part, overall is 3.  
 
Selector:
: init: 1
: flip: 2
: repH: 3
: repV: 4
: long edge: 5
: worldZ: 6
: auto align: 7</desc>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
Line 46: Line 55:


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>([[User:Orso.b.schmid|Orso]], 2017 Dec. 29) The number of layers of a part can be fetched using [[VS:GetNumTexLayers]]. If a part is in usage it has one layer, so its texLayerID = 1. If the part has additional layers for decals the part's layers will be more than 1.
<remark>[[User:CBM-c-|_c_]] (2017.12.29) For the texPartID flags, check the [[VS:Function_Reference_Appendix#tex]]: ''Texture Part ID'' or more completely the SDK file RenderOptionsValues.h:
 
 
texPartID flags, check the [[VS:Function_Reference_Appendix]]: ''Texture Part ID'':
: 3: overall for any kind of object
: 3: overall for any kind of object
: 4:
: 4: top in extrudes/sweeps
: 5:
: 5: bottom in extrudes/sweeps
: 6:
: 6: sides in extrudes/sweeps
: 7: left in walls
: 7: left in walls
: 8: right in walls
: 8: right in walls
Line 67: Line 73:
: 18: bottom in roofs  
: 18: bottom in roofs  
: 19: sides in roofs
: 19: sides in roofs
: 20: fascia in roofs
: 20: gable in roofs
: 21: attic in roofs
: 21: fascia in roofs
: 22: soffit in roofs
: 22: attic in roofs
: 23:  
: 23: soffit in roofs
: 24: something unknown in roofs
: 24: dutch walls in roofs
: 25: something unknown in roofs
: 25: dormer walls in roofs
 
: 26: frame cap in curtain walls
* An extrude will only respond to texPartID 3
: 27: panel face in curtain walls
* A roof face or a slab responds to texPartID 3 and 14-16
* A roof responds to texPartID 3, 17-22, 24-25, whereby I don't know what 24 and 25 are for roofs.
* A wall can respond to texPartID 3 up to 15, whereby I don't know what 14 and 15 are for walls.
</remark>
</remark>


Line 85: Line 88:
VAR
VAR
obj: HANDLE;
obj: HANDLE;
texPartID : INTEGER;
BEGIN
BEGIN
obj := FSActLayer;
obj := FSActLayer;
texPartID := 3; { overall }
IF (obj <> NIL) THEN
IF (obj <> NIL) THEN
AlrtDialog(Concat('Is the last layer of the overall part auto-aligned?', Chr(13),
AlrtDialog(Concat(
GetTexMapBoolN(obj, texPartID, GetNumTexLayers(obj, texPartID), 7) { flag 7 = Auto-align }
'Is the overall part auto-aligned?', Chr(13),
GetTexMapBoolN(obj, 3, 0, 7) { flag 7 = Auto-align }
))
))
ELSE
ELSE
AlrtDialog('Please select a textured object');  
AlrtDialog('Please select an object');  
END;
END;
RUN(TEST)</code>;
RUN(TEST)</code>;

Latest revision as of 07:17, 9 December 2021

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

Description

Get map info for specific part of object. partID is texture part, overall is 3.

Selector:

init: 1
flip: 2
repH: 3
repV: 4
long edge: 5
worldZ: 6
auto align: 7
FUNCTION GetTexMapBoolN(
obj :HANDLE;
texPartID :LONGINT;
texLayerID :LONGINT;
selector :INTEGER) : BOOLEAN;
def vs.GetTexMapBoolN(obj, texPartID, texLayerID, selector):
    return BOOLEAN

Parameters

obj HANDLE
texPartID LONGINT
texLayerID LONGINT 0 for base, >0 for decals
selector INTEGER

Remarks

_c_ (2017.12.29) For the texPartID flags, check the VS:Function_Reference_Appendix#tex: Texture Part ID or more completely the SDK file RenderOptionsValues.h:

3: overall for any kind of object
4: top in extrudes/sweeps
5: bottom in extrudes/sweeps
6: sides in extrudes/sweeps
7: left in walls
8: right in walls
9: start cap in walls
10: end cap in walls
11: top in walls
12: bottom in walls
13: holes in walls
14: top in roof faces/slabs
15: bottom in roof faces/slabs
16: sides in roof faces/slabs
17: top in roofs
18: bottom in roofs
19: sides in roofs
20: gable in roofs
21: fascia in roofs
22: attic in roofs
23: soffit in roofs
24: dutch walls in roofs
25: dormer walls in roofs
26: frame cap in curtain walls
27: panel face in curtain walls

Example

PROCEDURE TEST;
VAR
	obj: HANDLE;
	
BEGIN
	obj := FSActLayer;
	IF (obj <> NIL) THEN
		AlrtDialog(Concat(
			'Is the overall part auto-aligned?', Chr(13),
			GetTexMapBoolN(obj, 3, 0, 7) { flag 7 = Auto-align }
		))
	ELSE
		AlrtDialog('Please select an object'); 
END;
RUN(TEST)

;

Version

Availability: from Vectorworks 2010