Skip to content

Commit

Permalink
Merge pull request #54 from monkeyman192/development
Browse files Browse the repository at this point in the history
Fixed a few small issues
  • Loading branch information
monkeyman192 authored Aug 28, 2019
2 parents 75aa413 + 0fa23e1 commit d35aaed
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
per-file-ignores = __init__.py:E402
3 changes: 1 addition & 2 deletions ModelImporter/import_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def __init__(self, fpath, parent_obj=None, ref_scenes=dict(),
# This list of joints is used to add all the bones if needed
self.joints = list()
self.skinned_meshes = list()
self.mesh_binding_data = None
# inverse bind matrices are the global transforms of the joints parent
self.inv_bind_matrices = dict()
# bind matrices are the local transforms of the intial states of the
Expand Down Expand Up @@ -185,8 +186,6 @@ def __init__(self, fpath, parent_obj=None, ref_scenes=dict(),

if self.settings['import_bones']:
self.mesh_binding_data = read_mesh_binding_data(self.geometry_file)
else:
self.mesh_binding_data = None

self.scn.nmsdk_anim_data.has_bound_mesh = (
self.mesh_binding_data is not None)
Expand Down
2 changes: 1 addition & 1 deletion NMSDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class NMS_Import_Operator(Operator, ImportHelper):
load_anims = BoolProperty(
name='Load all animations',
description='Whether or not to load all the animation data initially',
default=True)
default=False)

def draw(self, context):
layout = self.layout
Expand Down
29 changes: 17 additions & 12 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
bl_info = {
"name": "No Man's Sky Development Kit",
"author": "gregkwaste, monkeyman192",
"version": (0, 9, 17),
"blender": (2, 79, 0),
"location": "File > Export",
"description": "Create NMS scene structures and export to NMS File format",
"warning": "",
"wiki_url": "https://monkeyman192.github.io/NMSDK/",
"tracker_url": "https://github.com/monkeyman192/NMSDK/issues",
"category": "Import-Export"}


import bpy # pylint: disable=import-error
from bpy.props import PointerProperty, EnumProperty # noqa pylint: disable=import-error, no-name-in-module

Expand All @@ -21,18 +34,6 @@

customNodes = NMSNodes()

bl_info = {
"name": "No Man's Sky Development Kit",
"author": "gregkwaste, monkeyman192",
"version": (0, 9, 16),
"blender": (2, 79, 0),
"location": "File > Export",
"description": "Create NMS scene structures and export to NMS File format",
"warning": "",
"wiki_url": "https://monkeyman192.github.io/NMSDK/",
"tracker_url": "https://github.com/monkeyman192/NMSDK/issues",
"category": "Import-Export"}


# Only needed if you want to add into a dynamic menu
def menu_func_export(self, context):
Expand Down Expand Up @@ -108,3 +109,7 @@ def unregister():
customNodes.unregister()
NMSEntities.unregister()
SettingsPanels.unregister()


if __name__ == '__main__':
register()
13 changes: 11 additions & 2 deletions docs/change_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

## Releases:

### Current - v0.9.15
### Current - v0.9.17

- Mostly internal updates. Made some changes to the internal API and added a new public function for exporting models via the command line. More information can be found on the [API guide](api.md) page.
- Fixed the issue where adding the addon from a zip file wouldn't actually add it to blender.
- NMSDK can now also be run on blender on linux, however MBINCompiler doesn't work on this platform so it has limited uses...

### Past:

### v0.9.16 (20/08/2019)

- Quick fix to implement compatibility with new Beyond-style scenes.

### v0.9.15 (13/08/2019)

- Mostly internal updates. Made some changes to the internal API and added a new public function for exporting models via the command line. More information can be found on the [API guide](api.md) page.

### v0.9.14 (10/08/2019)

- The animation exporting system has received a major overhaul. It is now far mor easy for each part to have mutliple animations.
Expand Down
9 changes: 7 additions & 2 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Installing NMSDK is very easy. Head to the [NMSDK Release page](https://github.com/monkeyman192/NMSDK/releases) on GitHub and download the most recently released version.

If you have had a previous version of NMSDK installed it is recommended that you remove it.
Generally the addons will be installed at `%APPDATA%\Blender Foundation\Blender\2.79\scripts\addons`. If you go to this location and there is an `nmsdk` folder. Delete it after removing the addon from within blender, then follow the following steps.
Removing the old version is particularly important if you had a very old version (pre-proper versioning), as there have been many internal changes to NMSDK since then and the old files will clash, causing odd issues.

Open Blender and open the user settings (Ctrl + Alt + U) (or `File` > `User Preferences...`), and select `Install Add-on from File...` (it is at the bottom left of the window).
Select the `.zip` file you just downloaded and blender should install it without any errors.

Expand All @@ -11,10 +15,11 @@ To make exporting easier, NMSDK will automatically convert all produced `.exml`

#### Blender

NMSDK requires a version of blender greater than or equal to 2.79.
This is due to the model importer component to need a shader node that only exists with Blender 2.79 and above.
NMSDK requires a version of blender greater than or equal to 2.79b.
This is due to the model importer component to need a shader node that only exists with Blender 2.79b and above.

NMSDK has not been tested for blender 2.80, however it is likely to not work, and support for 2.80 will not come until 2.80 is out of beta and is the latest official release.
If you wish to still use blender 2.80, it is recommended that you install a portable blender 2.79b version from [here](https://sourceforge.net/projects/portableapps/files/Blender%20Portable/)

#### MBINCompiler

Expand Down
2 changes: 1 addition & 1 deletion tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
shutil.copytree(src, dst)
else:
shutil.copy(src, dst)
shutil.make_archive(zip_dst, 'zip', nmsdk_src)
shutil.make_archive(zip_dst, 'zip', tempdir)
16 changes: 13 additions & 3 deletions utils/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@
import json
import os.path as op
import os


SETTINGS_DIR = op.join(os.getenv('APPDATA'), 'NMSDK')
from platform import system as os_name


_os_name = os_name()
if _os_name == 'Windows':
SETTINGS_DIR = op.join(os.getenv('APPDATA'), 'NMSDK')
elif _os_name == 'Linux':
SETTINGS_DIR = op.expanduser('~/NMSDK')
elif _os_name == 'Darwin':
# UNTESTED!
SETTINGS_DIR = op.join(op.expanduser('~'), 'Library', 'NMSDK')
else:
raise ValueError('Current operating system is not supported sorry!')
SETTINGS_FNAME = 'settings.json'

DEFAULT_SETTINGS = {'export_directory': 'CUSTOMMODELS',
Expand Down

0 comments on commit d35aaed

Please sign in to comment.