bpy_extras submodule (bpy_extras.object_utils)¶
Return a matrix using the operator settings and view context.
object_data_add(context, obdata, operator=None, name=None)¶
Add an object using the view context and preference to initialize the location, rotation and layer.
the newly created object in the scene.
- Return type
Return scale which should be applied on object data to align it to grid scale
Scale an operators distance values by the grid size.
world_to_camera_view(scene, obj, coord)¶
Returns the camera space coords for a 3d point. (also known as: normalized device coordinates - NDC).
Where (0, 0) is the bottom left and (1, 1) is the top right of the camera frame. values outside 0-1 are also supported. A negative ‘z’ value means the point is behind the camera.
Takes shift-x/y, lens angle and sensor size into account as well as perspective/ortho projections.