References reference#
- class blenderline.references.ItemReference#
Reference to spawned item object in scene.
- __init__(item_object, reference_entry)#
Create reference to item object in scene.
- Parameters:
object_name (str) – item object in scene.
reference_entry (ItemEntry) – entry used to create referenced object.
item_object (Object) –
- Return type:
None
- delete()#
Remove item object scene.
- Return type:
None
- location_is_valid(proposed_location, proposed_min_margin_distance)#
- Check if a proposed location is far enough away from object, i.e., distance
between the current object location and the proposed location is above the specified minimum margin distance defined on the reference item entry.
- Parameters:
proposed_location (mathutils.Vector) – proposed location for new item.
proposed_min_margin_distance (float) – minimum margin distance for proposed item.
- Returns:
True if proposed location is valid w.r.t. this item.
- Return type:
bool
- orient_to_vector(desired_orientation)#
- Rotate object so that orientation (object local z axis) aligns with desired
direction.
- Parameters:
desired_orientation (mathutils.Vector) – desired local z orientation of object.
- Return type:
None
- set_pass_index(pass_index)#
Set pass index of object.
- Parameters:
pass_index (int) – pass index to set on object. Must be between 0 and 255.
- Return type:
None
- class blenderline.references.PathReference#
Reference to path object in scene.
- __init__(path_object)#
Create reference to path object in scene.
- Parameters:
path_object (bpy.types.Object) – path object in scene.
- Return type:
None
- sample()#
Sample random location along the path and return location, normal vector in the x-y plane, and a normal vector in the local z plane.
- Return type:
tuple[Vector, Vector, Vector]