VS:SetTextureRefN: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
(add texture ref flags)
Line 46: Line 46:


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>([[User_talk:Ptr|Ptr]], 2020 Sep. 8):
<remark>
 
[[User:CBM-c-| _c_]], 2021.02.21:
This actually creates the part if it wasn't there before.
 
textureRef:
* index = texture index
* 0 = inherit 
* -1 = Class Texture 
* -2 = None 
 
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
 
 
 
([[User_talk:Ptr|Ptr]], 2020 Sep. 8):
<code lang="py">
<code lang="py">
vs.SetTextureRefN(obj, textureRef, texPartID, texLayerID)
vs.SetTextureRefN(obj, textureRef, texPartID, texLayerID)
Line 54: Line 95:
<line>texPartID: 3 = overall part</line>
<line>texPartID: 3 = overall part</line>
<line>texLayerID: 0 for no decals</line>
<line>texLayerID: 0 for no decals</line>
</remark>
</remark>



Revision as of 09:00, 21 February 2021

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

Description

Sets the texture reference for a specified object

PROCEDURE SetTextureRefN(
obj :HANDLE;
textureRef :LONGINT;
texPartID :LONGINT;
texLayerID :LONGINT);
def vs.SetTextureRefN(obj, textureRef, texPartID, texLayerID):
    return None

Parameters

obj HANDLE
textureRef LONGINT
texPartID LONGINT
texLayerID LONGINT 0 for base, >0 for decals

Remarks

_c_, 2021.02.21:

This actually creates the part if it wasn't there before.

textureRef:

  • index = texture index
  • 0 = inherit
  • -1 = Class Texture
  • -2 = None

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


(Ptr, 2020 Sep. 8):

vs.SetTextureRefN(obj, textureRef, texPartID, texLayerID)

<lineList ident=1>

textureRef: texture index, -1 for by class texPartID: 3 = overall part texLayerID: 0 for no decals

Version

Availability: from Vectorworks 2010