(self)
return data
Query the component data only

        :rtype: dict
Query the component data only
Query the component data only
def _component_data(self):
        """Query the component data only

        :rtype: dict

        """
        logger.debug("Geometry()._component_data()")

        if self[constants.TYPE] != constants.GEOMETRY.title():
            data = {}
            index = self.get(constants.INDEX)
            if index is not None:
                data[constants.INDEX] = index
            data[constants.ATTRIBUTES] = self.get(constants.ATTRIBUTES)           
            data[constants.GROUPS] = self.get(constants.GROUPS)
            return {constants.DATA: data}

        components = [constants.VERTICES, constants.FACES,
                      constants.UVS, constants.COLORS,
                      constants.NORMALS, constants.BONES,
                      constants.SKIN_WEIGHTS,
                      constants.SKIN_INDICES,
                      constants.INFLUENCES_PER_VERTEX,
                      constants.INDEX]

        data = {}
        anim_components = [constants.MORPH_TARGETS, constants.ANIMATION, constants.MORPH_TARGETS_ANIM, constants.CLIPS]
        if self.options.get(constants.EMBED_ANIMATION):
            components.extend(anim_components)
        else:
            for component in anim_components:
                try:
                    self[component]
                except KeyError:
                    pass
                else:
                    data[component] = os.path.basename(
                        self.animation_filename)
                    break
            else:
                logger.info("No animation data found for %s", self.node)

        option_extra_vgroups = self.options.get(constants.EXTRA_VGROUPS)

        for name, index in api.mesh.extra_vertex_groups(self.node,
                                                        option_extra_vgroups):
            components.append(name)

        for component in components:
            try:
                data[component] = self[component]
            except KeyError:
                logger.debug("Component %s not found", component)

        return data
def _component_data ( self ) : logger . debug ( "Geometry()._component_data()" ) if self [ constants . TYPE ] != constants . GEOMETRY . title ( ) : data = { } index = self . get ( constants . INDEX ) if index is not None : data [ constants . INDEX ] = index data [ constants . ATTRIBUTES ] = self . get ( constants . ATTRIBUTES ) data [ constants . GROUPS ] = self . get ( constants . GROUPS ) return { constants . DATA : data } components = [ constants . VERTICES , constants . FACES , constants . UVS , constants . COLORS , constants . NORMALS , constants . BONES , constants . SKIN_WEIGHTS , constants . SKIN_INDICES , constants . INFLUENCES_PER_VERTEX , constants . INDEX ] data = { } anim_components = [ constants . MORPH_TARGETS , constants . ANIMATION , constants . MORPH_TARGETS_ANIM , constants . CLIPS ] if self . options . get ( constants . EMBED_ANIMATION ) : components . extend ( anim_components ) else : for component in anim_components : try : self [ component ] except KeyError : pass else : data [ component ] = os . path . basename ( self . animation_filename ) break else : logger . info ( "No animation data found for %s" , self . node ) option_extra_vgroups = self . options . get ( constants . EXTRA_VGROUPS ) for name , index in api . mesh . extra_vertex_groups ( self . node , option_extra_vgroups ) : components . append ( name ) for component in components : try : data [ component ] = self [ component ] except KeyError : logger . debug ( "Component %s not found" , component ) return data