blendify.internal package#

Submodules#

blendify.internal.io module#

class blendify.internal.io.catch_stdout(skip=False, logfile=None)[source]#

Bases: object

Stdout hook to ignore or reroute the blender output

release_hook()[source]#
set_hook()[source]#

blendify.internal.parser module#

blendify.internal.parser.move_collection(parent, collection, linked=False)[source]#
blendify.internal.parser.parse_camera_from_blendfile(obj: Object, resolution: ndarray)[source]#

Parse camera parameters from blender object. :param obj: Blender object with camera data :type obj: bpy.types.Object :param resolution: array of [resolution_x, resolution_y] :type resolution: np.ndarray

Returns:

ORTHO, PRESP or NONE camera_dict (dict): dictionary with camera parameters

Return type:

camera_type (str)

blendify.internal.positionable module#

class blendify.internal.positionable.Positionable(tag: str, blender_object: Union[Collection, Object], quaternion: Union[ndarray, Tuple[float, float, float, float]] = (1, 0, 0, 0), translation: Union[ndarray, Tuple[float, float, float]] = (0, 0, 0))[source]#

Bases: ABC

Base class for all classes that wrap Blender objects with location in space (Camera, Light, Renderable)

property quaternion#
set_position(quaternion: Union[ndarray, Tuple[float, float, float, float]], translation: Union[ndarray, Tuple[float, float, float]])[source]#
property tag#
property translation#

blendify.internal.singleton module#

class blendify.internal.singleton.Singleton[source]#

Bases: type

An implementation of the singleton metaclass. This is a metaclass which allows only one instance of the class to exist. Useful to handle an object which should not be duplicated (such as Blender scene).

blendify.internal.texture module#

MIT License

Copyright (c) 2018 Sebastian Bullinger Copyright (c) 2021 Vladimir Guzov and Ilya Petrov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

blendify.internal.texture.compute_particle_color_texture(colors, name='ParticleColor')[source]#

blendify.internal.types module#

Module contents#