Skip to content

Commit

Permalink
Merge pull request #6 from michaeldegroot/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
absolute-quantum authored Nov 25, 2017
2 parents edd341f + ebafa84 commit 2aa486d
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 123 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A tool designed to shorten steps needed to import and optimise MMD models into V
1. download the plugin: [Cats Blender Plugin](https://github.com/michaeldegroot/cats-blender-plugin/raw/downloads/Cats%20Blender%20Plugin.zip)

**Important!!**
You are downloading a older version of the plugin here, which is required: You will need to check the update tab of the plugin and update it to the latest version from there!
You are downloading an older version of the plugin here, which is required: You will need to check the update tab of the plugin and update it to the latest version from there!

2. Install the the addon in blender like so:

Expand All @@ -35,7 +35,7 @@ You are downloading a older version of the plugin here, which is required: You w

#### 0.0.2
- Added: Eye tracking, added a check to see if a vertex group and vertices were assigned to the eye bones before continuing
- Added: Added a auto updater to easily keep track of new updates of the plugin
- Added: Added an auto updater to easily keep track of new updates of the plugin
- Added: Mouth viseme, added a strength modifier for the mixing of the shapes
- Added: plugin support (install as addon in blender)
- Changed: UI improved
Expand Down Expand Up @@ -67,16 +67,16 @@ You are downloading a older version of the plugin here, which is required: You w
- Added: Credits tab :)
- Changed: Translation: Using googletrans module ( = faster! thanks Hotox!)
- Changed: Codebase modularised, project is more tidy now. Good for future updates
- Changed: UI: every function has it's own collapsable panel now
- Changed: UI: every function has it's own collapsible panel now
- Fixed: Mouth viseme: Adding random key shape weight to the mix with 0.0001 weight to fix a weird blender export condition (should fix open mouth)
- Fixed: Eye tracking: Adding random key shape weight to the mix with 0.0001 weight to fix a weird blender export condition (should fix any future problems that may arise)

#### 0.0.6
- Added: Dependency Tab: Gives a warning if mmd_tools are not activated or installed (Thanks Hotox!)
- Added: Armature: A one fix it all button for MMD models (still work in progress but a good start!)
- Added: Armature: A fix it all button for MMD models (still work in progress but a good start!)
- Added: Armature: Fixes the hips angle VRCSDK error
- Added: Armature: Deletes rigidbodies and joints
- Added: Armature: Bone hierachy validation: Hips > Spine > Chest etc to make sure you get no problems in Unity
- Added: Armature: Bone hierarchy validation: Hips > Spine > Chest etc to make sure you get no problems in Unity
- Added: Armature: Uses MMD_TOOLS to translate bones and reparent and weight them with Shotariya's tool
- Added: Armature: Neitri's zero weight and bone constraint code implemented (there are some small issues with this at the moment, should be fixed soon)
- Fixed: Viseme: Mesh selection in visemes function would not have effect on the shape key selection list
Expand Down Expand Up @@ -111,7 +111,7 @@ Lower for faster bake time, higher for more detail.
Weight projections vector by faces with larger areas

##### Target mesh
The mesh that you want to create a atlas from
The mesh that you want to create an atlas from

##### Disable multiple textures
Texture baking and multiple textures per material can look weird in the end result. Check this box if you are experiencing this.
Expand All @@ -122,7 +122,7 @@ Texture baking and multiple textures per material can look weird in the end resu

**Mouth visemes are used to show more realistic mouth movement in-game when talking over the microphone**
The script generates 17 shape keys from the 3 shape keys you specified. It uses the mouth visemes A, OH and CH to generate this output.
*This is still a experimental feature and will be fine tuned over the course of time*
*This is still an experimental feature and will be fine tuned over the course of time*

### Properties

Expand Down Expand Up @@ -231,13 +231,13 @@ Removes all bone constraints


## Update Plugin
There is a auto updater in the plugin so you don't have to keep checking for new version, this is actually required if you install the plugin for the first time. This is how to check for updates:
There is an auto updater in the plugin so you don't have to keep checking for new version, this is actually required if you install the plugin for the first time. This is how to check for updates:

![](https://i.imgur.com/LbO7Xst.gif)

## Roadmap
- MOAR Updates on the armature code
- Texture translation should have a option to rename the filename also
- Texture translation should have an option to rename the filename also


## Feedback
Expand Down
65 changes: 29 additions & 36 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@
except ImportError:
mmd_tools_installed = False

try:
dictionary = bpy.props.EnumProperty(
name='Dictionary',
items=DictionaryEnum.get_dictionary_items,
description='Translate names from Japanese to English using selected dictionary',
)
except Exception as e:
mmd_tools_installed = False

importlib.reload(tools.viseme)
importlib.reload(tools.atlas)
importlib.reload(tools.eyetracking)
Expand Down Expand Up @@ -171,13 +162,13 @@ class ToolPanel():

bpy.types.Scene.wink_right = bpy.props.EnumProperty(
name='Blink right',
description='The shape key containing a blink with the right eye',
description='The shape key containing a blink with the right eye. Can be set to "Basis" to leave empty',
items=tools.common.get_shapekeys_eye,
)

bpy.types.Scene.wink_left = bpy.props.EnumProperty(
name='Blink left',
description='The shape key containing a blink with the left eye',
description='The shape key containing a blink with the left eye. Can be set to "Basis" to leave empty',
items=tools.common.get_shapekeys_eye,
)

Expand Down Expand Up @@ -265,22 +256,22 @@ class ToolPanel():


class ArmaturePanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_armature'
bl_idname = 'VIEW3D_PT_armature_v1'
bl_label = 'Armature'

def draw(self, context):
layout = self.layout
box = layout.box()
row = box.row(align=True)
# row.prop(context.scene, 'remove_zero_weight')
# row = box.row(align=True)
# row.prop(context.scene, 'remove_constraints')
# row = box.row(align=True)
row.prop(context.scene, 'remove_zero_weight')
row = box.row(align=True)
row.prop(context.scene, 'remove_constraints')
row = box.row(align=True)
row.operator('armature.fix', icon='BONE_DATA')


class EyeTrackingPanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_eye'
bl_idname = 'VIEW3D_PT_eye_v1'
bl_label = 'Eye Tracking'
bl_options = {'DEFAULT_CLOSED'}

Expand Down Expand Up @@ -313,7 +304,7 @@ def draw(self, context):


class VisemePanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_viseme'
bl_idname = 'VIEW3D_PT_viseme_v1'
bl_label = 'Visemes'
bl_options = {'DEFAULT_CLOSED'}

Expand All @@ -335,7 +326,7 @@ def draw(self, context):


class TranslationPanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_translation'
bl_idname = 'VIEW3D_PT_translation_v1'
bl_label = 'Translation'
bl_options = {'DEFAULT_CLOSED'}

Expand All @@ -352,7 +343,7 @@ def draw(self, context):


class BoneRootPanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_boneroot'
bl_idname = 'VIEW3D_PT_boneroot_v1'
bl_label = 'Bone Parenting'
bl_options = {'DEFAULT_CLOSED'}

Expand All @@ -367,7 +358,7 @@ def draw(self, context):


class AtlasPanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_atlas'
bl_idname = 'VIEW3D_PT_atlas_v1'
bl_label = 'Atlas'
bl_options = {'DEFAULT_CLOSED'}

Expand All @@ -390,38 +381,37 @@ def draw(self, context):
row = box.row(align=True)
row.operator('auto.atlas', icon='TRIA_RIGHT')


class UpdaterPanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_updater'
bl_idname = 'VIEW3D_PT_updater_v1'
bl_label = 'Updater'
bl_options = {'DEFAULT_CLOSED'}

def draw(self, context):
addon_updater_ops.check_for_update_background()
addon_updater_ops.update_settings_ui(self, context)


class CreditsPanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_credits'
bl_idname = 'VIEW3D_PT_credits_v1'
bl_label = 'Credits'

def draw(self, context):
layout = self.layout
box = layout.box()
row = box.row(align=True)
box.label('Cats Blender Plugin')
row = box.row(align=True)
box.label('Created by GiveMeAllYourCats for the VRC community <3')
row = box.row(align=True)
box.label('Special thanks to: Shotariya, Hotox and Neitri!')


class DependenciesPanel(ToolPanel, bpy.types.Panel):
bl_idname = 'VIEW3D_PT_dependencies'
bl_idname = 'VIEW3D_PT_dependencies_v1'
bl_label = 'Missing dependencies!'

def draw(self, context):
layout = self.layout
box = layout.box()
row = box.row(align=True)
box.label('"mmd_tools" is not installed or activated!', icon="ERROR")
box.label('"mmd_tools" is not installed!', icon="ERROR")
box.label('Please download the latest version here:')
row = box.row(align=True)
row.operator('dependencies.download', icon='LOAD_FACTORY')
Expand All @@ -436,40 +426,41 @@ class DemoPreferences(bpy.types.AddonPreferences):
name='Auto-check for Update',
description='If enabled, auto-check for updates using an interval',
default=False,
)
)
updater_intrval_months = bpy.props.IntProperty(
name='Months',
description='Number of months between checking for updates',
default=0,
min=0
)
)
updater_intrval_days = bpy.props.IntProperty(
name='Days',
description='Number of days between checking for updates',
default=7,
min=0,
)
)
updater_intrval_hours = bpy.props.IntProperty(
name='Hours',
description='Number of hours between checking for updates',
default=0,
min=0,
max=23
)
)
updater_intrval_minutes = bpy.props.IntProperty(
name='Minutes',
description='Number of minutes between checking for updates',
default=0,
min=0,
max=59
)
)

def draw(self, context):
layout = self.layout

# updater draw function
addon_updater_ops.update_settings_ui(self, context)


def register():
bpy.utils.register_class(tools.atlas.AutoAtlasButton)
bpy.utils.register_class(tools.eyetracking.CreateEyesButton)
Expand All @@ -496,6 +487,7 @@ def register():
bpy.utils.register_class(DemoPreferences)
addon_updater_ops.register(bl_info)


def unregister():
bpy.utils.unregister_class(tools.atlas.AutoAtlasButton)
bpy.utils.unregister_class(tools.eyetracking.CreateEyesButton)
Expand All @@ -509,8 +501,8 @@ def unregister():
bpy.utils.unregister_class(tools.rootbone.RefreshRootButton)
bpy.utils.unregister_class(tools.armature.FixArmature)
bpy.utils.unregister_class(tools.dependencies.DependenciesButton)
if mmd_tools_installed is False:
bpy.utils.register_class(DependenciesPanel)
if hasattr(bpy.types, "DependenciesPanel"):
bpy.utils.unregister_class(DependenciesPanel)
bpy.utils.unregister_class(AtlasPanel)
bpy.utils.unregister_class(EyeTrackingPanel)
bpy.utils.unregister_class(VisemePanel)
Expand All @@ -522,5 +514,6 @@ def unregister():
bpy.utils.unregister_class(DemoPreferences)
addon_updater_ops.unregister()


if __name__ == '__main__':
register()
Loading

0 comments on commit 2aa486d

Please sign in to comment.