Carles Olle Posted September 26, 2016 Share Posted September 26, 2016 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 Quote Link to comment
har Posted September 26, 2016 Share Posted September 26, 2016 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. Quote Link to comment
AlanW Posted September 26, 2016 Share Posted September 26, 2016 (edited) Hi, have a look at the end of this script as to how you get the texture. And its not a silly question, should have seen the dumb questions I asked at the beginning. Also if you need to create an image prop the node is under Objects / Solid. Screens.vwx Edited September 26, 2016 by Alan Woodwell Quote Link to comment
AlanW Posted September 26, 2016 Share Posted September 26, 2016 (edited) 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. Image_Prop_001.vwx Edited September 26, 2016 by Alan Woodwell Quote Link to comment
AlanW Posted September 26, 2016 Share Posted September 26, 2016 Ok so when you create your texture you add an image mask and you get this result in th file still using marionette to create the image prop. HTH Image Prop_002.vwx 1 Quote Link to comment
AlanW Posted September 26, 2016 Share Posted September 26, 2016 Just in case you missed it this is the name2index node. HTH Name2Index node.vwx Quote Link to comment
Carles Olle Posted September 27, 2016 Author Share Posted September 27, 2016 Thanks Alan, this works perfectly. I shall look to the VS functions more closely. Cheers Quote Link to comment
Recommended Posts
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.