This function generates code that will, when run inside Blender, create mesh primitives within a scene.
add_mesh_primitive( script, object, primitive = "ico_sphere", location = NULL, ... ) add_surface_primitive( script, object, primitive = "torus", location = NULL, ... ) add_curve_primitive( script, object, primitive = "bezier_circle", location = NULL, ... )
script | The Python script to append the generated code onto. |
---|---|
object | An object inheriting from [mvdf_obj] which will be used to calculate the x, y, and z positions for each primitive. One primitive will be created for each row of `mvdf(object)`. |
primitive | The primitive type to create. See the official Blender documentation at https://docs.blender.org/api/blender_python_api_current/bpy.ops.html for a full list of available primitives. Each category has a different set of primitives available. |
location | Either `NULL` (the default) or a vector of strings (in the format `location=(x, y, z)`) specifying the location for the origin of each primitive. If `NULL`, this vector will be automatically calculated using the `x`, `y`, and `z` values in `object`. |
... | Additional arguments to pass to the primitive creation call. The available arguments are different for each primitive, and are documented in the official Blender documentation at https://docs.blender.org/api/blender_python_api_current/bpy.ops.mesh.html. |
A length 1 character vector containing the Blender Python script with code for creating primitives added.