Tyfx567 Posted July 25, 2015 Share Posted July 25, 2015 (edited) I have a FBX I imported from maya that contains multiple (more than 50) object level nodes called "objectname" + "number" like "debrispieces_01", inside that is a file node with the same name. If I say in the Pop instance vexpression " float randinst = fit01(rand(@id), 0, 50); if( randinst == 1) { popinstancepath = "../../"objectname" + "number"/"file1"/"debrispieces_01"}; " I want to do this, but don't want to type this 50 times. Could I put this into some sort of array? Maybe do some python scripting? Thanks guys! Tyler Edited July 25, 2015 by Tyfx567 Quote Link to comment Share on other sites More sharing options...
Tyfx567 Posted July 25, 2015 Author Share Posted July 25, 2015 Figured it out. I can either do an attribute create node above the particles if the points already exist and say " op:/obj/FBX/geo`floor(fit01(rand($PT), 1,4))`/sphere`floor(fit01(rand($PT),1,4))` " Or in the pop instance node I can say this: float randinst = floor(fit01(rand(@id), 1,4)); instancepath = "op:/obj/FBX/geo" + sprintf("%s", randinst) + "/sphere" + sprintf("%s", randinst); Quote Link to comment Share on other sites More sharing options...
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.