Difference between revisions of "PRIM TEXTURE"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{#if: {{LSL_Constants/PrimitiveParams}} }}{{LSL Constant |name=PRIM_TEXTURE |type=integer |value=17 |desc=Name of texture, as UUID or string |examples= |constants= |functions= {{LSL Defin...)
 
Line 1: Line 1:
{{#if:
<onlyinclude>{{#if:
{{LSL_Constants/PrimitiveParams}}
 
{{#vardefine:return|[&nbsp;{{HoverText|""|string texture}}, {{HoverLink|ZERO_VECTOR|{{LSL VR|0.0|0.0|0.0}} vector repeats}}, {{HoverLink|ZERO_VECTOR|{{LSL VR|0.0|0.0|0.0}} vector offsets}}, {{HoverText|0.0|float rotation_in_radians}}&nbsp;]}}
 
{{#vardefine:texture_const|{{LSL Const|PRIM_TEXTURE|integer|17|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the texture settings of a prim's face}}}}
 
{{#vardefine:p_rotation_in_radians_desc|angle in radians}}
{{#vardefine:p_repeats_desc|x and y range from 0.0 to 100, in 0.01 increments (z is ignored)}}
{{#vardefine:p_offsets_desc|x and y range from -1 to 1 (z is ignored)}}
 
{{LSL_Function/inventory|texture|uuid=true|type=texture|{{#ifeq:{{{1|}}}|get|no_caveat=true}}|full={{{remote|}}}}}
 
{{#vardefine:facetable|{{#var:facetable}}
{{!}}-
{{!}} [ {{#var:texture_const}} ]
{{!}} {{#var:return}} }}
 
}}</onlyinclude>{{#if:
 
{{#vardefine:caveats_set|{{#var:caveats}}}}
{{#vardefine:caveats|}}
 
{{LSL_Function/face|face|{{#var:color_const}}|!footer=*|return={{#var:return}}}}
 
}}{{LSL Constant
}}{{LSL Constant
|name=PRIM_TEXTURE
|name=PRIM_TEXTURE
|type=integer
|type=integer
|value=17
|value=17
|desc=Name of texture, as UUID or string
|desc=Used to get or set the texture settings of a prim's face.
|examples=
|examples=
|pa={{LSL Constant/List|i_front=[&#32;{{#var:texture_const}},&#32;|i_end=&nbsp;]
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]
====Caveats====
{{#var:caveats_set}}
|i1_type=integer|i1_name=face
|i2_type=string|i2_name=texture
|i3_type=vector|i3_name=repeats
|i4_type=vector|i4_name=offsets
|i5_type=float|i5_name=rotation_in_radians
}}
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([&nbsp;{{#var:texture_const}},&#32;|i_end=&nbsp;]);|
|r_front=Returns the list [&nbsp;|r_end=&nbsp;]
|text=
====Caveats====
{{#var:caveats}}
|i1_type=integer|i1_name=face
|r1_type=string|r1_name=texture
|r2_type=vector|r2_name=repeats
|r3_type=vector|r3_name=offsets
|r4_type=float|r4_name=rotation_in_radians
}}
|constants=
|constants=
{{LSL DefineRow||[[CHANGED_TEXTURE]]|}}
|functions=
|functions=
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}

Revision as of 15:45, 17 April 2008

Description

Constant: integer PRIM_TEXTURE = 17;

The integer constant PRIM_TEXTURE has the value 17

Used to get or set the texture settings of a prim's face.

[ PRIM_TEXTURE, integer face, string texture, vector repeats, vector offsets, float rotation_in_radians ]

[ PRIM_TEXTURE, integer face, string texture, vector repeats, vector offsets, float rotation_in_radians ]
• integer face face number or ALL_SIDES
• string texture a texture in the inventory of the prim this script is in or a UUID of a texture
• vector repeats x and y range from 0.0 to 100, in 0.01 increments (z is ignored)
• vector offsets x and y range from -1 to 1 (z is ignored)
• float rotation_in_radians angle in radians

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams

Caveats

  • If texture is missing from the prim's inventory and it is not a UUID or it is not a texture then an error is shouted on DEBUG_CHANNEL.
  • If texture is a UUID then there are no new asset permissions consequences for the object.
    • The resulting object develops no new usage restrictions that might have occurred if the asset had been placed in the prims inventory.

llGetPrimitiveParams([ PRIM_TEXTURE, integer face ]);

llGetPrimitiveParams([ PRIM_TEXTURE, integer face ]);

Returns the list [ string texture, vector repeats, vector offsets, float rotation_in_radians ]

• integer face face number or ALL_SIDES

• string texture a texture in the inventory of the prim this script is in or a UUID of a texture
• vector repeats x and y range from 0.0 to 100, in 0.01 increments (z is ignored)
• vector offsets x and y range from -1 to 1 (z is ignored)
• float rotation_in_radians angle in radians

Caveats

  • If face is ALL_SIDES then the function works on all sides.
  • If face indicates a face that does not exist the return is [ "", ZERO_VECTOR, ZERO_VECTOR, 0.0 ]

Caveats

  • If face is ALL_SIDES then the function works on all sides.
  • If face indicates a face that does not exist the return is [ "", ZERO_VECTOR, ZERO_VECTOR, 0.0 ]
All Issues ~ Search JIRA for related Bugs

Related Articles

Constants

•  CHANGED_TEXTURE

Functions

•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetPrimitiveParams

Events

•  changed

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_TEXTURE = 17;