Skip to content

Commit

Permalink
Merge pull request #1 from OmooLab/feature/dev
Browse files Browse the repository at this point in the history
feat: add many stuff
  • Loading branch information
icrdr authored Mar 29, 2024
2 parents 7740eb1 + 04f3ea5 commit 8ccfb05
Show file tree
Hide file tree
Showing 10 changed files with 1,555 additions and 5 deletions.
57 changes: 57 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# release title (appears, for example, in repo's sidebar)
# NOTE: $RESOLVED_VERSION == $MAJOR.$MINOR.$PATCH
name-template: "v$RESOLVED_VERSION"

# git tag to be used for the release
tag-template: "v$RESOLVED_VERSION"

# Release Notes template (keep it as is)
template: |
## What’s Changed
$CHANGES
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

# Define which PR label will cause which kind of
# version bump (following semantic versioning).
# If no labels match, the default "patch".
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch

# Define which PR label will be listed in which
# category of changes in the Release Notes.
# If no labels match, the default is to be
# listed on the top, before the sections.
categories:
- title: "🚨 BREAKING CHANGES 🚨"
labels:
- "BREAKING CHANGE"
- title: "🚀 New Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bug"
- title: "🛠️ Other Changes"
labels:
- "chore"
- "refactor"
- "documentation"
- "style"
- "test"
- "revert"
- "dependencies"
- "ci"
24 changes: 24 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission required to create a github release
contents: write
# write permission required for autolabeler
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131 changes: 131 additions & 0 deletions .github/workflows/upload-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Upload Assets to Release

on:
push:
branches:
- "release/*"

jobs:
draft_release:
name: Draft Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.draft_release.outputs.upload_url }}
version: ${{ steps.set_env.outputs.version }}
steps:
- name: Set Version Env
id: set_env
run: |
ref_name=${{ github.ref_name }}
echo "version=${ref_name#release/}" >> "$GITHUB_OUTPUT"
- name: Get release
id: draft_release
uses: cardinalby/[email protected]
with:
releaseName: Draft
env:
GITHUB_TOKEN: ${{ github.token }}

# draft_release:
# name: Draft Release
# permissions:
# contents: write
# pull-requests: write
# runs-on: ubuntu-latest
# outputs:
# upload_url: ${{ steps.draft_release.outputs.upload_url }}
# version: ${{ steps.set_env.outputs.version }}
# steps:
# - name: Set Version Env
# id: set_env
# run: |
# ref_name=${{ github.ref_name }}
# echo "version=${ref_name#release/}" >> "$GITHUB_OUTPUT"
# - name: Draft Release ${{ steps.set_env.outputs.version }}
# uses: release-drafter/release-drafter@v5
# id: draft_release
# with:
# name: ${{ steps.set_env.outputs.version }}
# tag: ${{ steps.set_env.outputs.version }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_houdini_package:
name: Build Houdini Package
needs: draft_release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Zip Package
run: |
zip -r package.zip packages python README.md
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}.zip
asset_content_type: application/zip

build_blender_addon:
name: Build Blender Add-on
needs: draft_release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Zip Add-on
run: |
mv plugins/Blender plugins/OmooAsset
zip -r package.zip plugins/OmooAsset
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./package.zip
asset_name: OmooAsset-Blender_${{ needs.draft_release.outputs.version }}.zip
asset_content_type: application/zip

# build_cinema4d_plugin:
# name: Build Cinema4D Plugin
# needs: draft_release
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Code
# uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install Dependencies
# run: |
# python -m venv venv
# source venv/bin/activate
# python -m pip install --upgrade pip
# python -m pip install -r requirements.txt
# python -m pip list
# - name: Move Dependencies
# run: |
# mkdir -p pythonlib${{ matrix.python-version }}/Lib
# mv venv/lib/python${{ matrix.python-version }}/site-packages pythonlib${{ matrix.python-version }}/Lib/
# rm -r venv
# - name: Zip Package
# run: |
# zip -r package.zip packages preferences pythonlib${{ matrix.python-version }} python nodes.json README.md
# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./package.zip
# asset_name: Omoospace-Houdini_${{ needs.draft_release.outputs.version }}_py${{ matrix.python-version }}.zip
# asset_content_type: application/zip
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ cython_debug/
# HDA backup
HDAs/backup

PythonLib*
pythonlib*

*.rat
4 changes: 2 additions & 2 deletions assets/HDAs/OmooLab_Integration.hda
Git LFS file not shown
4 changes: 2 additions & 2 deletions assets/HDAs/OmooLab_Pipeline.hda
Git LFS file not shown
56 changes: 56 additions & 0 deletions plugins/Blender/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


from .omoo_asset import (
OmooAssetMenu,
ImportOmooAsset
)
from .aces import (
FixColorSpaceAll,
FixColorSpaceSelected,
FixColorSpace_PT_Panel
)
import bpy


bl_info = {
"name": "Omoo Asset",
"author": "MaNan",
"description": "",
"blender": (2, 80, 0),
"version": (0, 0, 1),
"location": "File > Import-Export",
"warning": "",
"category": "Import-Export"
}


CLASSES = [
ImportOmooAsset,
FixColorSpaceAll,
FixColorSpaceSelected,
FixColorSpace_PT_Panel
]


def register():
for cls in CLASSES:
bpy.utils.register_class(cls)
OmooAssetMenu.register()


def unregister():
for cls in reversed(CLASSES):
bpy.utils.unregister_class(cls)
OmooAssetMenu.unregister()
Loading

0 comments on commit 8ccfb05

Please sign in to comment.