Skip to content

Commit

Permalink
Update to 0.18.0
Browse files Browse the repository at this point in the history
Update to 0.18.0
  • Loading branch information
Darkblader24 committed Dec 18, 2020
2 parents 89702cd + 01986c0 commit 2e171a3
Show file tree
Hide file tree
Showing 84 changed files with 7,201 additions and 2,049 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -12,6 +12,7 @@ resources/downloads
resources/settings.json
resources/dictionary_google.json
resources/google-response.txt
resources/google-response-readable.txt
resources/ignore_version.txt
resources/no_auto_ver_check.txt
.coverage
Expand Down
90 changes: 47 additions & 43 deletions README.md
@@ -1,4 +1,4 @@
# Cats Blender Plugin (0.17.0)

This comment has been minimized.

Copy link
@nyxart

nyxart Sep 2, 2021

g

# Cats Blender Plugin (0.18.0)

A tool designed to shorten steps needed to import and optimize models into VRChat.
Compatible models are: MMD, XNALara, Mixamo, Source Engine, Unreal Engine, DAZ/Poser, Blender Rigify, Sims 2, Motion Builder, 3DS Max and potentially more
Expand All @@ -17,14 +17,13 @@ There are a lot of perks like having your name inside the plugin!
- Optimizing model with one click!
- Creating lip syncing
- Creating eye tracking
- Automatic decimation
- Automatic decimation (while keeping shapekeys)
- Creating custom models easily
- Creating texture atlas
- Creating root bones for Dynamic Bones
- Optimizing materials
- Translating shape keys, bones, materials and meshes
- Merging bone groups to reduce overall bone count
- Protecting your avatars from game cache ripping
- Auto updater

*More to come!*
Expand Down Expand Up @@ -52,11 +51,11 @@ Join our Discord to report errors, suggestions and make comments!

![](https://i.imgur.com/pJfVsho.png)

- If you need help figuring out how to use the tool:
- If you need help figuring out how to use the tool (very outdated):

[![VRChat - Cat's Blender Plugin Overview](https://img.youtube.com/vi/0gu0kEj2xwA/0.jpg)](https://www.youtube.com/watch?v=0gu0kEj2xwA)

Skip the step where he installs "mmd_tools" in the video below, it's not needed anymore!
Skip the step where he installs "mmd_tools" in the video below, it's not needed anymore! (also very outdated)

[![VRChat - Importing an MMD to VRChat Megatutorial!](https://img.youtube.com/vi/7P0ljQ6hU0A/0.jpg)](https://www.youtube.com/watch?v=7P0ljQ6hU0A)

Expand All @@ -65,6 +64,9 @@ Skip the step where he installs "mmd_tools" in the video below, it's not needed
- Shotariya
- Neitri
- Kiraver
- Jordo
- Ruubick
- feilen


## Model
Expand Down Expand Up @@ -190,10 +192,13 @@ This uses an internal dictionary and Google Translate.

## Decimation

![](https://i.imgur.com/vozxKy9.png)
![](https://i.imgur.com/5u3teLp.png)

**Decimate your model automatically.**

##### Smart Decimation
- This will decimate all meshes while keeping every shapekey.

##### Save Decimation
- This will only decimate meshes with no shape keys.

Expand All @@ -204,7 +209,7 @@ This uses an internal dictionary and Google Translate.
- This will decimate your whole model deleting all shape keys in the process.

##### Custom Decimation
- This will let you choose which meshes and shape keys should not be decimated.
- This lets you choose the meshes and shape keys that should not be decimated.


## Eye Tracking
Expand Down Expand Up @@ -282,6 +287,15 @@ This works by checking all bones and trying to figure out if they can be grouped
- Starts the merge process


## Bake

![](https://user-images.githubusercontent.com/1109288/97830517-147d1500-1c82-11eb-8b20-feba732ad672.png)

**This is a non-destructive way to produce an optimized variant of (almost) any avatar!**

For more information please visit the **[Bake Panel Wiki Page](https://github.com/GiveMeAllYourCats/cats-blender-plugin/wiki/Bake)**.


## Shape Key

![](https://i.imgur.com/LgFK4KO.png)
Expand All @@ -297,9 +311,35 @@ This works by checking all bones and trying to figure out if they can be grouped
**This plugin has an auto updater.**
It checks for a new version automatically once every day.

---

## Changelog

#### 0.18.0
- **Added Bake Panel!**
- This is a non-destructive way to produce an optimized variant of (almost) any avatar!
- Full credit goes to **feilen**! Thanks so much for this awesome feature <3
- Check out the wiki for more information: https://github.com/GiveMeAllYourCats/cats-blender-plugin/wiki/Bake
- **Added Smart Decimation!**
- This lets you decimate without loosing any shapekeys!
- Full credit goes to **feilen**! Tons of thanks for this awesome feature as well <3
- **Added Japanese translation!**
- Cats is now almost fully translated into Japanese
- To use it simply change your Blender language to Japanese and then restart Blender
- Full credit goes to **Jordo** and **Ruuubick**! Thank you so much <3
- If you want to help translating Cats into any language, please us know!
- **General:**
- Cats is now fully compatible with Blender 2.90 and 2.91
- Added "Show mmd_tools tabs" option to Settings
- This allows you show and hide the "MMD" and "Misc" tabs added by the mmd_tools plugin
- Added button to "Start/Stop Pose Mode" which starts/stops pose mode without resetting the current pose
- Changed link to a new vrm importer since the old one dropped support
- Fixed Google Translations no longer working
- Fixed bug in "Apply as Rest Pose" and "Pose to Shape Key" in Blender 2.90
- More fixes for Blender 2.90
- NOTE: Using Cats in Blender 2.90+ on Ubuntu might cause Blender to crash on load (caused by mmd_tools)
- To fix this use a Blender version prior to 2.90 or try updating your drivers

#### 0.17.0
- **Cats is now fully compatible with Blender 2.83!**
- *It was compatible with 2.82 all long*
Expand Down Expand Up @@ -329,42 +369,6 @@ It checks for a new version automatically once every day.
- Fixed objects getting unhidden when doing any cats operation in 2.80+
- Updated mmd_tools

#### 0.16.1
- Fixed export warning bug

#### 0.16.0
- **Cats is now fully compatible with Blender 2.81!**
- **Importer**:
- Added support for ZIP files
- It will only extract the zip if importable models are found
- If multiple models are found in the zip, you can select the one you want in a popup window
- Japanese zip files will be extracted with the correct encoding
- Models can now be imported with Cats via the Windows command shell
- **Fix Model**:
- Hips bone will now be larger than before, to comply with the VRChat recommendations
- Read through them here: https://docs.vrchat.com/docs/full-body-tracking
- FFXIV models are now compatible
- Added "Fix Materials" option in Blender 2.80 and higher
- This will apply some VRChat related fixes to materials
- This has always been done in Fix Model but now you can turn it off
- **Model Options**:
- Remove Doubles no longer effects meshes with no shapekeys
- **Custom Model Creation**:
- Added "Join Meshes" option
- Merge Armatures and Attach Mesh no longer require a mesh on the armature
- Fixed bones from the merge armature sometimes getting unintentionally deleted
- **Optimization**:
- Added manual download button if Material Combiner is outdated
- **Copy Protection**:
- Removed Copy Protection panel
- It is no longer a good method for protecting against cache ripping
and it can cause performance and lighting issues
- **General**:
- Armatures will no longer be forced into rest position after any action
- Fixed armatures sometimes not getting detected
- Small bug fixes
- Updated mmd_tools

Read the full changelog [here](https://github.com/michaeldegroot/cats-blender-plugin/releases).


Expand Down
60 changes: 35 additions & 25 deletions __init__.py
Expand Up @@ -30,7 +30,7 @@
'author': 'GiveMeAllYourCats & Hotox',
'location': 'View 3D > Tool Shelf > CATS',
'description': 'A tool designed to shorten steps needed to import and optimize models into VRChat',
'version': (0, 17, 0), # Has to be (x, x, x) not [x, x, x]!! # Only change this version and the dev branch var right before publishing the new update!
'version': (0, 18, 0), # Has to be (x, x, x) not [x, x, x]!! Only change this version and the dev branch var right before publishing the new update!
'blender': (2, 80, 0),
'wiki_url': 'https://github.com/michaeldegroot/cats-blender-plugin',
'tracker_url': 'https://github.com/michaeldegroot/cats-blender-plugin/issues',
Expand All @@ -49,6 +49,7 @@
import shutil
import pathlib
import requests
import platform

from . import globs

Expand All @@ -59,22 +60,28 @@
else:
is_reloading = True

import mmd_tools_local

# Load or reload all cats modules
if not is_reloading:
# This order is important
import mmd_tools_local
# import mmd_tools_local
from . import updater
from . import translations
from . import tools
from . import ui
from . import extentions
else:
import importlib
importlib.reload(updater)
importlib.reload(mmd_tools_local)
importlib.reload(translations)
importlib.reload(tools)
importlib.reload(ui)
importlib.reload(extentions)

from .translations import t


# How to update mmd_tools: (outdated, no longer used)
# Delete mmd_tools_local folder
Expand All @@ -84,7 +91,13 @@
# Search for "show_backface_culling" and set it to False in view.py
# Done

# How to update googletrans:
# How to update google_trans_new:
# In google_trans.py comment out everything that has to do with urllib3
# This is done because 3.5 doesn't have urllib3 by default and it is only used
# to suppress debug logs in the console
# Done

# How to update googletrans: (outdated since a new googletrans is used Todo remove this)
# in the gtoken.py on line 57 update this line to include "verify=False":
# r = self.session.get(self.host, verify=False)
# In client.py on line 42 remove the Hyper part, it's not faster at all!
Expand Down Expand Up @@ -167,18 +180,12 @@ def remove_corrupted_files():
if no_perm:
unregister()
sys.tracebacklimit = 0
raise ImportError('\n\nFaulty CATS installation found!'
'\nTo fix this restart Blender as admin! '
'\n')
raise ImportError(t('Main.error.restartAdmin'))

if os_error:
unregister()
sys.tracebacklimit = 0
message = ' ' \
' '\
'\n\nFaulty CATS installation found!' \
'\nTo fix this delete the following files and folders inside your addons folder:' \
'\n'
message = t('Main.error.deleteFollowing')

for folder in folders:
if folder in to_remove:
Expand All @@ -193,34 +200,26 @@ def remove_corrupted_files():
if wrong_path:
unregister()
sys.tracebacklimit = 0
raise ImportError('\n\nFaulty CATS installation found!'
'\nPlease install CATS via User Preferences and restart Blender!'
'\n')
raise ImportError(t('Main.error.installViaPreferences'))

if faulty_installation:
unregister()
sys.tracebacklimit = 0
raise ImportError('\n\nFaulty CATS installation was found and fixed!'
'\nPlease restart Blender and enable CATS again!'
'\n')
raise ImportError(t('Main.error.restartAndEnable'))


def check_unsupported_blender_versions():
# Don't allow Blender versions older than 2.79
if bpy.app.version < (2, 79):
unregister()
sys.tracebacklimit = 0
raise ImportError('\n\nBlender versions older than 2.79 are not supported by Cats. '
'\nPlease use Blender 2.79 or later.'
'\n')
raise ImportError(t('Main.error.unsupportedVersion'))

# Versions 2.80.0 to 2.80.74 are beta versions, stable is 2.80.75
if (2, 80, 0) <= bpy.app.version < (2, 80, 75):
unregister()
sys.tracebacklimit = 0
raise ImportError('\n\nYou are still on the beta version of Blender 2.80!'
'\nPlease update to the release version of Blender 2.80.'
'\n')
raise ImportError(t('Main.error.beta2.80'))


def set_cats_version_string():
Expand Down Expand Up @@ -265,6 +264,9 @@ def register():
# Register Updater and check for CATS update
updater.register(bl_info, dev_branch, version_str)

# Load translations and check for missing translations
translations.check_missing_translations()

# Set some global settings, first allowed use of globs
globs.dev_branch = dev_branch
globs.version_str = version_str
Expand All @@ -277,15 +279,16 @@ def register():
show_error = True
if show_error:
sys.tracebacklimit = 0
raise ImportError('\n\nPlease restart Blender and enable CATS again!'
'\n')
raise ImportError(t('Main.error.restartAndEnable_alt'))

# if not tools.settings.use_custom_mmd_tools():
# bpy.utils.unregister_module("mmd_tools")

# Load mmd_tools
try:
mmd_tools_local.register()
except NameError:
print('Could not register local mmd_tools')
except AttributeError:
print('Could not register local mmd_tools')
except ValueError:
Expand Down Expand Up @@ -349,9 +352,16 @@ def unregister():
# Unregister updater
updater.unregister()

# Register unloaded mmd_tools tabs if they are hidden to avoid issues when unloading mmd_tools
if not bpy.context.scene.show_mmd_tabs:
tools.common.toggle_mmd_tabs(shutdown_plugin=True)

# Unload mmd_tools
try:
mmd_tools_local.unregister()
except NameError:
print('mmd_tools was not registered')
pass
except AttributeError:
print('Could not unregister local mmd_tools')
pass
Expand Down

0 comments on commit 2e171a3

Please sign in to comment.