THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/03/2012 at 13:28, xxxxxxxx wrote:
i've tried to do this:
import c4d
from c4d import gui, utils
def main() :
obj = c4d.BaseObject(c4d.Ocube)
obj[c4d.PRIM_CUBE_LEN] = c4d.Vector(30,30,100)
res = utils.SendModelingCommand(command = c4d.MCOMMAND_CURRENTSTATETOOBJECT,
list = [obj],
mode = c4d.MODELINGCOMMANDMODE_ALL,
bc = c4d.BaseContainer(),
doc = doc)[0]
doc.InsertObject(res)
c4d.EventAdd()
doc.SetActiveObject(res)
sel = res.GetPolygonS()
sel.Select(2)
c4d.EventAdd()
if __name__=='__main__':
main()
but i've two problem:
- i do execute button but nothing happen
- i try to select the node the unselect and click execute and it create 2-3 cubes once
- no polygons are selected