THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/03/2012 at 08:46, xxxxxxxx wrote:
this few lines create a cube, resize it, ctso it and insert it into your document.
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()
if __name__=='__main__':
main()
for the rest follow the link i have given to you in my previous post, your five steps won't be
five lines of code. you will have to use smc and define the basecontainers for some of the
modelling commands.
come back when you get stuck.