Skip to content

Commit

Permalink
Merge development to main to prepare for v0.1.0 release (#15)
Browse files Browse the repository at this point in the history
* Added documentation and typing to PRIM module

* Refactored the vtxd module

Removed the bl_import and bl_export functionality as it was did not add any real functionality to the addon.

The module format is kept because it provides an easy way to implement potential vtxd features in the future.

* Added comments and typing to the BORG module

* Small refactor in the main init file, removed duplicate licence

* Small bugfix in bl_export_prim.py

* Update README.md

* Remove license header from __init__.py

* Add lod slider preview to README

* Feature/extended UI (#13)

* Added some readonly type fields

* Expose more prim properties

* Small bugfixes, balance changes

* Added collection selector for prim exporting

* Added check to see if the UVmap is set

* Added batch importing of prim

* Added setting of default collection when exporting prim

* Fix typo

* Clean up comments/descriptions

Co-authored-by: Notexe <43296291+Notexe@users.noreply.github.com>

* Update and add descriptions

* Add release.yml GH workflow (#14)

* Add release.yml GH workflow file

* Remove test branch from GH workflow

* Add Import-Export category to bl_info

* Add doc andtracker urls to bl_info

* Change version in bl_info to 0.1.0

* Correctly assign rig_resource_index when it's negative

* Removed the draw destination property

Co-authored-by: Notexe <43296291+Notexe@users.noreply.github.com>
  • Loading branch information
dafitius and Notexe authored Nov 27, 2022
1 parent 22191cd commit 9b21b20
Show file tree
Hide file tree
Showing 15 changed files with 979 additions and 963 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
branches:
- main
tags:
- v*

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Make release
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir io_scene_glacier
rsync -av --progress . ./io_scene_glacier --exclude '.*'
zip -r io_scene_glacier-${{github.ref_name}}.zip io_scene_glacier
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
io_scene_glacier-${{github.ref_name}}.zip
38 changes: 35 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# io_scene_glacier
# Glacier 2 Blender addon
*View and create assets from the Glacier 2 game engine.*

![lod_slider](https://user-images.githubusercontent.com/43296291/203970131-4080b2cb-c09e-49e4-b8a9-5aa9a9a61d50.gif)

## Supported Titles and Features
The following games are supported by this addon:

* Hitman 2016
* Hitman 2
* Hitman 3

The addon supports the following formats:

## Supported formats
| Extension | Description | Can import | Can export |
|---------------|-----------------------------------|:-----------------------------:|:-----------------------------:|
| .prim | Standard RenderPrimitive | Yes | Yes |
Expand All @@ -9,4 +20,25 @@
| .borg | AnimationBoneData | Yes | No |
| .mjba | MorphemeJointBoneAnimationData | No | No |
| .mrtr | MorphemeRuntimeRig | No | No |
| .vtxd | VertexData | Yes | No |
| .vtxd | VertexData | Yes | No |

*Support for more formats or titles may be added in the future*

## Requirements
- Blender **3.0.0** or above

## Installation
- Download the addon: **[Glacier 2 addon](https://github.com/glacier-modding/io_scene_glacier/archive/master.zip)**
- Install the addon in blender like so:
- go to *Edit > Preferences > Add-ons.*
- use the *Install…* button and use the File Browser to select the `.zip`

## Credits

* [PawREP](https://github.com/pawREP)
* For making the original `.prim` editing tool known as PrimIO that was used as a reference.


* [Khronos Group](https://github.com/KhronosGroup)
* For making glTF-Blender-IO that was used as a reference addon.

48 changes: 5 additions & 43 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,15 @@
# ##### BEGIN LICENSE BLOCK #####
#
# io_scene_glacier
# Copyright (c) 2020+, REDACTED
# All rights reserved.

# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:

# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.

# * Redistributions in binary form must reproduce the above copyright notice, this
# list of conditions and the following disclaimer in the documentation and/or
# other materials provided with the distribution.

# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ##### END LICENSE BLOCK #####

bl_info = {
"name": "Glacier 2 Engine Tools",
"description": "Tools for the Glacier 2 Engine",
"version": (1, 0, 0),
"version": (0, 1, 0),
"blender": (3, 0, 0),
"wiki_url": "",
"tracker_url": "",
"doc_url": "https://wiki.glaciermodding.org/blender",
"tracker_url": "https://github.com/glacier-modding/io_scene_glacier/issues",
"category": "Import-Export",
}

import bpy
from . import file_prim
from . import file_vtxd
from . import file_mjba
from . import file_borg

Expand Down Expand Up @@ -69,12 +40,6 @@ def show_lod_update(self, context):

obj.hide_set(not should_show)

if all(self.show_lod):
print("All selected")

if not any(self.show_lod):
print("None selected")

return None

show_lod: BoolVectorProperty(
Expand All @@ -84,8 +49,6 @@ def show_lod_update(self, context):
size=8,
subtype='LAYER',
update=show_lod_update,
# get=None,
# set=None
)


Expand Down Expand Up @@ -120,8 +83,7 @@ def draw(self, context):

modules = [
file_prim,
file_vtxd,
file_mjba,
# file_mjba, # WIP module. enable at own risk
file_borg
]

Expand Down
29 changes: 0 additions & 29 deletions file_borg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,10 @@
# ##### BEGIN LICENSE BLOCK #####
#
# io_scene_glacier
# Copyright (c) 2020+, REDACTED
# All rights reserved.

# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:

# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.

# * Redistributions in binary form must reproduce the above copyright notice, this
# list of conditions and the following disclaimer in the documentation and/or
# other materials provided with the distribution.

# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ##### END LICENSE BLOCK #####
import bpy

# ------------------------------------------------------------------------
# Registration
# ------------------------------------------------------------------------

classes = []

modules = []


Expand Down
Loading

0 comments on commit 9b21b20

Please sign in to comment.