Beispiel #1
0
    def execute(self, context):
        active_asset = SpaceAssetInfo.get_active_asset(context)
        tag = active_asset.tags[active_asset.active_tag]

        active_asset.tags.remove(tag)
        active_asset.active_tag -= 1

        return {'FINISHED'}
Beispiel #2
0
    def poll(cls, context):
        if not SpaceAssetInfo.is_asset_browser_poll(context):
            return False

        active_asset = SpaceAssetInfo.get_active_asset(context)
        if not active_asset:
            return False

        return active_asset.active_tag in range(len(active_asset.tags))
    def execute(self, context):
        active_asset = SpaceAssetInfo.get_active_asset(context)
        # Only render the image if the asset is a mesh.
        if active_asset.id_data.type == 'MESH':
            result = createAssetPreview(active_asset.id_data)
            if result:
                self.report(result[0], result[1])
                return {'CANCELLED'}

        return {'FINISHED'}
Beispiel #4
0
    def execute(self, context):
        active_asset = SpaceAssetInfo.get_active_asset(context)
        active_asset.tags.new("Tag")

        return {'FINISHED'}
Beispiel #5
0
 def poll(cls, context):
     return SpaceAssetInfo.is_asset_browser_poll(
         context) and SpaceAssetInfo.get_active_asset(context)