Adding primitive cube in 2.8 error?

i get the following error

positional argument follows keyword argument

for this primitive

				bpy.ops.mesh.primitive_cube_add( size = 0.5, calc_uvs= True, enter_editmode= False, align= 'WORLD', location = x1, y1 , 0.0, rotation = 0.0, 0.0, 0.0, scale = 0.0, 0.0, 0.0 )

how do i correct this ?

thanks
happy bl

You have to wrap the location and the rotation arguments with parentheses. Also scale does not seem to be supported by the operator.

bpy.ops.mesh.primitive_cube_add(size=2, calc_uvs=True, enter_editmode=False, align='WORLD', location=(0, 0, 0), rotation=(0, 0, 0))

got this from

bpy.ops.mesh. primitive_cube_add (size=2.0 , calc_uvs=True , enter_editmode=False , align=‘WORLD’ , location=0.0, 0.0, 0.0 , rotation=0.0, 0.0, 0.0 , scale=0.0, 0.0, 0.0 )

i will try to remove the scale
but primitive always add scale on these as i remember

will test some more

so you sating doc is not updated yet

thanks for feedback
happy bl

tried that one

bpy.ops.mesh.primitive_cube_add(size=2, view_align=False, enter_editmode=False, location=(x1, y1, 0))

does not like it in 2.8 or 2.9

but this work
x1 = 12
y1 = 3

bpy.ops.mesh.primitive_cube_add( size= 2.0 , location = (x1, y1 , 0.0 ) )

i can use that one
but would like to see some more parameters

is the line primitive doing same thing
will test again

darn primitives in 2.8

happy bl

You are right scale is supported in 2.9 … i was testing it in
2.83

so change from 2.79 to 2.8 and then change back to 2.9

fi they can stop playing with the API darn

thanks

is there a way to detect the API no and with a try
get the 2 different commands and no errors ?

thanks
happy bl

i did a script in 2.79
took like 20 seconds to do 1000 planes

did it in 2.8 and it takes 120 seconds

2.9 takes 80 secondes

why the heck is it so long now ?
any idea why ?

thanks
happy bl