Jump to content

python list in python expression


Recommended Posts



I have a node parameter with  a little expression to allow me to get a list of strings.

Now, in another node, I would like to write a new expression returning a specific component of the previously created list.

But I can't get it to work.

ch('myNodePath') : return the list

len(ch('myNodePath')) : return the lengthof the list
ch('myNodePath')[0] : return a bracket instead of the first component :(


Thanks for your help


Link to comment
Share on other sites

my guess is that your list is actually a string that looks like a list.  try putting eval() around it prior to trying to pull the first index.

My guess too.


Are you shure this expresion :


is returning the correct length of items and not the length of string ?

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...