Hazoc Posted December 1, 2015 Share Posted December 1, 2015 (edited) Hello Have you ever tried to read array based detail attributes in VEX? I have this simple setup where I create a global array attribute of strings using Python. Later I try to read its' string elements with a Attribute Wrangle using VEX. Vex says that the length of the array is 1 which it should not be after I set 4 elements in the Python SOP. it also tells me that the type is "none". Should be "String Array type" ? The Python SOP: node = hou.pwd() geo = node.geometry() #A bunch of 4 strings d = ("S", "F", "E", "C") #Set as detail attribute "Strings" geo.addAttrib(hou.attribType.Global, "Strings", d, False, True) geo.setGlobalAttribValue("Strings", d) And the Attribute Wrangle: //Maybe the cause of all bad string a = array(s@Strings); //Prints the size of 1 instead of 4 int len = len(a); printf("%g", len); //Prints the type "none". Should be "String Array type"? string type = detailattribtypeinfo(0, "Strings"); printf("%c", type); What am I doing wrong? Edited December 1, 2015 by Hazoc Quote Link to comment Share on other sites More sharing options...
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.