YABEE API documentation

Contents:

egg_writer.py module

Part of the YABEE rev 12.3

class io_scene_egg.yabee_libs.egg_writer.AnimCollector(obj_list, start_f, stop_f, framerate, name)

Bases: builtins.object

Collect an armature and a shapekeys animation data and convert it to the EGG string.

collect_arm_anims(arm)

Collect an animation data for the skeleton (Armature).

@param arm: Blender’s Armature for wich need to collect an animation data

collect_morph_anims(obj)

Collect an animation data for the morph target (shapekeys).

@param obj: Blender’s object for wich need to collect an animation data

get_full_egg_str()

Create and return the full EGG string for the animation, wich has been setup in the object constructor (__init__)

get_morph_anim_str(obj_name)

Create and return the EGG string of the morph animation for the given object.

@param obj_name: name of the Blender’s object

get_skeleton_anim_str(obj_name)

Create and return the EGG string of the Armature animation for the given object.

@param obj_name: name of the Blender’s object

class io_scene_egg.yabee_libs.egg_writer.EGGActorObjectData(obj)

Bases: io_scene_egg.yabee_libs.egg_writer.EGGMeshObjectData

Representation of the EGG animated object data

get_joints_str()

Make the EGGArmature object from the bones, pass the vertex referense to it, and return the EGG string representation of the joints hierarchy.

pre_convert_joint_vtx_ref()

Collect and convert vertices, assigned to the bones

class io_scene_egg.yabee_libs.egg_writer.EGGAnimJoint(obj, arm_owner=None)

Bases: io_scene_egg.yabee_libs.egg_writer.Group

Representation of the <Joint> animation data. Has the same hierarchy as the character’s skeleton.

get_full_egg_str(anim_info, framerate, level=0)

Create and return the string representation of the <Joint> animation data, included all joints hierarchy.

make_hierarchy_from_list(obj_list)

This function make <Group> hierarchy from the list of Blender’s objects. Self.object is the top level of the created hierarchy. Usually in this case self.object == None

@param obj_list: tuple or lis of blender’s objects.

class io_scene_egg.yabee_libs.egg_writer.EGGArmature(obj, arm_owner=None)

Bases: io_scene_egg.yabee_libs.egg_writer.Group

Representation of the EGG <Joint> hierarchy. Recive Blender’s bones list as obj_list in constructor.

get_full_egg_str(vrefs, arm_owner, level=0)

Create and return string representation of the EGG <Joint> with hierachy.

@param vrefs: reference of vertices, linked to bones. @param arm_owner: Armature object - owner of the bones @param level: indent level.

@return: the EGG string with joints hierarchy

class io_scene_egg.yabee_libs.egg_writer.EGGBaseObjectData(obj)

Bases: builtins.object

Base representation of the EGG objects data

get_transform_str()

Return the EGG string representation of object transforms.

class io_scene_egg.yabee_libs.egg_writer.EGGJointObjectData(obj, vref, arm_owner)

Bases: io_scene_egg.yabee_libs.egg_writer.EGGBaseObjectData

Representation of the EGG <Joint> data

get_vref_str()

Convert vertex reference to the EGG string and return it.

class io_scene_egg.yabee_libs.egg_writer.EGGMeshObjectData(obj)

Bases: io_scene_egg.yabee_libs.egg_writer.EGGBaseObjectData

EGG data representation of the mesh object

collect_poly_bface(face, attributes)

Add <BFace> to the polygon’s attributes list.

@param face: face index. @param attributes: list of polygon’s attributes.

@return: list of polygon’s attributes.

collect_poly_mref(face, attributes)

Add <MRef> to the polygon’s attributes list.

@param face: face index. @param attributes: list of polygon’s attributes.

@return: list of polygon’s attributes.

collect_poly_normal(face, attributes)

Add <Normal> to the polygon’s attributes list.

@param face: face index. @param attributes: list of polygon’s attributes.

@return: list of polygon’s attributes.

collect_poly_tref(face, attributes)

Add <TRef> to the polygon’s attributes list.

@param face: face index. @param attributes: list of polygon’s attributes.

@return: list of polygon’s attributes.

collect_poly_vertexref(face, attributes)

Add <VertexRef> to the polygon’s attributes list.

@param face: face index. @param attributes: list of polygon’s attributes.

@return: list of polygon’s attributes.

collect_polygons()

Convert and collect polygons info

collect_vertices()

Convert and collect vertices info.

collect_vtx_dxyz(vidx, attributes)

Add morph target <Dxyz> to the vertex attributes list.

@param vidx: Blender’s internal vertex index. @param attributes: list of vertex attributes

@return: list of vertex attributes.

collect_vtx_normal(vidx, attributes)

Add <Normal> to the vertex attributes list.

@param vidx: Blender’s internal vertex index. @param attributes: list of vertex attributes

@return: list of vertex attributes.

collect_vtx_uv(vidx, ividx, attributes)

Add <UV> to the vertex attributes list.

@param vidx: the EGG (converted) vertex index. @param attributes: list of vertex attributes

@return: list of vertex attributes.

collect_vtx_xyz(vidx, attributes)

Add coordinates of the vertex to the vertex attriibutes list

@param vidx: Blender’s internal vertex index. @param attributes: list of vertex attributes

@return: list of vertex attributes.

get_full_egg_str()

Return full mesh data representation in the EGG string syntax

get_polygons_str()

Return polygons string in the EGG syntax

get_smooth_vtx_list()

Collect the smoothed polygon vertices for write normals of the vertices. In the EGG for the smooth shading used normals of vertices. For solid - polygons.

get_vtx_pool_str()

Return the vertex pool string in the EGG syntax.

pre_convert_poly_vtx_ref()

Blender uses shared vertices, but for the correct working UV and shading in the Panda needs to convert they are in the individual vertices for each polygon.

pre_convert_uvs()

Blender uses shared vertices, but for the correct working UV and shading in the Panda needs to convert they are in the individual vertices for each polygon.

class io_scene_egg.yabee_libs.egg_writer.EGGNurbsCurveObjectData(obj)

Bases: io_scene_egg.yabee_libs.egg_writer.EGGBaseObjectData

Representation of the EGG NURBS Curve

get_curves_str()

Return the <NURBSCurve> string. Blender 2.5 has not contain Knots information, seems it’s calculating in runtime. I got algorythm for the knots calculation from the OBJ exporter and modified it.

get_vtx_pool_str()

Return the vertex pool string in the EGG syntax.

class io_scene_egg.yabee_libs.egg_writer.Group(obj, arm_owner=None)

Bases: builtins.object

Representation of the EGG <Group> hierarchy structure as the linked list “one to many”.

children = None

List of children (Groups)

get_full_egg_str(level=0)

Create and return representation of the EGG <Group> with hierarchy, started from self.object. It’s start point to generating EGG structure.

@param level: starting indent level.

@return: full EGG string of group.

get_tags_egg_str(level=0)

Create and return <Tag> string from Blender’s object Game logic properties.

@param level: indent level.

@return: the EGG tags string.

make_hierarchy_from_list(obj_list)

This function make <Group> hierarchy from the list of Blender’s objects. Self.object is the top level of the created hierarchy. Usually in this case self.object == None

@param obj_list: tuple or lis of blender’s objects.

object = None

Link to the blender’s object

print_hierarchy(level=0)

Debug function to print out hierarchy to console.

@param level: starting indent level.

io_scene_egg.yabee_libs.egg_writer.get_egg_materials_str()

Return the EGG string of used materials

io_scene_egg.yabee_libs.egg_writer.get_used_materials()

Collect Materials used in the selected object.

io_scene_egg.yabee_libs.egg_writer.merge_objects()

Merge objects, which armatured by single Armature.

io_scene_egg.yabee_libs.egg_writer.parented_to_armatured()

Convert parented to bone objects to armatured objects.

texture_processor.py module

Part of the YABEE rev 12.1

utils.py module

Part of the YABEE rev 12.1

io_scene_egg.yabee_libs.utils.convertFileNameToPanda(filename)

(Get from Chicken) Converts Blender filenames to Panda 3D filenames.

io_scene_egg.yabee_libs.utils.eggSafeName(s)

(Get from Chicken) Function that converts names into something suitable for the egg file format - simply puts ” around names that contain spaces and prunes bad characters, replacing them with an underscore.

yabee.py module

YABEE rev 12.0

io_scene_egg.yabee.ANIMATIONS = {'anim1': (0, 10, 5)}

{ ‘animation_name’ : (start_frame, end_frame, frame_rate) }

io_scene_egg.yabee.ANIM_ONLY = False

‘True’ to write only animation data

io_scene_egg.yabee.CALC_TBS = 'PANDA'

Enable tangent space calculation. Tangent space needed for some

io_scene_egg.yabee.COPY_TEX_FILES = True

‘True’ to copy texture images together with main.egg

io_scene_egg.yabee.EXPORT_UV_IMAGE_AS_TEXTURE = False

‘True’ to interprete an image in the uv layer as the texture

io_scene_egg.yabee.FILE_PATH = './exp_test/test.egg'

file name to write

io_scene_egg.yabee.FLOATING_POINT_ACCURACY = 3

number of sign after point

io_scene_egg.yabee.SEPARATE_ANIM_FILE = True

‘True’ to write an animation data into the separate files

io_scene_egg.yabee.TEXTURE_PROCESSOR = 'BAKE'

Type of texture processing. May be ‘SIMPLE’ or ‘BAKE’.

io_scene_egg.yabee.TEX_PATH = './tex'

Path for the copied textures. Relative to the main EGG file dir. For example if main file path is ‘/home/username/test/test.egg’, texture path is ‘./tex’, then the actual texture path is ‘/home/username/test/tex’

io_scene_egg module (GUI)

Part of the YABEE rev 12.3

class io_scene_egg.AddAnim

Bases: bpy_types.Operator

Add animation record operator

class io_scene_egg.EGGAnimList

Bases: bpy_types.PropertyGroup

Animations list settings

class io_scene_egg.EGGAnimationProperty

Bases: bpy_types.PropertyGroup

One animation record

class io_scene_egg.EGGBakeProperty

Bases: bpy_types.PropertyGroup

Texture baker settings

class io_scene_egg.ExportPanda3DEGG

Bases: bpy_types.Operator, bpy_extras.io_utils.ExportHelper

Export selected to the Panda3D EGG format

class io_scene_egg.RemoveAnim

Bases: bpy_types.Operator

Remove active animation record operator

class io_scene_egg.ResetDefault

Bases: bpy_types.Operator

Reset YABEE settings to default operator

class io_scene_egg.WarnDialog

Bases: bpy_types.Operator

Warning messages operator

class io_scene_egg.YABEEProperty

Bases: bpy_types.PropertyGroup

Main YABEE class for store settings

Indices and tables

Table Of Contents

This Page