-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
github: [moixllik] | ||
patreon: moixllik | ||
ko_fi: moixllik |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'addon/*.py' | ||
- 'addon/blender_manifest.toml' | ||
- 'addon/version.txt' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Zip file | ||
run: cd addon/ && make build | ||
|
||
- name: Create or update release | ||
id: create_release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: latest | ||
release_name: "Latest Release" | ||
draft: false | ||
prerelease: false | ||
files: ./addon/*.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
# btt-ai | ||
BTT to AI | ||
# BTT to AI | ||
|
||
[Blender Video Text Tracks](https://github.com/moixllik/btt) to: | ||
|
||
* [ ] Speech | ||
* [ ] Image | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
VER=$(shell cat ./version.txt) | ||
|
||
build: update | ||
zip btt-$(VER).zip ./__init__.py ./blender_manifest.toml | ||
|
||
update: | ||
sed -i 's/version = "0.0.0"/version = "$(VER)"/g' ./blender_manifest.toml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import bpy | ||
import requests | ||
|
||
|
||
def btt_get_world(): | ||
return bpy.context.scene.world | ||
|
||
|
||
def btt_get_strip_active(): | ||
scene = bpy.context.scene | ||
strip = scene.sequence_editor.active_strip | ||
if strip.type == "TEXT": | ||
return strip | ||
|
||
|
||
class BTT_to_speech(bpy.types.Operator): | ||
bl_label = "To Speech" | ||
bl_idname = "btt.to_speech" | ||
bl_options = {"REGISTER", "UNDO"} | ||
|
||
def execute(self, context): | ||
world = btt_get_world() | ||
strip = btt_get_strip_active() | ||
return {"FINISHED"} | ||
|
||
|
||
class BTT_to_image: | ||
bl_label = "To Image" | ||
bl_idname = "btt.to_image" | ||
bl_options = {"REGISTER", "UNDO"} | ||
|
||
def execute(self, context): | ||
world = btt_get_world() | ||
strip = btt_get_strip_active() | ||
return {"FINISHED"} | ||
|
||
|
||
class BTT_menu(bpy.types.Menu): | ||
bl_label = "AI" | ||
bl_idname = "btt" | ||
|
||
def draw(self, context): | ||
layout = self.layout | ||
layout.operator("btt.to_speech", text="To Speech") | ||
layout.operator("btt.to_image", text="To Image") | ||
|
||
|
||
def menu_func(self, context): | ||
self.layout.menu(BTT_menu.bl_idname) | ||
|
||
|
||
def register(): | ||
bpy.utils.register_class(BTT_to_speech) | ||
bpy.utils.register_class(BTT_to_image) | ||
bpy.type.SEQUENCER_MT_editor_menus.append(menu_func) | ||
|
||
|
||
def unregister(): | ||
bpy.utils.unregister_class(BTT_to_speech) | ||
bpy.utils.unregister_class(BTT_to_image) | ||
bpy.type.SEQUENCER_MT_editor_menus.remove(menu_func) | ||
|
||
|
||
if __name__ == "__name__": | ||
register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
schema_version = "1.0.0" | ||
|
||
id = "btt-ai" | ||
version = "0.0.0" | ||
name = "BTT to AI" | ||
tagline = "AI generation with Strip Text" | ||
maintainer = "Irving Montalvo <@Moixllik>" | ||
website = "https://moixllik.github.io/btt-ai/" | ||
type = "add-on" | ||
tags = ["Sequencer"] | ||
blender_version_min = "4.2.0" | ||
license = ["SPDX:GPL-3.0-or-later"] | ||
|
||
[permissions] | ||
network = "Send text and receive media files" | ||
files = "Write media files to local" | ||
|
||
[build] | ||
paths_exclude_pattern = ["__pycache__/", "/.git/", "/*.zip"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>BTT AI</title> | ||
</head> | ||
<body> | ||
<main> | ||
<h1><a href="">BTT AI</a></h1> | ||
</main> | ||
</body> | ||
</html> |