At the moment, this is the only way I know of how to search for objects in maya. If there is a better way to query for objects in maya, let me know what it's called and I'll do some research into what that is. Simple sample code like this: from maya. I will also talk about Python list, python functions, and branches and loops. In this article, I will introduce some common maya commands for scripting. I couldn't find an answer on this website, so I chose to ask a question. Im trying to use the 'ls' python command in maya, to list certain objects with a matching string in the name in concatination with a wildcard. In the last article, I introduced some basic work flow related maya python. So if you are trying to iterate over the weights to modify, normalize, etc, python really starts to bog down. ![]() For each vertex it returns weights for all influences, and since most of these are zero, it is a lot of 'useless' information python has to iterate over. ![]() I'm not sure why this is the case because in those examples, the string concatination should come out to 'mesh*' like the first example. However, what it returns back is not a good way to work with weights in python. ![]() However, in both examples, it returns an empty list unlike the first. This code works and will return a list of objects with the matching string in the name, however, I would like to use a variable instead of hard coding in the string. Simple sample code like this: from maya.cmds import * I'm trying to use the "ls" python command in maya, to list certain objects with a matching string in the name in concatination with a wildcard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |