

You could use similar syntax to create other base geometry: Make sure the name in your code matches the name from the name from input window. Be careful about the name here, when we set the attribute value, we are in fact changing the attributes from the input node. Here I change the existing sphere radius value to 2 from 1. SetAttr command can be used to modify the attributes of existing objects. Remember, the default segments for sphere in maya should be 20, if you do not change the default settings. Using the above command, we can create a sphere geometry with 8 segments along each axis. You can also change the default attribute of the sphere when creating it.

Mc.polySphere() can be used to create a default sphere geometry, I did not assign any attributes so that the attributes for this sphere will be default, the radius should be 1, it will locate at (0, 0, 0). Mc.baseGeometry() #I have already discussed mc in my previous article

The first thing I want to discuss is how to create basic geometry in maya using python script. This is the official manual, for more details, please refer: I discuss more about this because some of you guys may not be so experienced with programming language, hope more examples will give a better idea about how to convert maya command. Here, I will talk about some common commands, for more commands, you could convert yourself using the methodology I discussed in previous article. 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. In the last article, I introduced some basic work flow related maya python. At the moment, this is the only way I know of how to search for objects in maya.OK! Welcome back, now it’s part 2. 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. I couldn't find an answer on this website, so I chose to ask a question. 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, 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.
