-
Notifications
You must be signed in to change notification settings - Fork 68
Objects
Created an empty object with the appropriate name. If col is provided, it will link the new object to that collection, otherwise it will link it to the active collection. Returns a reference to the newly created object.
Copies the provided tocopy object and places the new copy in the col collection. If the destination collection is not provided then it will put the new copy in the selected collection.
Convenience functions:
- duplicate_objects(tocopy, col)
Returns a reference to the active object in the scene. This is the equivalent of calling bpy.context.active_object.
Convenience functions:
- active_object()
- get_selected_object()
- selected_object()
- ao()
Returns a list of all selected objects, contained within bpy.context.selected_objects.
Convenience functions:
- so()
Returns a list of all objects in the file, provided by bpy.data.objects.
Convenience functions:
- get_list_of_objects
Takes the provided ref object and makes sure it is selected. If make_active is given True, then the object being selected will be made the actively selected object.
Selects all objects in the scene. If col collection is provided, then it will only select the objects contained inside of that collection.
Deselects the provided ref object.
Deselects every object that is currently selected.
Deletes all objects that are selected, the equivalent of calling bpy.ops.object.delete().
Deletes the provided ref object.
Takes a list of objects (objlist), deletes all of them.
Creates an instance of the ref object, gives it the name newname and moves it to the col collection (if provided).
Get the ref object (can also be string name) and return a reference to it.
Works on single object. For multiple objects, use get_objects().
Will provide active object if reference not provided.
Convenience functions:
- get_obj(ref)
Get reference to the list of objects. Will return a list of objects even if single object reference is passed.
ref can be None, object, string name, list of names or list of objects.
Will provide list of all selected objects if reference is not provided.
Convenience functions:
- get_objs(ref)
Will return the vector location of median point from all the list of objects.
objs should be first passed through get_objects() to reduce errors.
Returns a true or false value depending on if the ref object exists.
Renames the obj object to newname.
Returns the parent of the ref object.
Returns the children of the ref object.
Sets parent to be the parent object of child.
Clears the parent of the ref object. keep_location decides whether to maintain the global position of the object.
Returns a list of all objects that have modifiers attached to them.
Finds all objects with modifiers and sets their selection state to true.
The equivalent of calling bpy.ops.object.select_all(action='INVERT').
Returns the bounding box of an object.
Returns the global coordinates of the corners of the bounding box of an object.
Converts the given ref object to a mesh type.
Converts the given ref object to a grease pencil type.
Converts the given ref object to a curve type.
The equivalent of calling bpy.ops.object.select_by_type(type='MESH').
The equivalent of calling bpy.ops.object.select_by_type(type='CURVE').
The equivalent of calling bpy.ops.object.select_by_type(type='SURFACE').
The equivalent of calling bpy.ops.object.select_by_type(type='META').
The equivalent of calling bpy.ops.object.select_by_type(type='FONT').
The equivalent of calling bpy.ops.object.select_by_type(type='HAIR').
The equivalent of calling bpy.ops.object.select_by_type(type='POINTCLOUD').
The equivalent of calling bpy.ops.object.select_by_type(type='VOLUME').
The equivalent of calling bpy.ops.object.select_by_type(type='ARMATURE).
The equivalent of calling bpy.ops.object.select_by_type(type='LATTICE').
The equivalent of calling bpy.ops.object.select_by_type(type='EMPTY').
The equivalent of calling bpy.ops.object.select_by_type(type='GPENCIL').
The equivalent of calling bpy.ops.object.select_by_type(type='CAMERA').
The equivalent of calling bpy.ops.object.select_by_type(type='SPEAKER').
The equivalent of calling bpy.ops.object.select_by_type(type='LIGHT_PROBE').
Creates and returns a plane object.
Creates and returns a cube object.
Creates and returns a circle object.
Creates and returns a cylinder object.
Creates and returns a uv-sphere object.
Convenience functions:
- create_sphere()
Creates and returns an ico-sphere object.
Creates and returns a cone object.
Creates and returns a torus object.
Creates and returns a grid object.
Creates and returns a suzanne object.
Convenience functions:
- create_monkey()
Creates and returns a bezier curve object.
Convenience functions:
- create_bezier
Creates and returns a circle curve object.
Creates and returns a nurbs curve object.
Creates and returns a nurbs curve circle object.
Creates and returns a nurbs curve path object.
Convenience functions:
- create_path()
Creates and returns a nurbs curve surface object.
Convenience functions:
- create_curve_surface()
Creates and returns a nurbs circle surface object.
Convenience functions:
- create_circle_surface()
Creates and returns a nurbs surface object.
Creates and returns a nurbs cylinder surface object.
Convenience functions:
- create_cylinder_surface
Creates and returns a nurbs sphere surface object.
Convenience functions:
- create_sphere_surface
Creates and returns a nurbs torus surface object.
Convenience functions:
- create_torus_surface()
Creates and returns a metaball object.
Creates and returns a metaball capsule object.
Creates and returns a metaball plane object.
Creates and returns a metaball ellipsoid object.
Creates and returns a metaball cube object.
Creates and returns a text object.
Convenience functions:
- create_text()
Convenience functions:
- shade_smooth(ref)
Convenience functions:
- shade_flat(ref)