I am trying to Loop Cut a Plane, made in the Code beforehand.
I cant find a short and precise online how to JUST do that. All answers include some kind of fixing other issues. Can someone post the code of simply:
create plane
loopcut plane in X-Direction a number of times
loopcut plane in Y-Direction a number of times
When making everything manually, the console posts the following lines to create the loopcut:
bpy.ops.mesh.loopcut_slide(
MESH_OT_loopcut={"number_cuts":1, "smoothness":0, "falloff":'INVERSE_SQUARE',
"object_index":0, "edge_index":3, "mesh_select_mode_init":(True, False, False)},
TRANSFORM_OT_edge_slide={"value":0, "single_side":False, "use_even":False,
"flipped":False, "use_clamp":True, "mirror":False, "snap":False, "snap_target":'CLOSEST',
"snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0),
"correct_uv":True, "release_confirm":False, "use_accurate":False})
When I use that in my console it throws following Error:
RuntimeError: Operator bpy.ops.mesh.loopcut_slide.poll() expected a view3d region & editmesh
Thanks