Questions about parameters creation (in Wrangle node and traditional edit parm interface)

   5641   2   1
User Avatar
Member
118 posts
Joined: Feb. 2016
Offline
Hello nice people, total newbie here, hope you can give some hint (-:


  1. Edit parameter interface: How to populate a Detail array from a parameter field? Let me explain, I have a list of known numbers (1.1, 1.3, 2.0, etc.), ideally I'd be able to type them in a parameter field of my “Main Controls” node that drives those numbers into a detail attribute. At the present time I'm only able to write them directly in a wrangle node using
    f[]@myarray = {1.1,1.3,etc};
    
    , but my goal is to create a digital asset where the user can write down different series of numbers and have the array populated. In the “edit parameter interface” I cannot find any “array” type.

  2. Wrangle node: I'm struggling with the creation of custom parameters inside the wrangle. For example, if I type
    ch("parm");
    
    and press the “create spare parm” button, the wrangle node is able to create the parm, but the node breaks and return “ambiguous call to function ch()….”, while typing
    f@parm= ch('parm');
    
    works fine.
    Same behavior if I type
    chramp("parm")
    
    to create a ramp, the node just breaks but it's able to create the ramp; on the contrary typing
    chs("parm");
    
    work just fine for a parameter string creation.

  3. Bonus question,Object Merge Node: I need to use a detail function inside the Object field (obipath1 parm) in order to retrieve a string detail attribute from a wrangle node. My aim is to dynamically create the path in the wrangle node (I'm able to do this) and feed the string into the Object Merge node (I'm having problem with this last step). Typing
    `detail("../myWrangle/", "myAttribute", 0)`
    
    doesn't work. I get an “invalid Sop specified” error.




Thanks for any help guys!
Andr
Edited by Andr1 - June 9, 2016 15:15:36
User Avatar
Member
9392 posts
Joined: July 2007
Offline


1. there is no array parm, but you can create string parm with space separated numbers and split into an array
s[]@array = split(chs("parm"));
that would give you array of strings, so you will have to convert them to float using atof() if you need to
or
you can use multiparm and import its values into an array using for loop

2. ch() is ambiguous as on it's own it doesn't define type of the parm
therefore use chf(), chi(), chv(), chs(), chramp() directly

3. you will need to use details() function
`details(“../myWrangle/”, “myAttribute”)`
Edited by tamte - June 9, 2016 15:19:02
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
118 posts
Joined: Feb. 2016
Offline
Hello there, thanks a lot for the help!


tamte
2. ch() is ambiguous as on it's own it doesn't define type of the parm
therefore use chf(), chi(), chv(), chs(), chramp() directly

Don't know why but I had the understanding that ch() was interpreted by default as float.
Anyway I've problems with the creation of ramps inside the wrangle.
Typing simply chramp(“myramp”); It creates the ramp but the node breaks.
Instead, to make it work I have to type
f@myattribute = chramp("myramp" , 123);
in which case it does the following: creates myattribute and sets its value to 0.0 (??), whenever I hit the “create spare parameter”, the wrangle proceed to correctly create myramp, but changes myattribute value to 1.0 (?????).

I don't really understand this behavior.
And what would be the utility of having myattribute created? I don't really need this.


Clearly I'm missing something big here eheh (-:
Edited by Andr1 - June 10, 2016 08:40:12
  • Quick Links