Jump to content
Developer Wiki and Function Reference Links ×

How to get a Texture Reference ID from Texture Name


Carles Olle

Recommended Posts

I'm sure this a silly question but I'm just new to VW Scripting.

I need to create an Image Prop in marionette. One of the parameters is the "texture" that will be used. Looking at the node definition script, this is supposed to be a Texture Reference ID.

I got the texture name but that does not seem to work as a input parameter for the "Image Prop" node; How to get a Texture Reference ID from Texture Name

Help will be appreciated.

Thanks

 

Link to comment

Hi,

 

I haven't done this myself, but afaik a Texture - much like a Line Type or Hatch - will be referenced by an Index number rather than its name - Just to make things more complicated ;)

 

http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#tex

 

Finding out the index value of your - I guess custom - texture will probably be a bit difficult.

Dig through the VS function reference and you might find a way to get the texture from a referenced object/class.

 

 

Personally, I've resorted to creating a Class for every "look" I want and just assign my objects to them accordingly.

 

Link to comment

Hi, me again, I couldn't get this to work until I used my custom node Name2Index which converts a texture name to the code. It is used to get slab Index and it works here also.HTH
Will need to sort out the transparency, maybe will have to code up a node or maybe set up an image with transparency alpha channel.
Will investigate.

 

Capture.JPG

Image_Prop_001.vwx

Edited by Alan Woodwell
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...