Created
February 20, 2018 14:30
-
-
Save kickbase/d47a620025914fbebc8988eb7f239632 to your computer and use it in GitHub Desktop.
[ Houdini ] [ VEX ] primitive wrangle sample with JavaScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var prim0 = { | |
| primnum: 0, | |
| numprim: 2, | |
| shop_materialpath: "/mat/iron", | |
| Cd: [0.37, 0.96, 0.41] | |
| }; | |
| var prim1 = { | |
| primnum: 1, | |
| numprim: 2, | |
| shop_materialpath: "/mat/plastic", | |
| Cd: [0.70, 0.04, 0.93] | |
| }; | |
| var prims = [prim0, prim1]; | |
| for (var i = 0; i < prims.length; i++) { | |
| var prim = prims[i]; | |
| // VEXpression code is here | |
| console.log("prim.primnum: " + prim.primnum); //VEX: @primnum | |
| console.log("prim.numprim: " + prim.numprim); //VEX: @numprim | |
| console.log("prim.shop_materialpath: " + "\"" + prim.shop_materialpath + "\""); //VEX: @shop_materialpath | |
| console.log("prim.Cd: " + prim.Cd); //VEX: @Cd | |
| console.log("-----"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment