Skip to content

Commit

Permalink
ci: fix cinema4d plugin lib not work on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
icrdr committed Apr 9, 2024
1 parent b9568e8 commit bf09d38
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/upload-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
uses: actions/checkout@v4
- name: Zip Add-on
run: |
cd plugins/Substance3D_Painter
cd plugins/substance3d_painter
zip -r package.zip assets python
- name: Upload Release Asset
id: upload-release-asset
Expand All @@ -91,7 +91,7 @@ jobs:
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: ./plugins/Substance3D_Painter/package.zip
asset_path: ./plugins/substance3d_painter/package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_SubstanceBridge.zip
asset_content_type: application/zip

Expand All @@ -104,7 +104,7 @@ jobs:
uses: actions/checkout@v4
- name: Zip Add-on
run: |
cd plugins/Blender
cd plugins/blender
zip -r package.zip OmooAsset
- name: Upload Release Asset
id: upload-release-asset
Expand All @@ -113,14 +113,14 @@ jobs:
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: ./plugins/Blender/package.zip
asset_path: ./plugins/blender/package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_Blender.zip
asset_content_type: application/zip

upload_cinema4d_plugin:
name: Upload Cinema4D Plugin
needs: draft_release
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand All @@ -130,18 +130,18 @@ jobs:
python-version: 3.11
- name: Install Dependencies
run: |
cd plugins/Cinema4D
cd plugins/cinema4d
python -m venv venv
source venv/bin/activate
source venv/Scripts/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip list
- name: Zip Package
run: |
cd plugins/Cinema4D
cd plugins/cinema4d
mkdir -p python311/libs
mv venv/lib/python3.11/site-packages/pxr python311/libs/
mv venv/lib/python3.11/site-packages/usd_core-24.3.dist-info python311/libs/
mv venv/Lib/site-packages/pxr python311/libs/
mv venv/Lib/site-packages/usd_core-24.3.dist-info python311/libs/
zip -r package.zip plugins python311
- name: Upload Release Asset
id: upload-release-asset
Expand All @@ -150,7 +150,7 @@ jobs:
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: ./plugins/Cinema4D/package.zip
asset_path: ./plugins/cinema4d/package.zip
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_Cinema4D.zip
asset_content_type: application/zip

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![alt text](docs/images/overview.png)

# OmooAsset
# Omoo Asset

USD based 3D model storage solution, our goal is **"create once, render anywhere"**.
If you're struggling to keep your model assets rendering consistently on different platforms by repeatedly creating material spheres manually, and Houdini is in your workflow, then Omoo Asset is the best choice!
Expand All @@ -19,9 +19,9 @@ Future supported platforms:
- Unreal
- Unity

# Why OmooAsset ?
# Why Omoo Asset ?

Theoretically, as long as the platform can fully support USD | MaterialX, it can ensure consistency itself. However, rendering effects and channel definitions are difficult to standardize across platforms and are unlikely to be resolved in the short term. For example, some renderers support the effect of model scaling on displacement strength, while others do not. This is a problem that Omoo Asset wants to solve, to maximize the consistency of the rendering result, especially the subsurface scattering.
Theoretically, as long as the platform can fully support USD | MaterialX, it can ensure consistency itself. However, materials and channel definitions are difficult to standardize across platforms and are unlikely to be resolved in the short term. For example, some renderers support the effect of model scaling on displacement strength, while others do not. This is a problem that Omoo Asset wants to solve, to maximize the consistency of the rendering result, especially the subsurface scattering.

![alt text](docs/images/results.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.


from .omoo_asset import (
from .io import (
OmooAssetMenu,
ImportOmooAsset
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ class ImportOmooAsset(Operator, ImportHelper):
) # type: ignore

def execute(self, context):
file_path: str = Path(self.filepath).resolve().as_posix()
file_path: Path = Path(self.filepath).resolve()

stage = Usd.Stage.Open(file_path)
stage = Usd.Stage.Open(file_path.as_posix())
asset_prim = stage.GetDefaultPrim()
asset_name = asset_prim.GetName()
materials_prim = stage.GetPrimAtPath(
Expand All @@ -255,7 +255,7 @@ def execute(self, context):
geometry_paths.append(geometry_prim.GetPath())

# import usd
bpy.ops.wm.usd_import(filepath=self.filepath, relative_path=True)
bpy.ops.wm.usd_import(filepath=file_path.as_posix(), relative_path=True)

# edit materials
materials = set()
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit bf09d38

Please sign in to comment.