├── .gitattributes ├── .github └── workflows │ └── update_readme.yml ├── .gitignore ├── .npmignore ├── .yamato ├── MeshSyncDCCPlugins-pack.yml ├── MeshSyncDCCPlugins-promotion.yml ├── MeshSyncDCCPlugins-publish.yml ├── MeshSyncDCCPlugins-test.yml ├── MeshSyncDCCPlugins-updated-dependencies-test.yml └── MeshSyncDCCPlugins.metafile ├── AutoGenerateParts ├── ReadmeFooter.md └── ReadmeHeader.md ├── CHANGELOG.md ├── CHANGELOG.md.meta ├── CODE_OF_CONDUCT.md ├── CODE_OF_CONDUCT.md.meta ├── CONTRIBUTING.md ├── CONTRIBUTING.md.meta ├── Documentation~ ├── 3dsMax.md ├── Blender.md ├── BlenderInstaller.md ├── Installation.md ├── Maya.md ├── MotionBuilder.md ├── TableOfContents.md ├── images │ ├── AutoSetup.png │ ├── BlenderSyncButtons.png │ ├── BlenderUnityProjectSection.png │ ├── Demo.gif │ ├── EditorSettings.png │ ├── MeshSyncClient3dsMax.png │ ├── MeshSyncClientBlender.png │ ├── MeshSyncClientBlender_Installation.png │ ├── MeshSyncClientBlender_ProBuilder.png │ ├── MeshSyncClientMQ.png │ ├── MeshSyncClientMaya.png │ ├── MeshSyncClientModo.png │ ├── MeshSyncClientMotionBuilder.png │ ├── MeshSyncPreferences.png │ ├── MeshSyncServerLiveEditProperties.png │ ├── PackageManager.png │ ├── ProjectSettings.png │ ├── baking_1.png │ └── baking_2.png └── index.md ├── Editor.meta ├── Editor ├── Plugins.meta └── Plugins │ ├── UnityMeshSync_3DSMAX_Windows.zip │ ├── UnityMeshSync_3DSMAX_Windows.zip.meta │ ├── UnityMeshSync_Blender_Linux.zip │ ├── UnityMeshSync_Blender_Linux.zip.meta │ ├── UnityMeshSync_Blender_Mac.zip │ ├── UnityMeshSync_Blender_Mac.zip.meta │ ├── UnityMeshSync_Blender_Windows.zip │ ├── UnityMeshSync_Blender_Windows.zip.meta │ ├── UnityMeshSync_Maya_Linux.zip │ ├── UnityMeshSync_Maya_Linux.zip.meta │ ├── UnityMeshSync_Maya_Mac.zip │ ├── UnityMeshSync_Maya_Mac.zip.meta │ ├── UnityMeshSync_Maya_Windows.zip │ ├── UnityMeshSync_Maya_Windows.zip.meta │ ├── UnityMeshSync_MotionBuilder_Linux.zip │ ├── UnityMeshSync_MotionBuilder_Linux.zip.meta │ ├── UnityMeshSync_MotionBuilder_Windows.zip │ └── UnityMeshSync_MotionBuilder_Windows.zip.meta ├── LICENSE.md ├── LICENSE.md.meta ├── MeshSyncDCCPlugins~ ├── Assets │ ├── FilmInternalUtilities.meta │ ├── FilmInternalUtilities │ │ ├── Editor.meta │ │ └── Editor │ │ │ ├── PackageChecker.cs │ │ │ ├── PackageChecker.cs.meta │ │ │ ├── Unity.FilmInternalUtilities.EditorWorkbench.asmdef │ │ │ └── Unity.FilmInternalUtilities.EditorWorkbench.asmdef.meta │ ├── MeshSyncDCCPlugins.meta │ ├── MeshSyncDCCPlugins │ │ ├── Editor.meta │ │ └── Editor │ │ │ ├── DebugInstallWindow.cs │ │ │ ├── DebugInstallWindow.cs.meta │ │ │ ├── Menu.cs │ │ │ ├── Menu.cs.meta │ │ │ ├── Unity.MeshSyncDCCPlugins.EditorWorkbench.asmdef │ │ │ └── Unity.MeshSyncDCCPlugins.EditorWorkbench.asmdef.meta │ ├── Scenes.meta │ └── Scenes │ │ ├── SampleScene.unity │ │ └── SampleScene.unity.meta ├── Packages │ ├── com.unity.meshsync-dcc-plugins │ │ ├── CHANGELOG.md │ │ ├── CHANGELOG.md.meta │ │ ├── Documentation~ │ │ ├── Editor │ │ ├── Editor.meta │ │ ├── LICENSE.md │ │ ├── LICENSE.md.meta │ │ ├── Tests │ │ ├── Tests.meta │ │ ├── package.json │ │ └── package.json.meta │ ├── manifest.json │ └── packages-lock.json └── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── MeshSyncSettings.asset │ ├── NavMeshAreas.asset │ ├── PackageManagerSettings.asset │ ├── Packages │ └── com.unity.probuilder │ │ └── Settings.json │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── SceneTemplateSettings.json │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ ├── VersionControlSettings.asset │ └── XRSettings.asset ├── Plugins~ ├── Build │ ├── VsDevCmd_2017.bat │ ├── cmake_modules │ │ ├── 3dsMax.cmake │ │ ├── AddPlugin.cmake │ │ ├── Blender.cmake │ │ ├── FindPoco.cmake │ │ ├── FindZSTD.cmake │ │ ├── ISPC.cmake │ │ ├── Maya.cmake │ │ ├── MeshSync.cmake │ │ ├── Metasequoia.cmake │ │ ├── Modo.cmake │ │ ├── MotionBuilder.cmake │ │ ├── Python.cmake │ │ ├── UnityPackage.cmake │ │ ├── Utilities.cmake │ │ └── ZSTD.cmake │ ├── make_meshsync_dcc_plugin │ └── make_meshsync_dcc_plugin.bat ├── CMakeLists.txt ├── DCCScripts │ └── Blender │ │ └── MeshSyncDebug.py ├── Dist │ ├── clean_and_build_dist │ └── create_meta ├── Docs │ ├── Images │ │ ├── CMakeInstallation.png │ │ ├── CreateSymbolicLinks_LocalSecurityPolicy.jpg │ │ ├── CreateSymbolicLinks_Properties.jpg │ │ ├── CreateSymbolicLinks_SelectUsers.jpg │ │ ├── Install3dsMaxSDK.png │ │ └── SceneCacheExport3DSMax.png │ └── en │ │ ├── BuildDCCPlugins.md │ │ ├── CreateSymbolicLinksOnWindows10.md │ │ ├── MakeOptionalArguments.md │ │ └── SetupDCC.md ├── External │ ├── Patches │ │ └── qt-4.8.7-win.patch │ ├── WTL │ │ └── include │ │ │ ├── atlapp.h │ │ │ ├── atlcrack.h │ │ │ ├── atlctrls.h │ │ │ ├── atlctrlw.h │ │ │ ├── atlctrlx.h │ │ │ ├── atlddx.h │ │ │ ├── atldlgs.h │ │ │ ├── atldwm.h │ │ │ ├── atlfind.h │ │ │ ├── atlframe.h │ │ │ ├── atlgdi.h │ │ │ ├── atlmisc.h │ │ │ ├── atlprint.h │ │ │ ├── atlres.h │ │ │ ├── atlresce.h │ │ │ ├── atlribbon.h │ │ │ ├── atlscrl.h │ │ │ ├── atlsplit.h │ │ │ ├── atltheme.h │ │ │ ├── atluser.h │ │ │ ├── atlwince.h │ │ │ └── atlwinx.h │ ├── glew │ │ └── include │ │ │ └── GL │ │ │ ├── eglew.h │ │ │ ├── glew.h │ │ │ ├── glxew.h │ │ │ └── wglew.h │ └── pybind11 │ │ ├── LICENSE │ │ ├── attr.h │ │ ├── buffer_info.h │ │ ├── cast.h │ │ ├── chrono.h │ │ ├── common.h │ │ ├── complex.h │ │ ├── detail │ │ ├── class.h │ │ ├── common.h │ │ ├── descr.h │ │ ├── init.h │ │ ├── internals.h │ │ └── typeid.h │ │ ├── eigen.h │ │ ├── embed.h │ │ ├── eval.h │ │ ├── functional.h │ │ ├── iostream.h │ │ ├── numpy.h │ │ ├── operators.h │ │ ├── options.h │ │ ├── pybind11.h │ │ ├── pytypes.h │ │ ├── stl.h │ │ └── stl_bind.h ├── Licenses │ ├── Poco │ │ └── LICENSE.txt │ ├── generate_licenses.py │ └── zstd │ │ └── LICENSE ├── Src │ ├── MeshSyncClient │ │ ├── AsyncTasksController.cpp │ │ ├── BaseSyncSettings.cpp │ │ ├── CMakeLists.txt │ │ ├── Include │ │ │ └── MeshSyncClient │ │ │ │ ├── AsyncTasksController.h │ │ │ │ ├── BaseCacheSettings.h │ │ │ │ ├── BaseSyncSettings.h │ │ │ │ ├── ExportTarget.h │ │ │ │ ├── FrameRange.h │ │ │ │ ├── MaterialFrameRange.h │ │ │ │ ├── ObjectScope.h │ │ │ │ ├── SceneCacheUtility.h │ │ │ │ ├── SettingsUtility.h │ │ │ │ ├── msEntityManager.h │ │ │ │ ├── msITransformManager.h │ │ │ │ ├── msInstancesManager.h │ │ │ │ ├── msMaterialManager.h │ │ │ │ ├── msPropertyManager.h │ │ │ │ ├── msTextureManager.h │ │ │ │ └── msTransformManager.h │ │ ├── SceneCacheUtility.cpp │ │ ├── SettingsUtility.cpp │ │ ├── msEntityManager.cpp │ │ ├── msInstancesManager.cpp │ │ ├── msMaterialManager.cpp │ │ ├── msPropertyManager.cpp │ │ ├── msTextureManager.cpp │ │ ├── pch.cpp │ │ └── pch.h │ ├── MeshSyncClient3dsMax │ │ ├── CMakeLists.txt │ │ ├── MaxCacheSettings.h │ │ ├── MaxSyncSettings.h │ │ ├── MeshSyncClient3dsMax.cpp │ │ ├── msmaxCallbacks.cpp │ │ ├── msmaxCallbacks.h │ │ ├── msmaxContext.cpp │ │ ├── msmaxContext.h │ │ ├── msmaxUI.cpp │ │ ├── msmaxUI.rc │ │ ├── msmaxUtils.cpp │ │ ├── msmaxUtils.h │ │ ├── pch.cpp │ │ ├── pch.h │ │ └── resource.h │ ├── MeshSyncClientBlender │ │ ├── BlenderCacheSettings.h │ │ ├── BlenderPyObjects │ │ │ ├── BlenderPyCommon.h │ │ │ ├── BlenderPyContext.cpp │ │ │ ├── BlenderPyContext.h │ │ │ ├── BlenderPyDepsgraph.cpp │ │ │ ├── BlenderPyDepsgraph.h │ │ │ ├── BlenderPyDepsgraphObjectInstance.cpp │ │ │ ├── BlenderPyDepsgraphObjectInstance.h │ │ │ ├── BlenderPyID.cpp │ │ │ ├── BlenderPyID.h │ │ │ ├── BlenderPyScene.cpp │ │ │ └── BlenderPyScene.h │ │ ├── BlenderSrc │ │ │ ├── customdata.cpp │ │ │ └── material.cpp │ │ ├── BlenderSyncSettings.h │ │ ├── BlenderUtility.cpp │ │ ├── BlenderUtility.h │ │ ├── CMakeLists.txt │ │ ├── MeshSyncClientBlender.cpp │ │ ├── msblenBinder.cpp │ │ ├── msblenBinder.h │ │ ├── msblenContext.cpp │ │ ├── msblenContext.h │ │ ├── msblenContextDefaultPathProvider.cpp │ │ ├── msblenContextDefaultPathProvider.h │ │ ├── msblenContextGeometryNodes.cpp │ │ ├── msblenContextIntermediatePathProvider.cpp │ │ ├── msblenContextIntermediatePathProvider.h │ │ ├── msblenContextPathProvider.h │ │ ├── msblenContextState.cpp │ │ ├── msblenContextState.h │ │ ├── msblenCurveHandler.cpp │ │ ├── msblenCurveHandler.h │ │ ├── msblenEntityHandler.cpp │ │ ├── msblenEntityHandler.h │ │ ├── msblenGeometryNodeUtils.h │ │ ├── msblenGeometryNodesUtils.cpp │ │ ├── msblenMacros.h │ │ ├── msblenMaterialsExportHelper.cpp │ │ ├── msblenMaterialsExportHelper.h │ │ ├── msblenModifiers.cpp │ │ ├── msblenModifiers.h │ │ ├── msblenUtils.cpp │ │ ├── msblenUtils.h │ │ ├── pch.cpp │ │ ├── pch.h │ │ ├── python │ │ │ ├── 2.90.1 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── 2.91.2 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── 2.92.0 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── 2.93.7 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── 3.0.1 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── 3.1.0 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── 3.2.0 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── 3.3.0 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── 3.4.0 │ │ │ │ └── unity_mesh_sync.py │ │ │ ├── unity_mesh_sync_baking.py │ │ │ ├── unity_mesh_sync_common.py │ │ │ ├── unity_mesh_sync_installation.py │ │ │ ├── unity_mesh_sync_materials.py │ │ │ └── unity_mesh_sync_preferences.py │ │ └── tools │ │ │ ├── extract_headers.py │ │ │ ├── gen_initpy.py │ │ │ └── replace_blender_version.py │ ├── MeshSyncClientMQ │ │ ├── CMakeLists.txt │ │ ├── MQCacheSettings.h │ │ ├── MeshSyncClientMQ3.cpp │ │ ├── MeshSyncClientMQ3.h │ │ ├── MeshSyncClientMQ4.cpp │ │ ├── MeshSyncClientMQ4.h │ │ ├── msmqContext.cpp │ │ ├── msmqContext.h │ │ ├── msmqPluginBase.cpp │ │ ├── msmqPluginBase.h │ │ ├── msmqUI3 │ │ │ ├── Dialog.rc │ │ │ ├── MainDlg.cpp │ │ │ ├── MainDlg.h │ │ │ └── resource.h │ │ ├── msmqUI4.cpp │ │ ├── msmqUI4.h │ │ ├── msmqUtils.cpp │ │ ├── msmqUtils.h │ │ ├── pch.cpp │ │ ├── pch.h │ │ ├── sdk_MQBasePlugin.cpp │ │ ├── sdk_MQBoneManager.cpp │ │ ├── sdk_MQInit.cpp │ │ ├── sdk_MQMorphManager.cpp │ │ ├── sdk_MQPlugin.cpp │ │ ├── sdk_MQSetting.cpp │ │ ├── sdk_MQWidget.cpp │ │ └── sdk_StringUtil.mm │ ├── MeshSyncClientMaya │ │ ├── CMakeLists.txt │ │ ├── LT │ │ │ ├── 2018 │ │ │ │ ├── MFn.h.patch │ │ │ │ ├── MItDependencyGraph.h.patch │ │ │ │ ├── MPxCommand.h.patch │ │ │ │ └── make_import_library.bat │ │ │ └── 2019 │ │ │ │ ├── MFn.h.patch │ │ │ │ ├── MItDependencyGraph.h.patch │ │ │ │ ├── MPxCommand.h.patch │ │ │ │ └── make_import_library.bat │ │ ├── MayaCacheSettings.h │ │ ├── MayaLTSupport.h │ │ ├── MayaSyncSettings.h │ │ ├── MeshSyncClientMaya.cpp │ │ ├── etc │ │ │ └── UnityMeshSync.mod │ │ ├── msmayaCommand.cpp │ │ ├── msmayaCommand.h │ │ ├── msmayaContext.cpp │ │ ├── msmayaContext.h │ │ ├── msmayaUtils.cpp │ │ ├── msmayaUtils.h │ │ ├── pch.cpp │ │ ├── pch.h │ │ └── scripts │ │ │ ├── UnityMeshSync_Cache.mel │ │ │ ├── UnityMeshSync_CacheGUI.mel │ │ │ ├── UnityMeshSync_GUI.mel │ │ │ ├── UnityMeshSync_Shelf.mel │ │ │ └── userSetup.mel │ ├── MeshSyncClientModo │ │ ├── CMakeLists.txt │ │ ├── ModoCacheSettings.h │ │ ├── ModoSyncSettings.h │ │ ├── msmodoCommand.cpp │ │ ├── msmodoCommand.h │ │ ├── msmodoCompat.h │ │ ├── msmodoContext.cpp │ │ ├── msmodoContext.h │ │ ├── msmodoInterface.cpp │ │ ├── msmodoInterface.h │ │ ├── msmodoUtils.cpp │ │ ├── msmodoUtils.h │ │ ├── msmodoWidget.cpp │ │ ├── msmodoWidget_moc.h │ │ ├── pch.cpp │ │ ├── pch.h │ │ └── tool │ │ │ ├── make_import_library.bat │ │ │ └── moc.bat │ ├── MeshSyncClientMotionBuilder │ │ ├── CMakeLists.txt │ │ ├── MeshSyncClientMotionBuilder.cpp │ │ ├── msmobuDevice.cpp │ │ ├── msmobuDevice.h │ │ ├── msmobuLayout.cpp │ │ ├── msmobuLayout.h │ │ ├── msmobuUtils.cpp │ │ ├── msmobuUtils.h │ │ ├── pch.cpp │ │ └── pch.h │ └── ReleaseChecklist.txt └── TestAssets │ ├── Test scenes.meta │ └── Test scenes │ ├── bake_test_1.blend │ ├── material test scene.meta │ └── material test scene │ ├── material_sync_test_scene_1.blend │ ├── material_sync_test_scene_1.blend.meta │ ├── test_1.png │ ├── test_1.png.meta │ ├── test_2.png │ ├── test_2.png.meta │ ├── test_3.png │ ├── test_3.png.meta │ ├── test_4.png │ ├── test_4.png.meta │ ├── test_height.exr │ ├── test_height.exr.meta │ ├── test_normal.png │ └── test_normal.png.meta ├── Readme.md ├── Readme.md.meta ├── Readme_JP.md ├── Readme_JP.md.meta ├── Scripts~ └── sync_package_info.sh ├── Tests.meta ├── Tests ├── .tests.json ├── Editor.meta └── Editor │ ├── PluginsTest.cs │ ├── PluginsTest.cs.meta │ ├── Unity.MeshSyncDCCPlugin.EditorTests.asmdef │ └── Unity.MeshSyncDCCPlugin.EditorTests.asmdef.meta ├── Third Party Notices.md ├── Third Party Notices.md.meta ├── package.json └── package.json.meta /.gitattributes: -------------------------------------------------------------------------------- 1 | Plugins~/Dist/clean_and_build_dist eol=lf 2 | Plugins~/Dist/create_meta eol=lf 3 | Plugins~/External/Patches/qt-4.8.7-win.patch binary 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Static libraries 12 | *.lai 13 | *.la 14 | *.a 15 | 16 | # Executables 17 | *.exe 18 | *.out 19 | *.app 20 | 21 | # Editor swap files 22 | *.swp 23 | 24 | # CMake 25 | Plugins~/Build/Build/MeshSync** 26 | Plugins~/Build/CMakeCache.txt 27 | Plugins~/Build/CMakeFiles** 28 | Plugins~/Build/CMakeScripts/** 29 | Plugins~/Build/cmake_install.cmake 30 | Plugins~/Build/Makefile 31 | Plugins~/Build/MeshSync-** 32 | Plugins~/Build/Blender-** 33 | Plugins~/Build/blender-** 34 | Plugins~/Build/Python-** 35 | Plugins~/Build/mqsdk** 36 | Plugins~/Build/ispc** 37 | Plugins~/Build/*.xcodeproj/** 38 | Plugins~/Build/ispc** 39 | Plugins~/Build/*.vcxproj** 40 | Plugins~/Build/*.sln 41 | Plugins~/Build/Src** 42 | Plugins~/Build/install_manifest.txt 43 | 44 | # XCode 45 | Plugins~/Build/MeshSyncDCCPlugins.build/** 46 | Plugins~/Build/Build/* 47 | 48 | # Visual Studio 49 | Plugins~/Build/.vs 50 | Plugins~/Build/x64 51 | Plugins~/.vs 52 | Plugins~/Src/.vs 53 | Plugins~/Src/*.vcxproj** 54 | 55 | # Symbolic links 56 | Plugins~/Src/MeshSyncClientMAYA_* 57 | Plugins~/Src/MeshSyncClientBLENDER_* 58 | Plugins~/Src/MeshSyncClient3DSMAX_* 59 | Plugins~/Src/MeshSyncClientMOTIONBUILDER_* 60 | Plugins~/Src/MeshSyncClientMQ_* 61 | Plugins~/Src/MeshSyncClientMODO_* 62 | 63 | # Files to be distributed (Build results) 64 | Plugins~/Dist/UnityMeshSync_** 65 | Plugins~/Dist/meta.txt 66 | 67 | # Sample Project 68 | MeshSyncDCCPlugins~/Library/** 69 | MeshSyncDCCPlugins~/*.sln 70 | MeshSyncDCCPlugins~/*.csproj 71 | MeshSyncDCCPlugins~/Logs/** 72 | MeshSyncDCCPlugins~/Temp/** 73 | MeshSyncDCCPlugins~/obj/** 74 | MeshSyncDCCPlugins~/.vs 75 | MeshSyncDCCPlugins~/UserSettings/** 76 | 77 | # Manually extracted files from the zip files in the package 78 | Editor/Plugins/*/* 79 | 80 | # Rider 81 | **/.idea/** 82 | **/ProjectSettings/RiderScriptEditorPersistedState.asset 83 | 84 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | artifacts/** 2 | build/** 3 | .build_script/** 4 | .github/** 5 | node_modules/** 6 | Documentation/ApiDocs/** 7 | Documentation~/ApiDocs/** 8 | AE~/** 9 | .DS_Store 10 | .npmrc 11 | .npmignore 12 | .gitignore 13 | CONTRIBUTING.md 14 | CONTRIBUTING.md.meta 15 | QAReport.md 16 | QAReport.md.meta 17 | .gitlab-ci.yml 18 | build.sh 19 | build.sh.meta 20 | build.bat 21 | build.bat.meta 22 | 23 | # Plugins and test project code 24 | Plugins~/** 25 | MeshSyncDCCPlugins~/** 26 | 27 | # Don't ignore DCC plugin zip and meta files 28 | !Editor/Plugins/*.zip 29 | !Editor/Plugins/*.zip.meta 30 | 31 | # Parts to auto generate files 32 | AutoGenerateParts/** 33 | 34 | -------------------------------------------------------------------------------- /.yamato/MeshSyncDCCPlugins-pack.yml: -------------------------------------------------------------------------------- 1 | {% metadata_file .yamato/MeshSyncDCCPlugins.metafile %} 2 | 3 | --- 4 | pack: 5 | name: Pack {{ yamato_name }} 6 | agent: 7 | type: {{ pack_platform.type }} 8 | image: {{ pack_platform.image }} 9 | flavor: {{ pack_platform.flavor }} 10 | commands: 11 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 12 | - upm-ci package pack 13 | artifacts: 14 | {{ yamato_name }}_pack_artifacts: 15 | paths: 16 | - "upm-ci~/**/*" 17 | 18 | -------------------------------------------------------------------------------- /.yamato/MeshSyncDCCPlugins-promotion.yml: -------------------------------------------------------------------------------- 1 | {% metadata_file .yamato/MeshSyncDCCPlugins.metafile %} 2 | 3 | --- 4 | 5 | {% for promotion_type in promotion_types %} 6 | 7 | {% for test_config in test_configs %} 8 | {% for test_platform in test_config.test_platforms %} 9 | {% for step in test_platform.test_type.steps %} 10 | {% assign platform_type = test_platform.platform_type %} 11 | {% assign editor_version= test_config.editor_version %} 12 | 13 | {{promotion_type.job_key_prefix}}_test_{{ platform_type.name }}_{{ editor_version }}_{{step.name}}: 14 | name : {{promotion_type.test_name_prefix}} {{ editor_version }} with {{step.name}} on {{ platform_type.name }} 15 | agent: 16 | type: {{ platform_type.type }} 17 | image: {{ platform_type.image }} 18 | flavor: {{ platform_type.flavor}} 19 | variables: 20 | UPMCI_PROMOTION: 1 21 | commands: 22 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 23 | - upm-ci package test --unity-version {{ editor_version }} {{step.arguments}} 24 | artifacts: 25 | {{ yamato_name }}_{{promotion_type.job_key_prefix}}_test_artifacts: 26 | paths: 27 | - "upm-ci~/test-results/**/*" 28 | dependencies: 29 | {% for test_dependency in promotion_type.test_dependencies %} 30 | - {{test_dependency}} 31 | {% endfor %} 32 | 33 | {% endfor %} 34 | {% endfor %} 35 | {% endfor %} 36 | 37 | {{promotion_type.job_key_prefix}}: 38 | name: {{promotion_type.job_name}} 39 | agent: 40 | type: {{ promote_platform.type }} 41 | image: {{ promote_platform.image }} 42 | flavor: {{ promote_platform.flavor }} 43 | variables: 44 | UPMCI_PROMOTION: 1 45 | commands: 46 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 47 | - upm-ci package promote 48 | triggers: 49 | tags: 50 | only: 51 | - /^(r|R)elease-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/ 52 | artifacts: 53 | {{ yamato_name }}_{{promotion_type.job_key_prefix}}_artifacts: 54 | paths: 55 | - "upm-ci~/packages/*.tgz" 56 | dependencies: 57 | - .yamato/{{ yamato_name }}-pack.yml#pack 58 | {% for test_config in test_configs %} 59 | {% for test_platform in test_config.test_platforms %} 60 | {% for step in test_platform.test_type.steps %} 61 | - .yamato/{{ yamato_name }}-promotion.yml#{{promotion_type.job_key_prefix}}_test_{{ test_platform.platform_type.name }}_{{ test_config.editor_version }}_{{step.name}} 62 | {% endfor %} 63 | {% endfor %} 64 | {% endfor %} 65 | {% endfor %} 66 | 67 | 68 | -------------------------------------------------------------------------------- /.yamato/MeshSyncDCCPlugins-test.yml: -------------------------------------------------------------------------------- 1 | {% metadata_file .yamato/MeshSyncDCCPlugins.metafile %} 2 | 3 | --- 4 | 5 | 6 | {% for test_config in test_configs %} 7 | {% for test_platform in test_config.test_platforms %} 8 | {% for step in test_platform.test_type.steps %} 9 | {% assign platform_type = test_platform.platform_type %} 10 | {% assign editor_version= test_config.editor_version %} 11 | 12 | test_{{ platform_type.name }}_{{ editor_version }}_{{step.name}}: 13 | name : Test {{ yamato_name }} using {{ editor_version }} with {{step.name}} on {{ platform_type.name }} 14 | agent: 15 | type: {{ platform_type.type }} 16 | image: {{ platform_type.image }} 17 | flavor: {{ platform_type.flavor}} 18 | commands: 19 | - {{ platform_type.cmd_prefix}} npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 20 | - {{ platform_type.cmd_prefix}} upm-ci package test --unity-version {{ editor_version }} {{step.arguments}} 21 | 22 | artifacts: 23 | {{ yamato_name }}_test_artifacts: 24 | paths: 25 | - "upm-ci~/test-results/**/*" 26 | dependencies: 27 | - .yamato/{{ yamato_name }}-pack.yml#pack 28 | {% endfor %} 29 | {% endfor %} 30 | {% endfor %} 31 | 32 | test_trigger: 33 | name: Tests Trigger for {{ yamato_name }} 34 | agent: 35 | type: {{ trigger_platform.type }} 36 | image: {{ trigger_platform.image }} 37 | flavor: {{ trigger_platform.flavor}} 38 | commands: 39 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 40 | - upm-ci package izon -t 41 | triggers: 42 | branches: 43 | only: 44 | - "/.*/" 45 | except: 46 | - "dev" 47 | - "**/dev" 48 | recurring: 49 | - branch: dev 50 | frequency: daily 51 | rerun: on_new_revision 52 | 53 | dependencies: 54 | - .yamato/{{ yamato_name }}-pack.yml#pack 55 | {% for test_config in test_configs %} 56 | {% for test_platform in test_config.test_platforms %} 57 | {% for step in test_platform.test_type.steps %} 58 | - .yamato/{{ yamato_name }}-test.yml#test_{{ test_platform.platform_type.name }}_{{ test_config.editor_version }}_{{step.name}} 59 | {% endfor %} 60 | {% endfor %} 61 | {% endfor %} -------------------------------------------------------------------------------- /AutoGenerateParts/ReadmeFooter.md: -------------------------------------------------------------------------------- 1 | # Building 2 | - [Building DCC Plugins](Plugins~/Docs/en/BuildDCCPlugins.md) 3 | 4 | # License 5 | - [License](LICENSE.md) 6 | - [Third Party Notices](Third%20Party%20Notices.md) 7 | 8 | -------------------------------------------------------------------------------- /AutoGenerateParts/ReadmeHeader.md: -------------------------------------------------------------------------------- 1 | ![demo](Documentation~/images/Demo.gif) 2 | 3 | # Latest official docs 4 | - [English](https://docs.unity3d.com/Packages/com.unity.meshsync.dcc-plugins@latest) 5 | - [日本語](https://docs.unity3d.com/ja/Packages/com.unity.meshsync.dcc-plugins@latest) 6 | 7 | # MeshSync DCC Plugins 8 | 9 | [![](https://badge-proxy.cds.internal.unity3d.com/b681f940-bd27-45c9-832f-e87e6282aa9f)](https://badges.cds.internal.unity3d.com/packages/com.unity.meshsync.dcc-plugins/build-info?branch=dev&testWorkflow=package-isolation) 10 | [![](https://badge-proxy.cds.internal.unity3d.com/6b18f37e-3925-4b8d-a243-2582b0077f47)](https://badges.cds.internal.unity3d.com/packages/com.unity.meshsync.dcc-plugins/dependencies-info?branch=dev&testWorkflow=updated-dependencies) 11 | [![](https://badge-proxy.cds.internal.unity3d.com/0db3f8f4-b2d4-40f8-b08a-0b65bcc02245)](https://badges.cds.internal.unity3d.com/packages/com.unity.meshsync.dcc-plugins/dependants-info) 12 | [![](https://badge-proxy.cds.internal.unity3d.com/1c9fbd13-0736-40ed-96d5-89f237ce91ca)](https://badges.cds.internal.unity3d.com/packages/com.unity.meshsync.dcc-plugins/warnings-info?branch=dev) 13 | 14 | ![ReleaseBadge](https://badge-proxy.cds.internal.unity3d.com/2e9a8300-389b-47be-9806-246c5121830b) 15 | ![ReleaseBadge](https://badge-proxy.cds.internal.unity3d.com/6f4a7e27-d53f-4ad3-bef5-9d3961bb68fb) 16 | -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8800a6e9eeda14d3c9905395131246f8 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 299d3679ead96dc4191d1a97787076ae 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | Thank you for your interest in contributing to MeshSyncDCCPlugins! We are 4 | incredibly excited to see how members of our community will use and extend the 5 | MeshSyncDCCPlugins package. To facilitate your contributions, we've outlined a brief set 6 | of guidelines to ensure that your extensions can be easily integrated. 7 | 8 | ## Communication 9 | 10 | First, please read through our [code of conduct](CODE_OF_CONDUCT.md), as we 11 | expect all our contributors to follow it. 12 | 13 | Second, before starting on a project that you intend to contribute to MeshSyncDCCPlugins 14 | (whether environments or modifications to the codebase), we 15 | **strongly** recommend posting on our 16 | [Issues page](https://github.com/Unity-Technologies/MeshSyncDCCPlugins/issues) 17 | and briefly outlining the changes you plan to make. This will enable us to 18 | provide some context that may be helpful for you. This could range from advice 19 | and feedback on how to optimally perform your changes or reasons for not doing 20 | it. 21 | 22 | ## Git Branches 23 | The dev branch corresponds to the most recent version of the project. 24 | Note that this branch may be unstable. 25 | 26 | When contributing to the project, please make sure that your Pull Request (PR) contains the following: 27 | 28 | * Detailed description of the changes performed 29 | * Corresponding changes to documentation, unit tests and sample environments (if 30 | applicable) 31 | * Summary of the tests performed to validate your changes 32 | * Issue numbers that the PR resolves (if any) 33 | 34 | ## Environments 35 | 36 | We are also actively open to adding community contributed environments as 37 | examples, as long as they are small, simple, demonstrate a unique feature of 38 | the platform, and provide a unique non-trivial challenge to modern 39 | machine learning algorithms. Feel free to submit these environments with a 40 | PR explaining the nature of the environment and task. 41 | 42 | ## Contributor License Agreements 43 | 44 | When you open a pull request, you will be asked to acknolwedge our Contributor License Agreement. 45 | We allow both individual contributions and contributions made on behalf of companies. 46 | 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e92d529fd3504c018de00a932dd4be5 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation~/3dsMax.md: -------------------------------------------------------------------------------- 1 | # Usage in 3dsMax 2 | 3 | - While "Auto Sync" is checked, changes to the Mesh will automatically be reflected in Unity. If Auto Sync is disabled, the "Manual Sync" button can be used to sync changes manually. 4 | - Clicking Sync under Animations will cause the timer to advance from the first frame to the final frame while baking the animation before sending it to Unity. 5 | - Clicking "Export Cache" will export all frame data into an *.sc file* for playback in Unity. 6 | See the SceneCache feature in [MeshSync's documentation](https://docs.unity3d.com/Packages/com.unity.meshsync@latest) for more details. 7 | 8 | 9 |   10 | 11 | - Modifiers are mostly supported, but there are a few cases where they are not. Use the following rules. 12 | - When there is no Morph or Skin, all modifiers will be applied during sync. 13 | - If there is a Morph or Skin, all modifiers before them will be applied during sync. 14 | - If there are multiple Morphs / Skins, the one at the bottom will be chosen as the base. 15 | - Morphs and Skins will sync on the Unity side as Blendshapes / Skins. 16 | - Unity applies them in order of Blendshape -> Skin, so if the order is reversed in Max, unintentional results may occur. 17 | - If "Bake Modifiers" is checked, the results of applying all deformers will be sent to Unity. This will keep the content of the Mesh mostly consistent between Max and Unity, but will also result in the loss of Skinning and Blendshape information. 18 | - Checking "Bake Transform" will apply the position/rotation/scale to the vertices of the Mesh 19 | and reset the Transform to the default value in Unity. This option is only valid when "Bake Modifiers" is enabled 20 | and will be useful to work around cases where it's difficult to reproduce complex transforms involving pivots in Unity. 21 | - Check "Use Render Meshes" to extract data from the meshes for rendering. 22 | For example, Turbo Smooth will reflect the Iteration for rendering on the Unity side. 23 | In addition, this will also correctly reflect meshes that appear only when rendering, such as Fluid, and Space Warps, etc. 24 | - Check "Ignore Non-Renderable" to ignore meshes that can not be rendered. An example of such as mesh is a pyramid-like shape in a bone's viewport display. 25 | -------------------------------------------------------------------------------- /Documentation~/BlenderInstaller.md: -------------------------------------------------------------------------------- 1 | # Blender Installer 2 | 3 | You can install MeshSync directly as a Blender Add-on. 4 | 5 | ## Downloads 6 | [MeshSyncInstaller.zip](https://drive.google.com/uc?export=download&id=1gLO1qkfS7exja4__GugjF_o8NMyyMuLL) 7 | 8 | ## How to use 9 | 1. Install MeshSyncInstaller.zip as an add-on. 10 | 1. Enable the add-on. 11 | 1. On the add-on preferences, click on Install. 12 | -------------------------------------------------------------------------------- /Documentation~/Maya.md: -------------------------------------------------------------------------------- 1 | # Usage in Maya 2 | 3 | 4 | 5 | - Start Maya, then go to Windows -> Settings/Preferences -> Plug-in Manager, and activate the plugin by checking Loaded under MeshSyncClient. 6 | - Confirm that the UnityMeshSync shelf is added, and click on the gear icon to open the settings menu. 7 | - While "Auto Sync" is checked, any edits to the mesh will automatically be reflected in Unity. When Auto Sync is deactivated, click the "Manual Sync" button to sync changes. 8 | - Clicking Sync under Animations causes the timer to advance from the first frame to the final frame while baking the animation and sending it to Unity. 9 | - Clicking "Export Cache" will export all frame data into an *.sc file* for playback in Unity. 10 | See the SceneCache feature in [MeshSync's documentation](https://docs.unity3d.com/Packages/com.unity.meshsync@latest) for more details. 11 | - The other buttons correspond to their respective manual sync and animation sync functions. 12 | 13 |   14 | 15 | - Polygon mesh will carry skinning/bones (SkinCluster) and BlendShapes over to Unity as is. 16 | - MeshSync will attempt to apply any additional deformers, but if there is a SkinCluster before or after them they may not apply correctly. 17 | - Check "Bake Deformers" to sync the results of applying all deformers. This will mostly sync the Mesh on both the Maya and Unity sides, but this will result in loss of Skinning and BlendShape information. 18 | - Checking "Bake Transform" will apply the position/rotation/scale to the vertices of the Mesh 19 | and reset the Transform to the default value in Unity. This option is only valid when "Bake Deformers" is enabled 20 | and will be useful to work around cases where it's difficult to reproduce complex transforms involving pivots in Unity. 21 | 22 | - Instancing is supported, but instancing for skinned meshes is currently not supported (on the Unity side they all end up in the same position as the original instance). 23 | 24 | ## Maya LT 25 | 26 | Currently, only Windows is supported, and the tool is confirmed to work on Maya LT 2019 + Windows. Maya LT does not natively support outside plugins, so be aware that this may lead to problems. Even small version changes to Maya LT may lead to loss of compatibility. 27 | This is a separate package, but the process for installation and use is the same as [Non-LT Maya](#maya). 28 | 29 | -------------------------------------------------------------------------------- /Documentation~/MotionBuilder.md: -------------------------------------------------------------------------------- 1 | # Usage in MotionBuilder 2 | 3 | 4 | 5 | - While "Auto Sync" is checked, any changes to the Mesh will automatically be reflected in Unity. If Auto Sync is disabled, the "Manual Sync" button can be used to manually reflect changes 6 | - Clicking Sync under Animations causes the timer to advance from the first frame to the final frame while baking the animation before sending it to Unity. 7 | 8 |   9 | 10 | - The Polygon mesh's skinning/bone and BlendShapes will be carried over to Unity unchanged. 11 | 12 | -------------------------------------------------------------------------------- /Documentation~/TableOfContents.md: -------------------------------------------------------------------------------- 1 | * [MeshSync DCC Plugins](index.md) 2 | * [Installation](Installation.md) 3 | * [Blender installer](BlenderInstaller.md) 4 | * Usage in DCC Tools 5 | * [Maya](Maya.md) 6 | * [3ds Max](3dsMax.md) 7 | * [MotionBuilder](MotionBuilder.md) 8 | * [Blender](Blender.md) 9 | -------------------------------------------------------------------------------- /Documentation~/images/AutoSetup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/AutoSetup.png -------------------------------------------------------------------------------- /Documentation~/images/BlenderSyncButtons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/BlenderSyncButtons.png -------------------------------------------------------------------------------- /Documentation~/images/BlenderUnityProjectSection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/BlenderUnityProjectSection.png -------------------------------------------------------------------------------- /Documentation~/images/Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/Demo.gif -------------------------------------------------------------------------------- /Documentation~/images/EditorSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/EditorSettings.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncClient3dsMax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncClient3dsMax.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncClientBlender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncClientBlender.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncClientBlender_Installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncClientBlender_Installation.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncClientBlender_ProBuilder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncClientBlender_ProBuilder.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncClientMQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncClientMQ.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncClientMaya.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncClientMaya.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncClientModo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncClientModo.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncClientMotionBuilder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncClientMotionBuilder.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncPreferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncPreferences.png -------------------------------------------------------------------------------- /Documentation~/images/MeshSyncServerLiveEditProperties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/MeshSyncServerLiveEditProperties.png -------------------------------------------------------------------------------- /Documentation~/images/PackageManager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/PackageManager.png -------------------------------------------------------------------------------- /Documentation~/images/ProjectSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/ProjectSettings.png -------------------------------------------------------------------------------- /Documentation~/images/baking_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/baking_1.png -------------------------------------------------------------------------------- /Documentation~/images/baking_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Documentation~/images/baking_2.png -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b967e5d46626432d9d5882acc2bb9f1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cd87f60d62236e47bbf4359cd63104d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_3DSMAX_Windows.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_3DSMAX_Windows.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_3DSMAX_Windows.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39d04d20b9cbc094d8ac287776ffca5f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Blender_Linux.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_Blender_Linux.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Blender_Linux.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30ea5524ad294234ea44961f3cc08a8a 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Blender_Mac.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_Blender_Mac.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Blender_Mac.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9291eb3457751f24fa552fcbab8ee527 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Blender_Windows.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_Blender_Windows.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Blender_Windows.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ee9a191f80f1e44a9bc645d30c9eada 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Maya_Linux.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_Maya_Linux.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Maya_Linux.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bc92c39e594c094592a8fd3d82a5d81 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Maya_Mac.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_Maya_Mac.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Maya_Mac.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c85557fb38fc044cb1fb5885f63e0a7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Maya_Windows.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_Maya_Windows.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_Maya_Windows.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a342c35f03183a4495b6dace9e99cd9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_MotionBuilder_Linux.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_MotionBuilder_Linux.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_MotionBuilder_Linux.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73236ad1ab25aab439561937f083488d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_MotionBuilder_Windows.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Editor/Plugins/UnityMeshSync_MotionBuilder_Windows.zip -------------------------------------------------------------------------------- /Editor/Plugins/UnityMeshSync_MotionBuilder_Windows.zip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec35c7b800a8fe44a91a08a2af4d691d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MeshSync DCC Plugins copyright © 2022 Unity Technologies ApS 2 | 3 | These Components are Licensed under GPL: 4 | * MeshSyncClientBlender 5 | 6 | License Type: GPL v3 7 | 8 | Copyright © 2022 Unity Technologies 9 | 10 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along with this program. If not, see . 15 | 16 | --- 17 | 18 | All other Components are Licensed under Apache 2.0 19 | 20 | License Type: Apache 2.0 21 | 22 | Copyright © 2022 Unity Technologies 23 | 24 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 27 | 28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33e349676f40246ce9ed6ff6f68327d0 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/FilmInternalUtilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df48aa36ce7c3b44b940c4eec940a2e1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/FilmInternalUtilities/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af49f85360836d545b86760b0633f151 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/FilmInternalUtilities/Editor/PackageChecker.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using Unity.FilmInternalUtilities.Editor; 4 | using UnityEditor.PackageManager; 5 | using PackageInfo = UnityEditor.PackageManager.PackageInfo; 6 | 7 | public static class PackageChecker { 8 | 9 | [InitializeOnLoadMethod] 10 | static void PackageChecker_OnLoad() { 11 | PackageRequestJobManager.CreateListRequest(offlineMode: false, includeIndirectIndependencies:false, 12 | onSuccess: (reqResult) => { 13 | PackageCollection result = reqResult.Result; 14 | foreach (PackageInfo packageInfo in result) { 15 | if (packageInfo.name != "com.unity.meshsync.dcc-plugins") 16 | continue; 17 | 18 | m_packageVersion = packageInfo.version; 19 | } 20 | }, null 21 | ); 22 | } 23 | 24 | public static string GetPackageVersion() => m_packageVersion; 25 | 26 | //---------------------------------------------------------------------------------------------------------------------- 27 | 28 | private static string m_packageVersion = null; 29 | 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/FilmInternalUtilities/Editor/PackageChecker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd1da7b5bc8e9084288ed09e8db64fde 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/FilmInternalUtilities/Editor/Unity.FilmInternalUtilities.EditorWorkbench.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.FilmInternalUtilities.EditorWorkbench", 3 | "references": [ 4 | "GUID:9158ceab1b89b8c4982afff02e1bb036" 5 | ], 6 | "includePlatforms": [], 7 | "excludePlatforms": [], 8 | "allowUnsafeCode": false, 9 | "overrideReferences": false, 10 | "precompiledReferences": [], 11 | "autoReferenced": true, 12 | "defineConstraints": [], 13 | "versionDefines": [], 14 | "noEngineReferences": false 15 | } -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/FilmInternalUtilities/Editor/Unity.FilmInternalUtilities.EditorWorkbench.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29c70152d8416b641b6ae76e5d1c2e0b 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/MeshSyncDCCPlugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5dfb3d5231c9a646b8afbd4e98defbc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/MeshSyncDCCPlugins/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b76967022ef73b944bb6aad000037b0a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/MeshSyncDCCPlugins/Editor/DebugInstallWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e60c060e5dca578419edbfaa6abb5ef3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/MeshSyncDCCPlugins/Editor/Menu.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | public static class Menu { 7 | 8 | [MenuItem("MeshSyncDCCPlugins/Rename Plugin Zip files")] 9 | static void RenamePluginZipFiles() { 10 | 11 | string fullPath = Path.GetFullPath("Packages/com.unity.meshsync.dcc-plugins/Editor/Plugins"); 12 | 13 | IEnumerable files = Directory.EnumerateFiles(fullPath, "*.zip", SearchOption.TopDirectoryOnly); 14 | foreach(string fileName in files) { 15 | string[] tokens = fileName.Split('_'); 16 | 17 | //already split 18 | if (tokens.Length <= 3) 19 | continue; 20 | 21 | string destFileName = $"{tokens[0]}_{tokens[2]}_{tokens[3]}"; 22 | 23 | File.Move(fileName, destFileName); 24 | Debug.Log($"Moving {fileName} to {destFileName}"); 25 | 26 | } 27 | } 28 | 29 | //---------------------------------------------------------------------------------------------------------------------- 30 | 31 | [MenuItem("MeshSyncDCCPlugins/Debug Install Window")] 32 | static void ShowDebugInstallWindow() { 33 | DebugInstallWindow window = (DebugInstallWindow)EditorWindow.GetWindow(typeof(DebugInstallWindow)); 34 | window.Show(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/MeshSyncDCCPlugins/Editor/Menu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55a174ee6783ee24c869e27021a34dcd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/MeshSyncDCCPlugins/Editor/Unity.MeshSyncDCCPlugins.EditorWorkbench.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.MeshSyncDCCPlugins.EditorWorkbench", 3 | "references": [ 4 | "GUID:c120e68ad8545b74e928cbbdcfe2c3a0", 5 | "GUID:9158ceab1b89b8c4982afff02e1bb036", 6 | "GUID:29c70152d8416b641b6ae76e5d1c2e0b" 7 | ], 8 | "includePlatforms": [], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": true, 14 | "defineConstraints": [], 15 | "versionDefines": [], 16 | "noEngineReferences": false 17 | } -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/MeshSyncDCCPlugins/Editor/Unity.MeshSyncDCCPlugins.EditorWorkbench.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3550d6dcd0f19246aee9c41e9d67e10 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9f062464c6af4c54bb2cbba582152a8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8800a6e9eeda14d3c9905395131246f8 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/Documentation~: -------------------------------------------------------------------------------- 1 | ../../../Documentation~ -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/Editor: -------------------------------------------------------------------------------- 1 | ../../../Editor -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6e6f6f9a1e114d0bb8f86427860dc07 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33e349676f40246ce9ed6ff6f68327d0 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/Tests: -------------------------------------------------------------------------------- 1 | ../../../Tests -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 824e8cb7b26be47aa8cc3accaad6329f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.unity.meshsync.dcc-plugins", 3 | "displayName":"MeshSync DCC Plugins", 4 | "version": "0.17.1-preview", 5 | "unity": "2020.3", 6 | "description": "This package contains plugin binaries of DCC tools for using MeshSync, which is another package for synchronizing meshes/models editing in DCC tools into Unity in real time.", 7 | "dependencies": { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/com.unity.meshsync-dcc-plugins/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9772527d231e14fdd8dc8df0139affe9 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ide.rider": "3.0.22", 4 | "com.unity.ide.visualstudio": "2.0.18", 5 | "com.unity.ide.vscode": "1.2.5", 6 | "com.unity.meshsync": "0.16.4-preview", 7 | "com.unity.package-validation-suite": "0.54.0-preview", 8 | "com.unity.probuilder": "4.5.2", 9 | "com.unity.test-framework": "1.1.33", 10 | "com.unity.textmeshpro": "3.0.6", 11 | "com.unity.timeline": "1.4.8", 12 | "com.unity.ugui": "1.0.0", 13 | "com.unity.modules.ai": "1.0.0", 14 | "com.unity.modules.androidjni": "1.0.0", 15 | "com.unity.modules.animation": "1.0.0", 16 | "com.unity.modules.assetbundle": "1.0.0", 17 | "com.unity.modules.audio": "1.0.0", 18 | "com.unity.modules.cloth": "1.0.0", 19 | "com.unity.modules.director": "1.0.0", 20 | "com.unity.modules.imageconversion": "1.0.0", 21 | "com.unity.modules.imgui": "1.0.0", 22 | "com.unity.modules.jsonserialize": "1.0.0", 23 | "com.unity.modules.particlesystem": "1.0.0", 24 | "com.unity.modules.physics": "1.0.0", 25 | "com.unity.modules.physics2d": "1.0.0", 26 | "com.unity.modules.screencapture": "1.0.0", 27 | "com.unity.modules.terrain": "1.0.0", 28 | "com.unity.modules.terrainphysics": "1.0.0", 29 | "com.unity.modules.tilemap": "1.0.0", 30 | "com.unity.modules.ui": "1.0.0", 31 | "com.unity.modules.uielements": "1.0.0", 32 | "com.unity.modules.umbra": "1.0.0", 33 | "com.unity.modules.unityanalytics": "1.0.0", 34 | "com.unity.modules.unitywebrequest": "1.0.0", 35 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 36 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 37 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 38 | "com.unity.modules.unitywebrequestwww": "1.0.0", 39 | "com.unity.modules.vehicles": "1.0.0", 40 | "com.unity.modules.video": "1.0.0", 41 | "com.unity.modules.vr": "1.0.0", 42 | "com.unity.modules.wind": "1.0.0", 43 | "com.unity.modules.xr": "1.0.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/MeshSyncSettings.asset: -------------------------------------------------------------------------------- 1 | {"m_version":4,"m_defaultServerPort":8080,"m_serverPublicAccess":false,"m_sceneCacheOutputPath":"Assets/SceneCacheResources","m_defaultServerConfig":{"SyncVisibility":true,"SyncTransform":true,"SyncMeshes":true,"m_componentSyncSettings":[{"CanCreate":true,"CanUpdate":true},{"CanCreate":true,"CanUpdate":true}],"m_usePhysicalCameraParams":true,"UpdateMeshColliders":true,"SyncMaterials":true,"m_importerSettings":{"CreateMaterials":true,"MaterialSearchMode":0},"AnimationInterpolation":0,"KeyframeReduction":true,"ReductionThreshold":0.0010000000474974514,"ReductionEraseFlatCurves":false,"ZUpCorrection":0,"SyncMaterialList":true,"ProgressiveDisplay":true,"Logging":false,"Profiling":false,"m_meshSyncPlayerConfigVersion":1,"m_meshSyncServerConfigVersion":1},"m_defaultSceneCachePlayerConfig":{"SyncVisibility":true,"SyncTransform":true,"SyncMeshes":true,"m_componentSyncSettings":[{"CanCreate":true,"CanUpdate":true},{"CanCreate":true,"CanUpdate":true}],"m_usePhysicalCameraParams":true,"UpdateMeshColliders":false,"SyncMaterials":true,"m_importerSettings":{"CreateMaterials":true,"MaterialSearchMode":0},"AnimationInterpolation":0,"KeyframeReduction":true,"ReductionThreshold":0.0010000000474974514,"ReductionEraseFlatCurves":false,"ZUpCorrection":0,"SyncMaterialList":true,"ProgressiveDisplay":false,"Logging":false,"Profiling":false,"m_meshSyncPlayerConfigVersion":1,"m_sceneCachePlayerConfigVersion":1}} -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.com 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | m_UserSelectedRegistryName: 24 | m_UserAddingNewScopedRegistry: 0 25 | m_RegistryInfoDraft: 26 | m_ErrorMessage: 27 | m_Original: 28 | m_Id: 29 | m_Name: 30 | m_Url: 31 | m_Scopes: [] 32 | m_IsDefault: 0 33 | m_Modified: 0 34 | m_Name: 35 | m_Url: 36 | m_Scopes: 37 | - 38 | m_SelectedScopeIndex: 0 39 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.48f1 2 | m_EditorVersionWithRevision: 2020.3.48f1 (b805b124c6b7) 3 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /MeshSyncDCCPlugins~/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Plugins~/Build/VsDevCmd_2017.bat: -------------------------------------------------------------------------------- 1 | for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" /version [15.0^,16^) /property installationPath`) do ( 2 | set VSDIR=%%i 3 | echo %%i 4 | ) 5 | call "%VSDIR%\Common7\Tools\VsDevCmd.bat" 6 | cd %~dp0 7 | -------------------------------------------------------------------------------- /Plugins~/Build/cmake_modules/3dsMax.cmake: -------------------------------------------------------------------------------- 1 | # Set 2 | # - ${3DSMAX${3dsmax_version}_FOUND} to TRUE or FALSE, depending on whether the header/libs are found 3 | # - ${3DSMAX${3dsmax_version}_INCLUDE_DIR}: the include directory of 3DSMax 4 | # - $[3DSMAX${3dsmax_version}_LIBRARIES}: path to the 3DSMax libraries 5 | function(setup_3dsmax 3dsmax_version) 6 | 7 | # The possible root paths of Maya 8 | list(APPEND 3DSMAX${3dsmax_version}_PATHS 9 | $ENV{ADSK_3DSMAX_SDK_${3dsmax_version}} 10 | $ENV{ADSK_3DSMAX_SDK_${3dsmax_version}}/samples/modifiers/morpher 11 | ) 12 | 13 | # Header. Use find_path to store to cache 14 | find_path(3DSMAX${3dsmax_version}_INCLUDE_DIR 15 | NAMES 16 | max.h 17 | HINTS 18 | ${3DSMAX${3dsmax_version}_PATHS} 19 | PATH_SUFFIXES 20 | include 21 | ) 22 | mark_as_advanced(3DSMAX${3dsmax_version}_INCLUDE_DIR) 23 | 24 | # message(${3DSMAX${3dsmax_version}_INCLUDE_DIR}) 25 | 26 | # Libs, and set cache at the end 27 | foreach(3DSMAX_LIB core geom mesh poly mnmath maxutil maxscrpt paramblk2 menus Morpher) 28 | find_file(3DSMAX${3dsmax_version}_${3DSMAX_LIB}_LIBRARY 29 | NAMES 30 | ${3DSMAX_LIB}.lib 31 | PATHS 32 | ${3DSMAX${3dsmax_version}_PATHS} 33 | PATH_SUFFIXES 34 | lib/x64/Release 35 | Lib/x64/Release 36 | ) 37 | 38 | mark_as_advanced(3DSMAX${3dsmax_version}_${3DSMAX_LIB}_LIBRARY) 39 | if(3DSMAX${3dsmax_version}_${3DSMAX_LIB}_LIBRARY) 40 | list(APPEND 3DSMAX${3dsmax_version}_LIBRARIES ${3DSMAX${3dsmax_version}_${3DSMAX_LIB}_LIBRARY}) 41 | endif() 42 | endforeach() 43 | set(3DSMAX${3dsmax_version}_LIBRARIES ${3DSMAX${3dsmax_version}_LIBRARIES} CACHE STRING "3ds Max ${3dsmax_version} libraries") 44 | mark_as_advanced(3DSMAX${3dsmax_version}_LIBRARIES) 45 | 46 | include(FindPackageHandleStandardArgs) 47 | find_package_handle_standard_args("3DSMAX${3dsmax_version}" 48 | DEFAULT_MSG 49 | 3DSMAX${3dsmax_version}_INCLUDE_DIR 50 | 3DSMAX${3dsmax_version}_LIBRARIES 51 | ) 52 | 53 | if(NOT ${3DSMAX${3dsmax_version}_FOUND}) 54 | message(FATAL_ERROR "3ds Max ${3dsmax_version} SDK could not be found. Please define 3DSMAX_SDK_${3dsmax_version}. \n" 55 | "Paths searched for 3ds Max SDK: ${3DSMAX${3dsmax_version}_PATHS}" 56 | ) 57 | endif() 58 | endfunction() -------------------------------------------------------------------------------- /Plugins~/Build/cmake_modules/AddPlugin.cmake: -------------------------------------------------------------------------------- 1 | if(APPLE) 2 | set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") 3 | set(CMAKE_MACOSX_RPATH ON) 4 | set(CMAKE_SKIP_RPATH ON) 5 | 6 | elseif(LINUX) 7 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 8 | set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON) 9 | endif() 10 | 11 | # ---------------------------------------------------------------------------------------------------------------------- 12 | 13 | function(add_plugin name) 14 | cmake_parse_arguments(arg "" "PLUGINS_DIR" "SOURCES" ${ARGN}) 15 | file(TO_NATIVE_PATH ${arg_PLUGINS_DIR} native_plugins_dir) 16 | 17 | 18 | if(APPLE) 19 | add_library(${name} MODULE ${arg_SOURCES}) 20 | set_target_properties(${name} PROPERTIES BUNDLE ON) 21 | SET(target_filename \${TARGET_BUILD_DIR}/${name}.bundle) 22 | add_custom_command(TARGET ${name} POST_BUILD 23 | COMMAND rm -rf ${arg_PLUGINS_DIR}/${target_filename} 24 | COMMAND cp -r ${target_filename} ${native_plugins_dir} 25 | COMMENT "Copying ${name} to ${native_plugins_dir}" 26 | ) 27 | else() 28 | # Linux/Windows 29 | add_library(${name} SHARED ${arg_SOURCES}) 30 | set_target_properties(${name} PROPERTIES PREFIX "" ) 31 | 32 | SET(target_filename $) 33 | add_custom_command(TARGET ${name} POST_BUILD 34 | COMMAND ${CMAKE_COMMAND} -E copy 35 | $ 36 | ${native_plugins_dir} 37 | COMMENT "Copying ${name} to ${native_plugins_dir}" 38 | ) 39 | 40 | endif() 41 | 42 | endfunction() 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Plugins~/Build/cmake_modules/FindZSTD.cmake: -------------------------------------------------------------------------------- 1 | # This is a dummy FindZSTD to satisty the build process of MeshSync plugin, 2 | # because the following vars must have already been put in cache by ZSTD.cmake 3 | # * ZSTD_INCLUDE_DIR 4 | # * ZSTD_LIBRARY 5 | 6 | -------------------------------------------------------------------------------- /Plugins~/Build/cmake_modules/MeshSync.cmake: -------------------------------------------------------------------------------- 1 | include(CMakeParseArguments) 2 | include(Utilities) 3 | 4 | function(get_meshsync meshsync_ver) 5 | 6 | #Example Link: https://github.com/unity3d-jp/MeshSync/archive/0.0.1-preview.2.zip 7 | set(MESHSYNC_ARCHIVE_FILE "${meshsync_ver}.tar.gz") 8 | set(MESHSYNC_ARCHIVE_URL "https://github.com/unity3d-jp/MeshSync/archive/${MESHSYNC_ARCHIVE_FILE}") 9 | set(MESHSYNC_ARCHIVE_LOCAL_PATH "${CMAKE_BINARY_DIR}/MeshSync-${MESHSYNC_ARCHIVE_FILE}") 10 | set(MESHSYNC_ARCHIVE_EXTRACT_PATH "${CMAKE_BINARY_DIR}") 11 | 12 | download_and_extract( 13 | ${MESHSYNC_ARCHIVE_URL} 14 | ${MESHSYNC_ARCHIVE_LOCAL_PATH} 15 | ${MESHSYNC_ARCHIVE_EXTRACT_PATH} 16 | "Downloading MeshSync ${meshsync_ver}" 17 | "Could not download MeshSync ${meshsync_ver} !" 18 | ) 19 | 20 | endfunction() 21 | 22 | # ------------------------------------------------------------------------------ 23 | 24 | function(setup_meshsync meshsync_ver) 25 | set(MESHSYNC_PLUGIN_LOCAL_PATH "${CMAKE_BINARY_DIR}/MeshSync-${meshsync_ver}/Plugin~") 26 | 27 | if(ENABLE_ZSTD) 28 | include(ZSTD) 29 | setup_zstd(${MESHSYNC_PLUGIN_LOCAL_PATH}) 30 | endif() 31 | 32 | add_subdirectory(${MESHSYNC_PLUGIN_LOCAL_PATH}) 33 | endfunction() 34 | -------------------------------------------------------------------------------- /Plugins~/Build/cmake_modules/Metasequoia.cmake: -------------------------------------------------------------------------------- 1 | 2 | include(Utilities) 3 | 4 | # ---------------------------------------------------------------------------------------------------------------------- 5 | 6 | function(get_mq mq_ver) 7 | 8 | #Example Link: http://www.metaseq.net/metaseq/mqsdk470.zip 9 | set(MQ_ARCHIVE_FILE "mqsdk${mq_ver}.zip") 10 | set(MQ_ARCHIVE_URL "http://www.metaseq.net/metaseq/${MQ_ARCHIVE_FILE}") 11 | set(MQ_ARCHIVE_LOCAL_PATH "${CMAKE_BINARY_DIR}/${MQ_ARCHIVE_FILE}") 12 | set(MQ_ARCHIVE_EXTRACT_PATH "${CMAKE_BINARY_DIR}/mqsdk-${mq_ver}") 13 | 14 | download_and_extract( 15 | ${MQ_ARCHIVE_URL} 16 | ${MQ_ARCHIVE_LOCAL_PATH} 17 | ${MQ_ARCHIVE_EXTRACT_PATH} 18 | "Downloading MQ ${mq_ver}" 19 | "Could not download MQ ${mq_ver} !" 20 | ) 21 | endfunction() 22 | 23 | # ---------------------------------------------------------------------------------------------------------------------- 24 | 25 | # Set the following to cache 26 | # - ${MQSDK_${mq_ver}_DIR}: MQ directory 27 | # - ${MQSDK_${mq_ver}_FOUND} to TRUE or FALSE, depending on whether the header/libs are found 28 | function(setup_mq mq_ver) 29 | 30 | list(APPEND MQ_SRC_PATHS 31 | "${CMAKE_BINARY_DIR}/mqsdk-${mq_ver}" 32 | ) 33 | 34 | # Header. Use find_path to store to cache 35 | find_path(MQSDK_${mq_ver}_DIR 36 | NAMES 37 | MQPlugin.h 38 | HINTS 39 | ${MQ_SRC_PATHS} 40 | PATH_SUFFIXES 41 | mqsdk 42 | NO_DEFAULT_PATH 43 | ) 44 | 45 | mark_as_advanced(MQSDK_${mq_ver}_DIR) 46 | 47 | include(FindPackageHandleStandardArgs) 48 | find_package_handle_standard_args("MQSDK_${mq_ver}" 49 | DEFAULT_MSG 50 | MQSDK_${mq_ver}_DIR 51 | ) 52 | 53 | if(NOT ${MQSDK_${mq_ver}_FOUND}) 54 | message(FATAL_ERROR "MQ ${mq_ver} could not be detected. Please remove CMakeCache.txt and redo the build process") 55 | endif() 56 | endfunction() 57 | 58 | 59 | -------------------------------------------------------------------------------- /Plugins~/Build/cmake_modules/UnityPackage.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the following to cache 3 | # - ${UNITY_PACKAGE_VERSION} 4 | 5 | function(setup_unity_package_version) 6 | 7 | find_file(UNITY_PACKAGE_JSON 8 | NAMES package.json 9 | HINTS "../" 10 | ) 11 | 12 | file(READ ${UNITY_PACKAGE_JSON} package_contents) 13 | 14 | # Convert the whole text to lines 15 | STRING(REGEX REPLACE "\n" ";" split_contents "${package_contents}") 16 | 17 | foreach(package_line in ${split_contents}) 18 | string(REGEX MATCH "\"version\": \"(.*)\"" PACKAGE_VERSION ${package_line}) 19 | if (PACKAGE_VERSION) 20 | 21 | message("Unity Package Version: ${CMAKE_MATCH_1}") 22 | set(UNITY_PACKAGE_VERSION ${CMAKE_MATCH_1} CACHE STRING "Unity package version" FORCE ) 23 | break() 24 | 25 | endif() 26 | endforeach() 27 | 28 | # error check 29 | if(NOT UNITY_PACKAGE_VERSION) 30 | message(FATAL_ERROR "Could not be detect the version of Unity Package") 31 | endif() 32 | 33 | 34 | 35 | endfunction() 36 | -------------------------------------------------------------------------------- /Plugins~/Build/cmake_modules/Utilities.cmake: -------------------------------------------------------------------------------- 1 | # Various utilities for cmake 2 | 3 | function(download_and_extract 4 | archive_url 5 | archive_local_path 6 | extract_path 7 | download_msg 8 | err_msg 9 | ) 10 | if(NOT EXISTS ${archive_local_path}) 11 | message(${download_msg}) 12 | file(DOWNLOAD ${archive_url} ${archive_local_path} SHOW_PROGRESS) 13 | 14 | # Check if the download is successful 15 | file(SIZE ${archive_local_path} ARCHIVE_FILESIZE) 16 | if(0 EQUAL ${ARCHIVE_FILESIZE}) 17 | file(REMOVE ${archive_local_path}) 18 | message(FATAL_ERROR "${err_msg}") 19 | endif() 20 | 21 | # Extract 22 | message(" Extracting") 23 | file(MAKE_DIRECTORY ${extract_path}) 24 | execute_process( 25 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 26 | COMMAND tar -xf ${archive_local_path} -C ${extract_path} 27 | ) 28 | endif() 29 | 30 | endfunction() 31 | 32 | # ---------------------------------------------------------------------------------------------------------------------- 33 | 34 | -------------------------------------------------------------------------------- /Plugins~/Build/cmake_modules/ZSTD.cmake: -------------------------------------------------------------------------------- 1 | # Returns: 2 | # * ZSTD_INCLUDE_DIR: where zstd.h is found 3 | # * ZSTD_LIBRARY: zstd library path 4 | 5 | function(setup_zstd meshsync_plugin_path) 6 | 7 | find_path(ZSTD_INCLUDE_DIR 8 | NAMES 9 | "zstd.h" 10 | PATHS 11 | ${meshsync_plugin_path}/External/zstd/include 12 | NO_DEFAULT_PATH 13 | ) 14 | 15 | mark_as_advanced(ZSTD_INCLUDE_DIR) 16 | 17 | # Decide the name of the zstd lib based on platform 18 | if(WIN32) 19 | set(zstd_lib_filename "libzstd_static.lib") 20 | set(zstd_lib_path_suffix "win64") 21 | elseif(APPLE) 22 | set(zstd_lib_filename "libzstd.a") 23 | set(zstd_lib_path_suffix "osx/${CMAKE_SYSTEM_PROCESSOR}/") 24 | elseif(LINUX) 25 | set(zstd_lib_filename "libzstd.a") 26 | set(zstd_lib_path_suffix "linux64") 27 | endif() 28 | 29 | 30 | find_file( 31 | ZSTD_LIBRARY 32 | NAMES 33 | ${zstd_lib_filename} 34 | PATHS 35 | "${meshsync_plugin_path}/External/zstd/lib" 36 | PATH_SUFFIXES 37 | ${zstd_lib_path_suffix} 38 | NO_DEFAULT_PATH 39 | ) 40 | 41 | mark_as_advanced(ZSTD_LIBRARY) 42 | 43 | include(FindPackageHandleStandardArgs) 44 | find_package_handle_standard_args("ZSTD" 45 | DEFAULT_MSG 46 | ZSTD_INCLUDE_DIR 47 | ZSTD_LIBRARY 48 | ) 49 | 50 | if(NOT ${ZSTD_FOUND}) 51 | message(FATAL_ERROR "zstd could not be found. \n" 52 | "Paths searched for ztsd: ${meshsync_plugin_path}/External/zstd/lib/${zstd_lib_path_suffix}" 53 | ) 54 | endif() 55 | 56 | endfunction() 57 | -------------------------------------------------------------------------------- /Plugins~/Build/make_meshsync_dcc_plugin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # The default will build all 4 | CMAKE_BUILD_ARGS="-DBUILD_MAYA_ALL=ON -DBUILD_3DSMAX_ALL=ON -DBUILD_BLENDER_ALL=ON -DBUILD_MOTIONBUILDER_ALL=ON -DBUILD_METASEQUOIA_ALL=ON -DBUILD_MODO_ALL=ON" 5 | 6 | #Invalid arguments check 7 | if [ "$#" -le 0 ]; then 8 | echo "Usage: build_meshsync_dcc_plugin [meshsync_version]" 9 | exit 10 | fi 11 | 12 | MESHSYNC_VER=$1 13 | 14 | #Custom build arguments 15 | if [ "$#" -ge 2 ]; then 16 | shift 1 17 | CMAKE_BUILD_ARGS="$*" 18 | fi 19 | 20 | BUILD_SYSTEM="" 21 | UNAME_OUT="$(uname -s)" 22 | case "${UNAME_OUT}" in 23 | Darwin*) BUILD_SYSTEM="-GXcode";; 24 | *) BUILD_SYSTEM="";; 25 | esac 26 | echo ${machine} 27 | 28 | echo "cmake build Arguments: $CMAKE_BUILD_ARGS" 29 | cmake -UBUILD_*_PLUGIN -UBUILD_*_ALL -DMESHSYNC_VER:STRING=$MESHSYNC_VER $CMAKE_BUILD_ARGS $BUILD_SYSTEM .. 30 | -------------------------------------------------------------------------------- /Plugins~/Build/make_meshsync_dcc_plugin.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM The default will build all 4 | SET CMAKE_BUILD_ARGS=-DBUILD_MAYA_ALL=ON -DBUILD_3DSMAX_ALL=ON -DBUILD_BLENDER_ALL=ON -DBUILD_MOTIONBUILDER_ALL=ON -DBUILD_METASEQUOIA_ALL=ON -DBUILD_MODO_ALL=ON 5 | 6 | set ARG_COUNT=0 7 | for %%x in (%*) do ( 8 | set /A ARG_COUNT+=1 9 | ) 10 | 11 | REM Invalid arguments check 12 | IF %ARG_COUNT% LEQ 0 ( 13 | echo Usage: build_meshsync_dcc_plugin [meshsync_version] 14 | exit /B 15 | ) 16 | 17 | SET MESHSYNC_VER=%1 18 | 19 | REM Custom build arguments 20 | IF %ARG_COUNT% GEQ 2 ( 21 | shift 22 | SET CMAKE_BUILD_ARGS=%* 23 | ) 24 | 25 | SET BUILD_SYSTEM=-G "Visual Studio 15 2017" -A x64 26 | 27 | ECHO cmake build Arguments: %CMAKE_BUILD_ARGS% 28 | cmake -UBUILD_*_PLUGIN -UBUILD_*_ALL -DMESHSYNC_VER:STRING=%MESHSYNC_VER% %CMAKE_BUILD_ARGS% %BUILD_SYSTEM% .. 29 | -------------------------------------------------------------------------------- /Plugins~/Dist/clean_and_build_dist: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | # Clean all folders in Dist, zips, and meta file 5 | rm -rf */ 6 | rm -Rf *.zip 7 | rm -f meta.txt 8 | 9 | # Parse args 10 | BUILD_TYPE_ARG="Release" 11 | for i in "$@"; do 12 | case $i in 13 | -d|--debug*) 14 | BUILD_TYPE_ARG="Debug" 15 | shift 16 | ;; 17 | -r|--release*) 18 | BUILD_TYPE_ARG="Release" 19 | shift 20 | ;; 21 | -*|--*) 22 | echo "Unknown option $i" 23 | exit 1 24 | ;; 25 | esac 26 | done 27 | 28 | echo "[Build]: ${BUILD_TYPE_ARG}" 29 | 30 | cd ../Build 31 | cmake -DBUILD_TYPE=${BUILD_TYPE_ARG} -P cmake_install.cmake 32 | 33 | cd ../Dist 34 | 35 | 36 | 37 | # Preprocess Blender first 38 | find . -maxdepth 1 -mindepth 1 -type d | grep Blender | while read dir; do 39 | cd $dir 40 | for blenderVerDir in */ ; do 41 | cd ${blenderVerDir} 42 | zip -r "${blenderVerDir%?}.zip" . 43 | mv "${blenderVerDir%?}.zip" .. 44 | cd .. 45 | rm -Rf $blenderVerDir 46 | done 47 | cd .. 48 | done 49 | 50 | # Zip each folder 51 | for d in */ ; do 52 | zip -r "${d%?}.zip" "$d" 53 | done 54 | 55 | -------------------------------------------------------------------------------- /Plugins~/Dist/create_meta: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | md5_cmd="md5sum" 4 | col_number=1 5 | 6 | #Mac 7 | if [[ "$OSTYPE" == "darwin"* ]]; then 8 | md5_cmd="md5" 9 | col_number=4 10 | fi 11 | 12 | # List all zip files and their md5 13 | echo "{ \"FileSignatures\" : [" 14 | find . -maxdepth 1 -mindepth 1 -type f -name '*.zip'| while read filename; do 15 | md5=`${md5_cmd} ${filename} | awk -v col="$col_number" '{ print $col }'` 16 | 17 | echo " {" 18 | echo " \"FileName\" : \"${filename##*/}\"," 19 | echo " \"MD5\" : \"${md5}\"" 20 | echo " }," 21 | done 22 | 23 | # Final element 24 | echo " {" 25 | echo " \"FileName\" : \"END\"," 26 | echo " \"MD5\" : \"0\"" 27 | echo " }" 28 | 29 | 30 | echo "] }" 31 | 32 | 33 | -------------------------------------------------------------------------------- /Plugins~/Docs/Images/CMakeInstallation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/Docs/Images/CMakeInstallation.png -------------------------------------------------------------------------------- /Plugins~/Docs/Images/CreateSymbolicLinks_LocalSecurityPolicy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/Docs/Images/CreateSymbolicLinks_LocalSecurityPolicy.jpg -------------------------------------------------------------------------------- /Plugins~/Docs/Images/CreateSymbolicLinks_Properties.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/Docs/Images/CreateSymbolicLinks_Properties.jpg -------------------------------------------------------------------------------- /Plugins~/Docs/Images/CreateSymbolicLinks_SelectUsers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/Docs/Images/CreateSymbolicLinks_SelectUsers.jpg -------------------------------------------------------------------------------- /Plugins~/Docs/Images/Install3dsMaxSDK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/Docs/Images/Install3dsMaxSDK.png -------------------------------------------------------------------------------- /Plugins~/Docs/Images/SceneCacheExport3DSMax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/Docs/Images/SceneCacheExport3DSMax.png -------------------------------------------------------------------------------- /Plugins~/Docs/en/CreateSymbolicLinksOnWindows10.md: -------------------------------------------------------------------------------- 1 | # Allow Symbolic Links on Windows 10 2 | 3 | The build process needs to create symbolic links to create 4 | plugin projects that correspond to different versions of DCC tools, 5 | and by default, this symbolic link creation is not allowed for regular users 6 | on Windows 10. 7 | 8 | Follow these steps to allow symbolic link creations: 9 | 10 | 1. Open **Local Security Policy** by typing `secpol.msc` on Windows Command Prompt 11 | 12 | ![LocalSecurityPolicy](../Images/CreateSymbolicLinks_LocalSecurityPolicy.jpg) 13 | 14 | 15 | 2. Under **User Rights Assignment**, find a policy called **Create symbolic links** and open it. 16 | - Click **Add User or Group** 17 | - Click **Object Types** 18 | - Make sure **Groups** is checked and click **OK**. 19 | 20 | ![LocalSecurityPolicy](../Images/CreateSymbolicLinks_Properties.jpg) 21 | 22 | 3. Type **USERS** inside the textbox and click on **Check Names** to verify it, then click **OK**. 23 | 24 | ![LocalSecurityPolicy](../Images/CreateSymbolicLinks_SelectUsers.jpg) 25 | 26 | 4. Configure git to allow symbolic links. For example, by typing the following in Git Bash: 27 | 28 | ``` 29 | git config --local core.symlinks true 30 | git config --global core.symlinks true 31 | ``` 32 | 33 | 34 | -------------------------------------------------------------------------------- /Plugins~/External/pybind11/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Wenzel Jakob , All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | Please also refer to the file CONTRIBUTING.md, which clarifies licensing of 29 | external contributions to this project including patches, pull requests, etc. 30 | -------------------------------------------------------------------------------- /Plugins~/External/pybind11/common.h: -------------------------------------------------------------------------------- 1 | #include "detail/common.h" 2 | #warning "Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'." 3 | -------------------------------------------------------------------------------- /Plugins~/External/pybind11/complex.h: -------------------------------------------------------------------------------- 1 | /* 2 | pybind11/complex.h: Complex number support 3 | 4 | Copyright (c) 2016 Wenzel Jakob 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "pybind11.h" 13 | #include 14 | 15 | /// glibc defines I as a macro which breaks things, e.g., boost template names 16 | #ifdef I 17 | # undef I 18 | #endif 19 | 20 | NAMESPACE_BEGIN(PYBIND11_NAMESPACE) 21 | 22 | template struct format_descriptor, detail::enable_if_t::value>> { 23 | static constexpr const char c = format_descriptor::c; 24 | static constexpr const char value[3] = { 'Z', c, '\0' }; 25 | static std::string format() { return std::string(value); } 26 | }; 27 | 28 | #ifndef PYBIND11_CPP17 29 | 30 | template constexpr const char format_descriptor< 31 | std::complex, detail::enable_if_t::value>>::value[3]; 32 | 33 | #endif 34 | 35 | NAMESPACE_BEGIN(detail) 36 | 37 | template struct is_fmt_numeric, detail::enable_if_t::value>> { 38 | static constexpr bool value = true; 39 | static constexpr int index = is_fmt_numeric::index + 3; 40 | }; 41 | 42 | template class type_caster> { 43 | public: 44 | bool load(handle src, bool convert) { 45 | if (!src) 46 | return false; 47 | if (!convert && !PyComplex_Check(src.ptr())) 48 | return false; 49 | Py_complex result = PyComplex_AsCComplex(src.ptr()); 50 | if (result.real == -1.0 && PyErr_Occurred()) { 51 | PyErr_Clear(); 52 | return false; 53 | } 54 | value = std::complex((T) result.real, (T) result.imag); 55 | return true; 56 | } 57 | 58 | static handle cast(const std::complex &src, return_value_policy /* policy */, handle /* parent */) { 59 | return PyComplex_FromDoubles((double) src.real(), (double) src.imag()); 60 | } 61 | 62 | PYBIND11_TYPE_CASTER(std::complex, _("complex")); 63 | }; 64 | NAMESPACE_END(detail) 65 | NAMESPACE_END(PYBIND11_NAMESPACE) 66 | -------------------------------------------------------------------------------- /Plugins~/External/pybind11/detail/typeid.h: -------------------------------------------------------------------------------- 1 | /* 2 | pybind11/detail/typeid.h: Compiler-independent access to type identifiers 3 | 4 | Copyright (c) 2016 Wenzel Jakob 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | 15 | #if defined(__GNUG__) 16 | #include 17 | #endif 18 | 19 | #include "common.h" 20 | 21 | NAMESPACE_BEGIN(PYBIND11_NAMESPACE) 22 | NAMESPACE_BEGIN(detail) 23 | /// Erase all occurrences of a substring 24 | inline void erase_all(std::string &string, const std::string &search) { 25 | for (size_t pos = 0;;) { 26 | pos = string.find(search, pos); 27 | if (pos == std::string::npos) break; 28 | string.erase(pos, search.length()); 29 | } 30 | } 31 | 32 | PYBIND11_NOINLINE inline void clean_type_id(std::string &name) { 33 | #if defined(__GNUG__) 34 | int status = 0; 35 | std::unique_ptr res { 36 | abi::__cxa_demangle(name.c_str(), nullptr, nullptr, &status), std::free }; 37 | if (status == 0) 38 | name = res.get(); 39 | #else 40 | detail::erase_all(name, "class "); 41 | detail::erase_all(name, "struct "); 42 | detail::erase_all(name, "enum "); 43 | #endif 44 | detail::erase_all(name, "pybind11::"); 45 | } 46 | NAMESPACE_END(detail) 47 | 48 | /// Return a string representation of a C++ type 49 | template static std::string type_id() { 50 | std::string name(typeid(T).name()); 51 | detail::clean_type_id(name); 52 | return name; 53 | } 54 | 55 | NAMESPACE_END(PYBIND11_NAMESPACE) 56 | -------------------------------------------------------------------------------- /Plugins~/External/pybind11/options.h: -------------------------------------------------------------------------------- 1 | /* 2 | pybind11/options.h: global settings that are configurable at runtime. 3 | 4 | Copyright (c) 2016 Wenzel Jakob 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "detail/common.h" 13 | 14 | NAMESPACE_BEGIN(PYBIND11_NAMESPACE) 15 | 16 | class options { 17 | public: 18 | 19 | // Default RAII constructor, which leaves settings as they currently are. 20 | options() : previous_state(global_state()) {} 21 | 22 | // Class is non-copyable. 23 | options(const options&) = delete; 24 | options& operator=(const options&) = delete; 25 | 26 | // Destructor, which restores settings that were in effect before. 27 | ~options() { 28 | global_state() = previous_state; 29 | } 30 | 31 | // Setter methods (affect the global state): 32 | 33 | options& disable_user_defined_docstrings() & { global_state().show_user_defined_docstrings = false; return *this; } 34 | 35 | options& enable_user_defined_docstrings() & { global_state().show_user_defined_docstrings = true; return *this; } 36 | 37 | options& disable_function_signatures() & { global_state().show_function_signatures = false; return *this; } 38 | 39 | options& enable_function_signatures() & { global_state().show_function_signatures = true; return *this; } 40 | 41 | // Getter methods (return the global state): 42 | 43 | static bool show_user_defined_docstrings() { return global_state().show_user_defined_docstrings; } 44 | 45 | static bool show_function_signatures() { return global_state().show_function_signatures; } 46 | 47 | // This type is not meant to be allocated on the heap. 48 | void* operator new(size_t) = delete; 49 | 50 | private: 51 | 52 | struct state { 53 | bool show_user_defined_docstrings = true; //< Include user-supplied texts in docstrings. 54 | bool show_function_signatures = true; //< Include auto-generated function signatures in docstrings. 55 | }; 56 | 57 | static state &global_state() { 58 | static state instance; 59 | return instance; 60 | } 61 | 62 | state previous_state; 63 | }; 64 | 65 | NAMESPACE_END(PYBIND11_NAMESPACE) 66 | -------------------------------------------------------------------------------- /Plugins~/Licenses/Poco/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | 25 | --------------------------------------------------------------------------- 26 | Note: 27 | Individual files contain the following tag instead of the full license text. 28 | 29 | SPDX-License-Identifier: BSL-1.0 30 | 31 | This enables machine processing of license information based on the SPDX 32 | License Identifiers that are here available: http://spdx.org/licenses/ 33 | -------------------------------------------------------------------------------- /Plugins~/Licenses/zstd/LICENSE: -------------------------------------------------------------------------------- 1 | BSD License 2 | 3 | For Zstandard software 4 | 5 | Copyright (c) 2016-present, Facebook, Inc. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | * Neither the name Facebook nor the names of its contributors may be used to 18 | endorse or promote products derived from this software without specific 19 | prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/AsyncTasksController.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | #include "MeshSyncClient/AsyncTasksController.h" 4 | 5 | namespace MeshSyncClient { 6 | 7 | void AsyncTasksController::Wait() { 8 | for (std::vector>::value_type& t : m_tasks) 9 | t.wait(); 10 | m_tasks.clear(); 11 | 12 | // Do deferred tasks now that everything else is done: 13 | for (auto t : m_deferredTasks) { 14 | t(); 15 | } 16 | m_deferredTasks.clear(); 17 | } 18 | 19 | 20 | 21 | } //end namespace MeshSyncClient 22 | 23 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/BaseSyncSettings.cpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseSyncSettings.h" 4 | 5 | namespace MeshSyncClient { 6 | 7 | void BaseSyncSettings::Validate() { 8 | if (!BakeModifiers) 9 | BakeTransform = false; 10 | 11 | } 12 | 13 | } // namespace MeshSyncClient 14 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(MeshSyncClient_dir "${CMAKE_CURRENT_SOURCE_DIR}") 2 | 3 | 4 | file(GLOB_RECURSE sources *.cpp *.h ) 5 | add_library(MeshSyncClient STATIC ${sources}) 6 | source_group(TREE ${MeshSyncClient_dir} FILES ${sources}) 7 | 8 | target_include_directories(MeshSyncClient 9 | PUBLIC 10 | "${MeshSyncClient_dir}/Include" 11 | PRIVATE 12 | "${MeshSyncClient_dir}" 13 | "${MESHSYNC_PLUGIN_SRC_ROOT}/MeshSync/Include" 14 | "${MESHSYNC_PLUGIN_SRC_ROOT}/MeshUtils/Include" 15 | "${MESHSYNC_PLUGIN_SRC_ROOT}" 16 | "${Poco_INCLUDE_DIRS}" 17 | 18 | ) 19 | 20 | add_dependencies(MeshSyncClient 21 | MeshSync 22 | ) 23 | target_precompile_headers(MeshSyncClient PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/pch.h") 24 | 25 | target_link_libraries(MeshSyncClient 26 | PUBLIC 27 | MeshSync 28 | ) 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/AsyncTasksController.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace MeshSyncClient { 7 | 8 | class AsyncTasksController { 9 | public: 10 | template 11 | void AddTask(const std::launch launchMode, T task) { 12 | if (launchMode == std::launch::async) { 13 | m_tasks.push_back(std::async(std::launch::async, task)); 14 | } 15 | else { 16 | // Cannot use std::async's deferred mode here, we need to ensure these deferred tasks run after everything else is complete: 17 | m_deferredTasks.push_back(std::function(task)); 18 | } 19 | } 20 | 21 | void Wait(); 22 | 23 | private: 24 | 25 | std::vector> m_tasks; 26 | std::vector> m_deferredTasks; 27 | }; 28 | 29 | 30 | } // namespace MeshSyncClient 31 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/BaseCacheSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "MeshSyncClient/FrameRange.h" 6 | #include "MeshSyncClient/MaterialFrameRange.h" 7 | #include "MeshSyncClient/ObjectScope.h" 8 | 9 | 10 | namespace MeshSyncClient { 11 | 12 | struct BaseCacheSettings { 13 | 14 | int zstd_compression_level = 3; // (min) 0 - 22 (max) 15 | 16 | //To export SceneCache ? 17 | MeshSyncClient::ObjectScope object_scope = MeshSyncClient::ObjectScope::All; 18 | MeshSyncClient::FrameRange frame_range = MeshSyncClient::FrameRange::All; 19 | int frame_begin = 0; 20 | int frame_end = 100; 21 | float frame_step = 1.0f; 22 | MeshSyncClient::MaterialFrameRange material_frame_range = MeshSyncClient::MaterialFrameRange::One; 23 | 24 | bool make_double_sided = false; 25 | bool bake_modifiers = true; 26 | bool bake_transform = true; 27 | 28 | bool flatten_hierarchy = false; 29 | bool merge_meshes = false; 30 | 31 | bool strip_normals = false; 32 | bool strip_tangents = true; 33 | 34 | }; 35 | 36 | } // namespace MeshSyncClient 37 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/BaseSyncSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/msClientSettings.h" //ClientSettings 4 | 5 | namespace MeshSyncClient { 6 | 7 | struct BaseSyncSettings { 8 | 9 | ms::ClientSettings client_settings; 10 | uint16_t editor_server_port = 8081; 11 | 12 | bool sync_meshes = true; 13 | bool sync_curves = true; 14 | bool sync_normals = true; 15 | bool sync_uvs = true; 16 | bool sync_colors = true; 17 | 18 | bool sync_blendshapes = true; 19 | bool sync_bones = true; 20 | bool sync_textures = true; 21 | bool sync_cameras = true; 22 | bool sync_lights = true; 23 | 24 | bool make_double_sided = false; 25 | bool BakeModifiers = false; 26 | bool BakeTransform = false; 27 | 28 | bool flatten_hierarchy = false; 29 | 30 | // cache. [TODO-sin: 2021-2-8] Remove this flag if possible 31 | bool ExportSceneCache = false; 32 | 33 | void Validate(); 34 | 35 | }; 36 | 37 | } // namespace MeshSyncClient 38 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/ExportTarget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace MeshSyncClient { 4 | 5 | enum class ExportTarget : int { 6 | Objects, 7 | Materials, 8 | Animations, 9 | Everything, 10 | }; 11 | 12 | } // namespace MeshSyncClient 13 | 14 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/FrameRange.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace MeshSyncClient { 4 | 5 | enum class FrameRange : int { 6 | Current, 7 | All, 8 | Custom, 9 | }; 10 | 11 | } // namespace MeshSyncClient 12 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/MaterialFrameRange.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace MeshSyncClient { 4 | 5 | enum class MaterialFrameRange : int { 6 | None, 7 | One, 8 | All, 9 | }; 10 | 11 | } // namespace MeshSyncClient 12 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/ObjectScope.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace MeshSyncClient { 4 | 5 | enum class ObjectScope : int { 6 | None = -1, 7 | All, 8 | Selected, 9 | Updated, 10 | }; 11 | 12 | } // namespace MeshSyncClient 13 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/SceneCacheUtility.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace MeshSyncClient { 6 | 7 | class SceneCacheUtility { 8 | 9 | public: 10 | //requestedPath: 11 | // c:/Users/file.bin 12 | // c:/Users/asset.sc 13 | // c:/Users/asset (sc will be automatically appended) 14 | static std::string BuildFilePath(const std::string& requestedPath); 15 | static std::string BuildFilePath(const char* requestedPath); 16 | 17 | }; 18 | 19 | 20 | } // namespace MeshSyncClient 21 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/SettingsUtility.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ms { 4 | struct SceneCacheOutputSettings; 5 | } 6 | 7 | namespace MeshSyncClient { 8 | 9 | struct BaseCacheSettings; 10 | struct BaseSyncSettings; 11 | 12 | class SettingsUtility { 13 | 14 | public: 15 | static void ApplyCacheToSyncSettings(const BaseCacheSettings& cacheSettings, BaseSyncSettings* syncSettings); 16 | static ms::SceneCacheOutputSettings CreateSceneCacheOutputSettings(float sampleRate, const BaseCacheSettings& cacheSettings); 17 | 18 | 19 | }; 20 | 21 | 22 | } // namespace MeshSyncClient 23 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/msEntityManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MeshSync/MeshSync.h" //msDeclClassPtr 3 | #include "msTransformManager.h" 4 | #include "MeshSync/SceneGraph/msEntity.h" 5 | 6 | msDeclStructPtr(Identifier) 7 | msDeclClassPtr(Transform) 8 | 9 | #ifndef msRuntime 10 | namespace ms { 11 | 12 | 13 | struct EntityManagerRecord 14 | { 15 | TransformPtr entity; 16 | int order = 0; 17 | uint64_t checksum_trans = 0; 18 | uint64_t checksum_geom = 0; 19 | bool dirty_trans = false; 20 | bool dirty_geom = false; 21 | bool updated = false; 22 | std::future task; 23 | 24 | void waitTask(); 25 | }; 26 | 27 | class EntityManager : public TransformManager 28 | { 29 | public: 30 | EntityManager(); 31 | ~EntityManager(); 32 | bool empty() const; 33 | 34 | // clear all states (both entity and delete record will be cleared) 35 | void clear() override; 36 | void clearEntityRecords(); 37 | void clearDeleteRecords(); 38 | 39 | // erase entity and add delete record 40 | bool erase(const std::string& path); 41 | bool erase(int id); 42 | bool erase(const Identifier& identifier); 43 | bool erase(TransformPtr v); 44 | bool eraseThreadSafe(TransformPtr v); 45 | 46 | // thread safe 47 | void add(TransformPtr v) override; 48 | 49 | void touch(const std::string& path) override; 50 | 51 | std::vector getAllEntities(); 52 | std::vector getDirtyTransforms(); 53 | std::vector getDirtyGeometries(); 54 | std::vector> getDirtyGeometriesWithChecksum(); 55 | std::vector& getDeleted(); 56 | void makeDirtyAll(); 57 | void clearDirtyFlags(); 58 | 59 | std::vector getStaleEntities(); 60 | void eraseStaleEntities() override; 61 | 62 | void updateChecksumGeom(Transform* obj); 63 | 64 | private: 65 | 66 | void waitTasks(); 67 | 68 | void addTransform(TransformPtr v); 69 | void addGeometry(TransformPtr v); 70 | 71 | using kvp = std::map::value_type; 72 | 73 | int m_order = 0; 74 | }; 75 | 76 | } // namespace ms 77 | #endif // msRuntime 78 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/msITransformManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/MeshSync.h" 4 | 5 | namespace ms{ 6 | 7 | /// 8 | /// Interface for managers that deal with Transforms. 9 | /// 10 | class ITransformManager { 11 | public: 12 | virtual void add(TransformPtr transform) = 0; 13 | virtual void touch(const std::string& path) = 0; 14 | virtual void eraseStaleEntities() = 0; 15 | virtual void clear() = 0; 16 | virtual void setAlwaysMarkDirty(bool flag) = 0; 17 | 18 | virtual bool needsToApplyMirrorModifier() { return true; } 19 | }; 20 | } -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/msInstancesManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/MeshSync.h" 4 | #include 5 | #include 6 | #include "msTransformManager.h" 7 | 8 | #ifndef msRuntime 9 | 10 | msDeclClassPtr(InstanceInfo) 11 | 12 | namespace ms { 13 | 14 | struct InstancesManagerRecord 15 | { 16 | bool dirtyInstances = false; 17 | bool dirtyMesh = false; 18 | InstanceInfoPtr instances = nullptr; 19 | TransformPtr entity = nullptr; 20 | bool updated = false; 21 | }; 22 | 23 | /// 24 | /// Manager for transforms and transform instances. 25 | /// 26 | class InstancesManager : public TransformManager 27 | { 28 | public: 29 | /// 30 | /// Returns meshes that have changed since the last export. 31 | /// 32 | std::vector getDirtyMeshes(); 33 | 34 | /// 35 | /// Returns instaces that have changed since the last export. 36 | /// 37 | std::vector getDirtyInstances(); 38 | 39 | /// 40 | /// Returns identifiers of records that have been deleted since the last export. 41 | /// 42 | std::vector& getDeleted(); 43 | 44 | /// 45 | /// Clears the dirty flags on the records. 46 | /// 47 | void clearDirtyFlags(); 48 | 49 | /// 50 | /// Adds a record about instancing information. 51 | /// 52 | void add(InstanceInfoPtr instanceInfo); 53 | 54 | /// 55 | /// Adds or updates a record about the transform. 56 | /// 57 | void add (TransformPtr entity) override; 58 | 59 | /// 60 | /// Clears the records collection. 61 | /// 62 | void clear() override; 63 | 64 | /// 65 | /// Touches the record at given path. 66 | /// The record will not be considered stale 67 | /// at the end of exportation. 68 | /// 69 | void touch(const std::string& path) override; 70 | 71 | /// 72 | /// Erases records that have not 73 | /// been added or touched in the last exportation. 74 | /// 75 | void eraseStaleEntities() override; 76 | 77 | bool needsToApplyMirrorModifier() override { return false; } 78 | }; 79 | 80 | 81 | 82 | } // namespace ms 83 | #endif // msRuntime 84 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/msMaterialManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/MeshSync.h" 4 | #include "MeshSync/SceneGraph/msIdentifier.h" 5 | 6 | #ifndef msRuntime 7 | 8 | msDeclClassPtr(Material) 9 | 10 | namespace ms { 11 | 12 | class MaterialManager 13 | { 14 | public: 15 | MaterialManager(); 16 | ~MaterialManager(); 17 | bool empty() const; 18 | 19 | // clear all states (both entity and delete record will be cleared) 20 | void clear(); 21 | 22 | // erase entity and add delete record 23 | bool erase(int id); 24 | 25 | MaterialPtr find(int id) const; 26 | 27 | // thread safe 28 | // material: valid ID must be assigned (assume generated by ResourceIDGenerator<>) 29 | bool add(MaterialPtr material); 30 | bool markDirty(int id); 31 | 32 | std::vector getAllMaterials(); 33 | std::vector getDirtyMaterials(); 34 | std::vector& getDeleted(); 35 | void makeDirtyAll(); 36 | void clearDirtyFlags(); 37 | 38 | std::vector getStaleMaterials(); 39 | void eraseStaleMaterials(); 40 | 41 | void setAlwaysMarkDirty(bool v); 42 | 43 | private: 44 | struct Record 45 | { 46 | MaterialPtr material; 47 | uint64_t checksum = 0; 48 | bool dirty = false; 49 | bool updated = false; 50 | }; 51 | Record& lockAndGet(int id); 52 | 53 | bool m_always_mark_dirty = false; 54 | std::map m_records; 55 | std::vector m_deleted; 56 | std::mutex m_mutex; 57 | }; 58 | 59 | } // namespace ms 60 | #endif // msRuntime 61 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/msPropertyManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/MeshSync.h" 4 | #include "MeshSync/SceneGraph/msIdentifier.h" 5 | #include 6 | #include 7 | 8 | #ifndef msRuntime 9 | 10 | msDeclClassPtr(PropertyInfo) 11 | msDeclClassPtr(Entity) 12 | 13 | namespace ms { 14 | class PropertyManager 15 | { 16 | public: 17 | std::vector getAllProperties(); 18 | void add(PropertyInfoPtr propertyInfo); 19 | void clear(); 20 | 21 | void updateFromServer(std::vector properties, std::vector entities); 22 | std::vector getReceivedProperties(); 23 | std::vector getReceivedEntities(); 24 | void clearReceivedData(); 25 | private: 26 | std::map m_records; 27 | std::vector m_receivedProperties; 28 | std::vector m_receivedEntities; 29 | std::mutex m_mutex; 30 | bool m_always_mark_dirty; 31 | }; 32 | } // namespace ms 33 | #endif // msRuntime 34 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/msTextureManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/SceneGraph/msMaterial.h" 4 | #include "MeshSync/MeshSync.h" 5 | 6 | #include "MeshSync/SceneGraph/msTexture.h" //TextureFormat, TextureType 7 | 8 | #ifndef msRuntime 9 | namespace ms { 10 | 11 | class TextureManager 12 | { 13 | public: 14 | TextureManager(); 15 | ~TextureManager(); 16 | bool empty() const; 17 | void clear(); 18 | bool erase(const std::string& name); 19 | int find(const std::string& name) const; 20 | 21 | // thread safe 22 | int addImage(const std::string& name, int width, int height, const void *data, size_t size, TextureFormat format, TextureType type = TextureType::Default); 23 | // thread safe 24 | int addFile(const std::string& path, TextureType type); 25 | // thread safe 26 | int add(TexturePtr tex); 27 | 28 | std::vector getAllTextures(); 29 | std::vector getDirtyTextures(); 30 | void makeDirtyAll(); 31 | void clearDirtyFlags(); 32 | 33 | void setAlwaysMarkDirty(bool v); 34 | 35 | private: 36 | struct Record 37 | { 38 | TexturePtr texture; 39 | uint64_t mtime = 0; 40 | uint64_t checksum = 0; 41 | bool dirty = false; 42 | std::future task; 43 | 44 | void waitTask(); 45 | }; 46 | int genID(); 47 | void waitTasks(); 48 | Record& lockAndGet(const std::string& path); 49 | 50 | int m_id_seed = 0; 51 | bool m_always_mark_dirty = false; 52 | std::map m_records; 53 | std::mutex m_mutex; 54 | }; 55 | 56 | } // namespace ms 57 | #endif // msRuntime 58 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/Include/MeshSyncClient/msTransformManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/MeshSync.h" 4 | #include "msITransformManager.h" 5 | #include "MeshSync/SceneGraph/msIdentifier.h" 6 | 7 | namespace ms{ 8 | 9 | /// 10 | /// Abstraction for managers that handle records with TransformPtr data. 11 | /// 12 | /// The type of record that the manager uses 13 | template 14 | class TransformManager : public ITransformManager { 15 | public: 16 | 17 | void setAlwaysMarkDirty(bool v) override { 18 | m_always_mark_dirty = v; 19 | } 20 | 21 | virtual void add(TransformPtr transform) = 0; 22 | virtual void touch(const std::string& path) = 0; 23 | virtual void eraseStaleEntities() = 0; 24 | virtual void clear() = 0; 25 | 26 | TransformManager() {} 27 | ~TransformManager() {} 28 | 29 | TransformManager& operator=(const TransformManager& v) 30 | { 31 | return *this; 32 | } 33 | 34 | 35 | TransformManager(TransformManager&& v) 36 | { 37 | *this = std::move(v); 38 | } 39 | 40 | TransformManager& operator=(TransformManager&& v) 41 | { 42 | 43 | return *this; 44 | } 45 | 46 | TransformManager(const TransformManager& v){ *this = v; } 47 | 48 | protected: 49 | bool m_always_mark_dirty = false; 50 | std::mutex m_mutex; 51 | std::vector m_deleted; 52 | 53 | std::map m_records; 54 | 55 | T& lockAndGet(const std::string& path) { 56 | std::unique_lock lock(m_mutex); 57 | if (!m_deleted.empty()) { 58 | auto it = std::find_if(m_deleted.begin(), m_deleted.end(), [&path](Identifier& v) { return v.name == path; }); 59 | if (it != m_deleted.end()) 60 | m_deleted.erase(it); 61 | } 62 | return m_records[path]; 63 | } 64 | }; 65 | } -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/SceneCacheUtility.cpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/SceneCacheUtility.h" 4 | #include "Poco/Path.h" 5 | 6 | namespace MeshSyncClient { 7 | 8 | std::string SceneCacheUtility::BuildFilePath(const std::string& requestedPath) { 9 | return BuildFilePath(requestedPath.c_str()); 10 | } 11 | 12 | std::string SceneCacheUtility::BuildFilePath(const char* requestedPath) { 13 | Poco::Path path(requestedPath); 14 | if (path.getExtension().length() > 0) { 15 | return path.toString(); 16 | } 17 | 18 | path.setExtension(/*SCENE_CACHE_EXT = */ "sc"); 19 | return path.toString(); 20 | } 21 | 22 | 23 | } // namespace MeshSyncClient 24 | 25 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/SettingsUtility.cpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/SceneCache/msSceneCacheOutputSettings.h" //SceneCacheOutputSettings 4 | 5 | 6 | #include "MeshSyncClient/SettingsUtility.h" 7 | #include "MeshSyncClient/BaseCacheSettings.h" 8 | #include "MeshSyncClient/BaseSyncSettings.h" 9 | 10 | 11 | namespace MeshSyncClient { 12 | 13 | void SettingsUtility::ApplyCacheToSyncSettings(const BaseCacheSettings& cacheSettings, BaseSyncSettings* syncSettings) { 14 | syncSettings->ExportSceneCache = true; 15 | syncSettings->make_double_sided = cacheSettings.make_double_sided; 16 | syncSettings->BakeModifiers = cacheSettings.bake_modifiers; 17 | syncSettings->BakeTransform = cacheSettings.bake_transform; 18 | syncSettings->flatten_hierarchy = cacheSettings.flatten_hierarchy; 19 | syncSettings->Validate(); 20 | } 21 | 22 | //---------------------------------------------------------------------------------------------------------------------- 23 | 24 | ms::SceneCacheOutputSettings SettingsUtility::CreateSceneCacheOutputSettings(float sampleRate, const BaseCacheSettings& cacheSettings) { 25 | ms::SceneCacheOutputSettings oscs; 26 | oscs.exportSettings.sampleRate = sampleRate; 27 | oscs.exportSettings.encoderSettings.zstd.compressionLevel = cacheSettings.zstd_compression_level; 28 | oscs.exportSettings.flattenHierarchy = cacheSettings.flatten_hierarchy; 29 | oscs.exportSettings.stripNormals = cacheSettings.strip_normals; 30 | oscs.exportSettings.stripTangents = cacheSettings.strip_tangents; 31 | return oscs; 32 | } 33 | 34 | 35 | } // namespace MeshSyncClient 36 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/msPropertyManager.cpp: -------------------------------------------------------------------------------- 1 | #include "MeshSyncClient/msPropertyManager.h" 2 | #include "pch.h" 3 | #include "MeshSync/SceneGraph/msPropertyInfo.h" 4 | 5 | using namespace std; 6 | 7 | namespace ms { 8 | vector ms::PropertyManager::getAllProperties() 9 | { 10 | std::unique_lock lock(m_mutex); 11 | 12 | vector ret; 13 | 14 | for (const auto& [key, propertyInfo] : m_records) { 15 | ret.push_back(propertyInfo); 16 | } 17 | 18 | return ret; 19 | } 20 | 21 | void PropertyManager::add(PropertyInfoPtr propertyInfo) 22 | { 23 | std::unique_lock lock(m_mutex); 24 | 25 | m_records[propertyInfo->hash()] = propertyInfo; 26 | } 27 | 28 | void PropertyManager::clear() 29 | { 30 | std::unique_lock lock(m_mutex); 31 | 32 | m_records.clear(); 33 | } 34 | 35 | void PropertyManager::updateFromServer(std::vector properties, std::vector entities) 36 | { 37 | std::unique_lock lock(m_mutex); 38 | 39 | m_receivedProperties.insert(m_receivedProperties.end(), properties.begin(), properties.end()); 40 | m_receivedEntities.insert(m_receivedEntities.end(), entities.begin(), entities.end()); 41 | } 42 | 43 | std::vector PropertyManager::getReceivedProperties() 44 | { 45 | std::unique_lock lock(m_mutex); 46 | 47 | return m_receivedProperties; 48 | } 49 | 50 | std::vector PropertyManager::getReceivedEntities() { 51 | std::unique_lock lock(m_mutex); 52 | 53 | return m_receivedEntities; 54 | } 55 | 56 | void PropertyManager::clearReceivedData() { 57 | std::unique_lock lock(m_mutex); 58 | 59 | m_receivedProperties.clear(); 60 | m_receivedEntities.clear(); 61 | } 62 | } -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #include 5 | #include 6 | #include 7 | 8 | #include //std::uniform_int_distribution 9 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient3dsMax/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Find version 2 | string(REGEX MATCH "([0-9.]+)$" 3DSMAX_VERSION "${CMAKE_CURRENT_SOURCE_DIR}") 3 | set(MESHSYNC_CLIENT_3DSMAX "MeshSyncClient3DSMAX_${3DSMAX_VERSION}") 4 | 5 | set(MESHSYNC_PLUGIN_3DSMAX_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 6 | include(3dsMax) 7 | setup_3dsmax(${3DSMAX_VERSION}) 8 | 9 | file(GLOB sources *.cpp *.h *.rc) 10 | set_source_files_properties(*.rc PROPERTIES LANGUAGE RC) 11 | 12 | add_library(${MESHSYNC_CLIENT_3DSMAX} SHARED ${sources}) 13 | add_dependencies(${MESHSYNC_CLIENT_3DSMAX} MeshSyncClient ) 14 | 15 | #Include, pch 16 | target_precompile_headers(${MESHSYNC_CLIENT_3DSMAX} PRIVATE "${MESHSYNC_PLUGIN_3DSMAX_DIR}/pch.h") 17 | target_include_directories(${MESHSYNC_CLIENT_3DSMAX} PRIVATE 18 | "${CMAKE_SOURCE_DIR}" 19 | "${3DSMAX${3DSMAX_VERSION}_INCLUDE_DIR}" 20 | "${3DSMAX${3DSMAX_VERSION}_INCLUDE_DIR}/../samples" 21 | ) 22 | 23 | target_link_libraries(${MESHSYNC_CLIENT_3DSMAX} 24 | PRIVATE 25 | MeshSyncClient 26 | ${3DSMAX${3DSMAX_VERSION}_LIBRARIES} 27 | ) 28 | 29 | # Installation 30 | set(DEST_DIR "${DIST_ROOT}/UnityMeshSync_${UNITY_PACKAGE_VERSION}_3DSMAX_${PLATFORM}") 31 | set_target_properties(${MESHSYNC_CLIENT_3DSMAX} PROPERTIES SUFFIX ".dlu") 32 | 33 | set(MESHSYNC_CLIENT_3DSMAX_OUTPUT_NAME "MeshSyncClient3dsMax") 34 | set_target_properties(${MESHSYNC_CLIENT_3DSMAX} PROPERTIES PREFIX "") 35 | set_target_properties(${MESHSYNC_CLIENT_3DSMAX} PROPERTIES OUTPUT_NAME ${MESHSYNC_CLIENT_3DSMAX_OUTPUT_NAME}) 36 | 37 | set(DLU_DEST_DIR "${DEST_DIR}/3dsMax${3DSMAX_VERSION}") 38 | 39 | # Folder structure 40 | # modules 41 | # |- 3dsMax2017 42 | # | └─ MeshSyncClient3dsMax.dlu 43 | # |- 3dsMax2018 44 | # | └─ MeshSyncClient3dsMax.dlu 45 | # |- 3dsMax2019 46 | # | └─ MeshSyncClient3dsMax.dlu 47 | 48 | 49 | # copy files to destination, as part of the install process. 50 | install(TARGETS ${MESHSYNC_CLIENT_3DSMAX} DESTINATION "${DLU_DEST_DIR}") 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient3dsMax/MaxCacheSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseCacheSettings.h" 4 | 5 | struct MaxCacheSettings : public MeshSyncClient::BaseCacheSettings { 6 | bool ignore_non_renderable = true; 7 | bool use_render_meshes = true; 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient3dsMax/MaxSyncSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseSyncSettings.h" 4 | 5 | struct MaxSyncSettings : public MeshSyncClient::BaseSyncSettings { 6 | int timeout_ms = 5000; 7 | float scale_factor = 1.0f; 8 | bool auto_sync = false; 9 | 10 | bool flip_faces = true; 11 | bool use_render_meshes = false; 12 | 13 | bool ignore_non_renderable = true; 14 | 15 | float frame_step = 1.0f; 16 | 17 | // parallel mesh extraction. 18 | // it seems can cause problems when exporting objects with EvalWorldState()... 19 | bool multithreaded = false; 20 | 21 | }; 22 | 23 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient3dsMax/msmaxCallbacks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // actually, this callback draws nothing. 4 | // just catch repaint callback and use it as idle callback (max seems don't have idle callback) 5 | class msmaxViewportDisplayCallback : public ViewportDisplayCallback 6 | { 7 | public: 8 | static msmaxViewportDisplayCallback& getInstance(); 9 | 10 | void Display(TimeValue t, ViewExp *vpt, int flags) override; 11 | void GetViewportRect(TimeValue t, ViewExp *vpt, Rect *rect) override; 12 | BOOL Foreground() override; 13 | }; 14 | 15 | class msmaxNodeCallback : public INodeEventCallback 16 | { 17 | public: 18 | static msmaxNodeCallback& getInstance(); 19 | 20 | void Added(NodeKeyTab& nodes) override; 21 | void Deleted(NodeKeyTab& nodes) override; 22 | void LinkChanged(NodeKeyTab& nodes) override; 23 | void HierarchyOtherEvent(NodeKeyTab& nodes) override; 24 | 25 | void ModelStructured(NodeKeyTab& nodes) override; 26 | void GeometryChanged(NodeKeyTab& nodes) override; 27 | void TopologyChanged(NodeKeyTab& nodes) override; 28 | void MappingChanged(NodeKeyTab& nodes) override; 29 | void ExtentionChannelChanged(NodeKeyTab& nodes) override; 30 | void ModelOtherEvent(NodeKeyTab& nodes) override; 31 | 32 | void ControllerOtherEvent(NodeKeyTab& nodes) override; // transform change callback 33 | void HideChanged(NodeKeyTab& nodes) override; 34 | }; 35 | 36 | class msmaxTimeChangeCallback : public TimeChangeCallback 37 | { 38 | public: 39 | static msmaxTimeChangeCallback& getInstance(); 40 | 41 | void TimeChanged(TimeValue t) override; 42 | }; 43 | 44 | 45 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient3dsMax/msmaxUI.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/Src/MeshSyncClient3dsMax/msmaxUI.rc -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient3dsMax/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClient3dsMax/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #define _CRT_NON_CONFORMING_SWPRINTFS 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #define WIN32_LEAN_AND_MEAN 21 | #define NOMINMAX 22 | // 3ds Max headers 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #if MAX_PRODUCT_YEAR_NUMBER >= 2018 43 | #include 44 | #endif 45 | 46 | #ifdef PI 47 | #undef PI 48 | #endif 49 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderCacheSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseCacheSettings.h" 4 | 5 | struct BlenderCacheSettings : public MeshSyncClient::BaseCacheSettings { 6 | bool curves_as_mesh = true; 7 | }; 8 | 9 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyContext.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "BlenderPyContext.h" 3 | #include "BlenderPyCommon.h" 4 | 5 | namespace blender { 6 | 7 | extern bContext *g_context; 8 | 9 | StructRNA* BlenderPyContext::s_type; 10 | PropertyRNA* BlenderPyContext_blend_data = nullptr; 11 | PropertyRNA* BlenderPyContext_scene = nullptr; 12 | FunctionRNA* BlenderPyContext_evaluated_depsgraph_get = nullptr; 13 | FunctionRNA* BlenderPyContext_depsgraph_update = nullptr; 14 | PropertyRNA* BlenderPyContext_view_layer = nullptr; 15 | 16 | 17 | BlenderPyContext BlenderPyContext::get() 18 | { 19 | return BlenderPyContext(g_context); 20 | } 21 | Main* BlenderPyContext::data() 22 | { 23 | return (Main*)get_pointer(m_ptr, BlenderPyContext_blend_data); 24 | } 25 | Scene* BlenderPyContext::scene() 26 | { 27 | return (Scene*)get_pointer(m_ptr, BlenderPyContext_scene); 28 | } 29 | 30 | Depsgraph* BlenderPyContext::evaluated_depsgraph_get() 31 | { 32 | return call(g_context, m_ptr, BlenderPyContext_evaluated_depsgraph_get); 33 | } 34 | 35 | ViewLayer* BlenderPyContext::view_layer() 36 | { 37 | return (ViewLayer*)get_pointer(m_ptr, BlenderPyContext_view_layer); 38 | } 39 | 40 | 41 | void BlenderPyContext::UpdateDepsgraph(Depsgraph* depsgraph) { 42 | call(g_context, depsgraph, BlenderPyContext_depsgraph_update); 43 | } 44 | 45 | 46 | } // namespace blender 47 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include //bContext 4 | #include "msblenMacros.h" //MSBLEN_BOILERPLATE2 5 | 6 | namespace blender 7 | { 8 | 9 | class BlenderPyContext 10 | { 11 | public: 12 | MSBLEN_BOILERPLATE2(BlenderPyContext, bContext) 13 | 14 | static BlenderPyContext get(); 15 | Main* data(); 16 | Scene* scene(); 17 | Depsgraph* evaluated_depsgraph_get(); 18 | ViewLayer* view_layer(); 19 | 20 | static void UpdateDepsgraph(Depsgraph* depsgraph); 21 | 22 | }; 23 | 24 | } // namespace blender 25 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyDepsgraph.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace blender { 5 | 6 | PropertyRNA* BlenderPyDepsgraph_object_instances = nullptr; 7 | 8 | BlenderPyDepsgraph::BlenderPyDepsgraph(Depsgraph* depsgraph) 9 | { 10 | m_depsgraph = depsgraph; 11 | } 12 | 13 | void BlenderPyDepsgraph::object_instances_begin(CollectionPropertyIterator* it) { 14 | 15 | PointerRNA rna; 16 | rna.data = m_depsgraph; 17 | 18 | CollectionPropertyRNA* cprop = (CollectionPropertyRNA*)BlenderPyDepsgraph_object_instances; 19 | 20 | cprop->begin(it, &rna); 21 | } 22 | 23 | void BlenderPyDepsgraph::object_instances_end(CollectionPropertyIterator* it) { 24 | 25 | CollectionPropertyRNA* cprop = (CollectionPropertyRNA*)BlenderPyDepsgraph_object_instances; 26 | cprop->end(it); 27 | } 28 | 29 | void BlenderPyDepsgraph::object_instances_next(CollectionPropertyIterator* it) { 30 | CollectionPropertyRNA* cprop = (CollectionPropertyRNA*)BlenderPyDepsgraph_object_instances; 31 | cprop->next(it); 32 | } 33 | 34 | PointerRNA BlenderPyDepsgraph::object_instances_get(CollectionPropertyIterator* it) { 35 | 36 | auto collectionProp = (CollectionPropertyRNA*)BlenderPyDepsgraph_object_instances; 37 | return collectionProp->get(it); 38 | } 39 | } -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyDepsgraph.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include //bContext 3 | #include "MeshUtils/muMath.h" 4 | 5 | namespace blender 6 | { 7 | /// 8 | /// A wrapper around the RNA callbacks for accessing properties and collections related 9 | /// to the Depsgraph. 10 | /// 11 | class BlenderPyDepsgraph 12 | { 13 | public: 14 | 15 | /// 16 | /// Creates a wrapper from the given Depsgraph pointer. 17 | /// 18 | BlenderPyDepsgraph(Depsgraph* depsgraph); 19 | 20 | /// 21 | /// Sets the iterator to the begin of the object instances of Depsgraph. 22 | /// 23 | void object_instances_begin(CollectionPropertyIterator* it); 24 | 25 | /// 26 | /// Sets the iterator to the end of the object instances of Depsgraph. 27 | /// Will also cleanup resources used by the iterator. 28 | /// 29 | void object_instances_end(CollectionPropertyIterator* it); 30 | 31 | /// 32 | /// Moves the iterator to the next element of the object instances of Depsgraph. 33 | /// 34 | void object_instances_next(CollectionPropertyIterator* it); 35 | 36 | /// 37 | /// Fetches the iterator value 38 | /// 39 | PointerRNA object_instances_get(CollectionPropertyIterator* it); 40 | 41 | private: 42 | Depsgraph* m_depsgraph; 43 | }; 44 | 45 | } -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyDepsgraphObjectInstance.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "BlenderPyCommon.h" 3 | #include "BlenderPyObjects/BlenderPyDepsgraphObjectInstance.h" 4 | 5 | namespace blender { 6 | 7 | PropertyRNA* BlenderPyDepsgraphObjectInstance_instance_object = nullptr; 8 | PropertyRNA* BlenderPyDepsgraphObjectInstance_is_instance = nullptr; 9 | PropertyRNA* BlenderPyDepsgraphObjectInstance_world_matrix = nullptr; 10 | PropertyRNA* BlenderPyDepsgraphObjectInstance_parent = nullptr; 11 | PropertyRNA* BlenderPyDepsgraphObjectInstance_object = nullptr; 12 | 13 | Object* BlenderPyDepsgraphInstance::instance_object() { 14 | auto objectInstanceProp = (PointerPropertyRNA*)BlenderPyDepsgraphObjectInstance_instance_object; 15 | auto object = objectInstanceProp->get(&m_instance); 16 | 17 | if (object.type == nullptr || object.data == nullptr) { 18 | return nullptr; 19 | } 20 | 21 | return (Object*)object.data; 22 | } 23 | 24 | bool BlenderPyDepsgraphInstance::is_instance() { 25 | auto booleanProp = (BoolPropertyRNA*)BlenderPyDepsgraphObjectInstance_is_instance; 26 | return booleanProp->get(&m_instance); 27 | } 28 | 29 | void BlenderPyDepsgraphInstance::world_matrix(mu::float4x4* result) 30 | { 31 | auto floatProp = (FloatPropertyRNA*)BlenderPyDepsgraphObjectInstance_world_matrix; 32 | floatProp->getarray(&m_instance, &(result->m[0][0])); 33 | } 34 | 35 | Object* BlenderPyDepsgraphInstance::parent() { 36 | auto pointerProp = (PointerPropertyRNA*)BlenderPyDepsgraphObjectInstance_parent; 37 | auto parent = pointerProp->get(&m_instance); 38 | 39 | return (Object*)parent.data; 40 | } 41 | 42 | Object* BlenderPyDepsgraphInstance::object() { 43 | auto objectInstanceProp = (PointerPropertyRNA*)BlenderPyDepsgraphObjectInstance_object; 44 | auto object = objectInstanceProp->get(&m_instance); 45 | 46 | if (object.type == nullptr || object.data == nullptr) { 47 | return nullptr; 48 | } 49 | 50 | return (Object*)object.data; 51 | } 52 | 53 | } // namespace blender 54 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyDepsgraphObjectInstance.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include //bContext 4 | #include "MeshUtils/muMath.h" 5 | 6 | namespace blender 7 | { 8 | class BlenderPyDepsgraphInstance 9 | { 10 | public: 11 | BlenderPyDepsgraphInstance(PointerRNA& instance) : m_instance(instance) {} 12 | 13 | Object* instance_object(); 14 | bool is_instance(); 15 | void world_matrix(mu::float4x4* world_matrix); 16 | Object* parent(); 17 | Object* object(); 18 | private: 19 | PointerRNA& m_instance; 20 | }; 21 | 22 | } // namespace blender 23 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyID.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | #include "BlenderPyID.h" 4 | #include "BlenderPyCommon.h" //call, etc 5 | 6 | namespace blender 7 | { 8 | 9 | extern bContext *g_context; 10 | 11 | 12 | StructRNA* BlenderPyID::s_type; 13 | PropertyRNA* BlenderPyID_is_updated; 14 | PropertyRNA* BlenderPyID_is_updated_data; 15 | FunctionRNA* BlenderPyID_evaluated_get; 16 | FunctionRNA* BlenderPyID_update_tag; 17 | 18 | 19 | const char *BlenderPyID::name() const { return m_ptr->name + 2; } 20 | bool BlenderPyID::is_updated() const { 21 | return true; //before 2.80: get_bool(m_ptr, BID_is_updated); 22 | } 23 | 24 | bool BlenderPyID::is_updated_data() const { 25 | return true; //before 2.80: return get_bool(m_ptr, BID_is_updated_data); 26 | } 27 | 28 | ID* blender::BlenderPyID::evaluated_get(Depsgraph* depsgraph) 29 | { 30 | return call(g_context, m_ptr, BlenderPyID_evaluated_get, depsgraph); 31 | } 32 | 33 | void blender::BlenderPyID::update_tag() { 34 | call(g_context, m_ptr, BlenderPyID_update_tag); 35 | } 36 | 37 | } // namespace blender 38 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyID.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "msblenMacros.h" //MSBLEN_BOILERPLATE2 4 | #include "DNA_ID.h" //ID 5 | 6 | struct Depsgraph; 7 | 8 | namespace blender 9 | { 10 | 11 | class BlenderPyID 12 | { 13 | public: 14 | MSBLEN_BOILERPLATE2(BlenderPyID, ID) 15 | 16 | const char* name() const; 17 | bool is_updated() const; 18 | bool is_updated_data() const; 19 | ID* evaluated_get(Depsgraph* depsgraph); 20 | void update_tag(); 21 | }; 22 | 23 | 24 | } // namespace blender 25 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyScene.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "BlenderPyScene.h" 3 | 4 | #include "BlenderPyCommon.h" //call 5 | 6 | #include "BlenderPyObjects/BlenderPyContext.h" //BlenderPyContext::UpdateDepsgraph 7 | 8 | namespace blender { 9 | 10 | extern bContext *g_context; 11 | 12 | StructRNA* BlenderPyScene::s_type; 13 | PropertyRNA* BlenderPyScene_frame_start = nullptr; 14 | PropertyRNA* BlenderPyScene_frame_end = nullptr; 15 | PropertyRNA* BlenderPyScene_frame_current = nullptr; 16 | FunctionRNA* BlenderPyScene_frame_set = nullptr; 17 | 18 | //---------------------------------------------------------------------------------------------------------------------- 19 | 20 | int BlenderPyScene::fps() const { return m_ptr->r.frs_sec; } 21 | int BlenderPyScene::frame_start() const { return GetInt(m_ptr, BlenderPyScene_frame_start); } 22 | int BlenderPyScene::frame_end() const { return GetInt(m_ptr, BlenderPyScene_frame_end); } 23 | int BlenderPyScene::GetCurrentFrame() const{ return GetInt(m_ptr, BlenderPyScene_frame_current); } 24 | 25 | void BlenderPyScene::SetCurrentFrame(int frame, Depsgraph* depsgraph) { 26 | SetInt(m_ptr, BlenderPyScene_frame_current, frame); 27 | 28 | struct DepsGraphInChar { 29 | char Buffer[1240]; //the size is actually different per Blender ver, per OS. What's important is the offset. 30 | }; 31 | 32 | #if BLENDER_VERSION <= 283 33 | const size_t ID_TYPE_UPDATED_OFFSET = 41; 34 | #elif BLENDER_VERSION < 300 35 | const size_t ID_TYPE_UPDATED_OFFSET = 265; 36 | #else 37 | const size_t ID_TYPE_UPDATED_OFFSET = 267; 38 | #endif 39 | 40 | //[Note-sin: 2021-5-13] Since we are modifying frame_current directly, and not using frame_set(), 41 | //we have to manually update id_type_updated so that depsgraph.update will invoke the handlers: depsgraph_update_pre, etc 42 | DepsGraphInChar* charGraph = reinterpret_cast(depsgraph); 43 | 44 | //Offset is different between Blender Debug and Release, and maybe different among different Blender versions ! 45 | charGraph->Buffer[ID_TYPE_UPDATED_OFFSET + INDEX_ID_SCE] = 1; 46 | 47 | BlenderPyContext::UpdateDepsgraph(depsgraph); 48 | 49 | } 50 | 51 | void BlenderPyScene::frame_set(int f, float subf) 52 | { 53 | call(g_context, m_ptr, BlenderPyScene_frame_set, f, subf); 54 | } 55 | 56 | 57 | 58 | } // namespace blender 59 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderPyObjects/BlenderPyScene.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DNA_scene_types.h" //Scene 4 | #include "msblenMacros.h" //MSBLEN_BOILERPLATE2 5 | 6 | #include "BlenderPyID.h" //BID 7 | #include "../msblenBinder.h" //list_range 8 | 9 | #include "msblenUtils.h" // get_name 10 | 11 | namespace blender { 12 | 13 | class BlenderPyScene { 14 | public: 15 | MSBLEN_BOILERPLATE2(BlenderPyScene, Scene) 16 | MSBLEN_COMPATIBLE(BlenderPyID) 17 | 18 | int fps() const ; 19 | int frame_start() const ; 20 | int frame_end() const ; 21 | int GetCurrentFrame() const; 22 | void SetCurrentFrame(int frame, Depsgraph* depsgraph); 23 | 24 | void frame_set(int f, float subf = 0.0f); 25 | 26 | template 27 | void each_objects_impl(const Body& body, CollectionChild *cc) 28 | { 29 | for (auto *c : list_range(cc)) { 30 | each_objects_impl(body, (CollectionChild*)c->collection->children.first); 31 | for (auto *o : list_range((CollectionObject*)c->collection->gobject.first)) 32 | body(o->ob); 33 | } 34 | } 35 | 36 | template 37 | void each_objects(const Body& body) 38 | { 39 | each_objects_impl(body, (CollectionChild*)m_ptr->master_collection->children.first); 40 | for (auto *o : list_range((CollectionObject*)m_ptr->master_collection->gobject.first)) 41 | body(o->ob); 42 | } 43 | 44 | template 45 | void each_selection(const Body& body) 46 | { 47 | each_objects([&](Object *obj) { 48 | BObject bo(obj); 49 | if (bo.is_selected()) 50 | body(obj); 51 | }); 52 | } 53 | 54 | Object* get_object_by_name(std::string objName) { 55 | Object* result = nullptr; 56 | each_objects([&](Object* obj) { 57 | auto name = msblenUtils::get_name(obj); 58 | if (name == objName) 59 | { 60 | result = obj; 61 | }}); 62 | 63 | return result; 64 | } 65 | }; 66 | 67 | } // namespace blender 68 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderSrc/customdata.cpp: -------------------------------------------------------------------------------- 1 | //TODO-sin: 2020-8-28: This file holds picked functions from Blender source code that are used to build MeshSync plugin. 2 | //It should be possible to download and use Blender source directly. 3 | //Paths of the original source code: 4 | //- source\blender\blenkernel\intern\customdata.c 5 | 6 | 7 | #include "pch.h" 8 | 9 | int CustomData_get_layer_index(const CustomData *data, int type) 10 | { 11 | BLI_assert(customdata_typemap_is_valid(data)); 12 | return data->typemap[type]; 13 | } 14 | 15 | int CustomData_get_layer_index_n(const struct CustomData *data, int type, int n) 16 | { 17 | int i = CustomData_get_layer_index(data, type); 18 | 19 | if (i != -1) { 20 | BLI_assert(i + n < data->totlayer); 21 | i = (data->layers[i + n].type == type) ? (i + n) : (-1); 22 | } 23 | 24 | return i; 25 | } 26 | 27 | 28 | void *CustomData_get_layer_n(const CustomData *data, int type, int n) 29 | { 30 | /* get the layer index of the active layer of type */ 31 | int layer_index = CustomData_get_layer_index_n(data, type, n); 32 | if (layer_index == -1) { 33 | return NULL; 34 | } 35 | 36 | return data->layers[layer_index].data; 37 | } 38 | 39 | int CustomData_number_of_layers(const CustomData *data, int type) 40 | { 41 | int i, number = 0; 42 | for (i = 0; i < data->totlayer; i++) { 43 | if (data->layers[i].type == type) { 44 | number++; 45 | } 46 | } 47 | 48 | return number; 49 | } 50 | 51 | void* CustomData_get_layer_named(const CustomData* data, const int type, const char* name) 52 | { 53 | int layer_index = CustomData_get_named_layer_index(data, type, name); 54 | if (layer_index == -1) { 55 | return nullptr; 56 | } 57 | 58 | return data->layers[layer_index].data; 59 | } 60 | 61 | int CustomData_get_named_layer_index(const CustomData* data, const int type, const char* name) 62 | { 63 | for (int i = 0; i < data->totlayer; i++) { 64 | if (data->layers[i].type == type) { 65 | if (STREQ(data->layers[i].name, name)) { 66 | return i; 67 | } 68 | } 69 | } 70 | 71 | return -1; 72 | } -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderSyncSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/SceneGraph/msSceneSettings.h" //SceneSettings 4 | #include "MeshSyncClient/BaseSyncSettings.h" 5 | 6 | struct BlenderSyncSettings : public MeshSyncClient::BaseSyncSettings { 7 | ms::SceneSettings scene_settings; 8 | bool curves_as_mesh = true; 9 | bool calc_per_index_normals = true; 10 | int frame_step = 1; 11 | bool multithreaded = true; 12 | 13 | // Keep in sync with unity_mesh_sync_common meshsync_material_sync_mode.py EnumProperty items: 14 | enum class MaterialSyncMode 15 | { 16 | None = 0, 17 | Basic = 1 18 | }; 19 | 20 | int material_sync_mode = 0; 21 | }; 22 | 23 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderUtility.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | #include "BlenderUtility.h" 4 | 5 | #include "MeshSync/MeshSyncConstants.h" //msConstants::MAX_UV 6 | #include "MeshSync/SceneGraph/msMesh.h" 7 | #include "MeshUtils/muMath.h" //mu::float2 8 | #include "MeshUtils/muRawVector.h" //SharedVector 9 | 10 | #include "msblenBinder.h" //BMesh 11 | 12 | namespace blender { 13 | 14 | void BlenderUtility::ApplyBMeshUVToMesh(const blender::BMesh* bMesh, const size_t numIndices, ms::Mesh* dest) { 15 | 16 | const uint32_t numUVs = std::min(bMesh->GetNumUVs(), ms::MeshSyncConstants::MAX_UV); 17 | 18 | for (uint32_t uvIndex=0;uvIndexGetUV(uvIndex); 20 | if (nullptr == loopUV) 21 | continue; 22 | 23 | SharedVector& curUV = dest->m_uv[uvIndex]; 24 | curUV.resize_discard(numIndices); 25 | for (size_t ii = 0; ii < numIndices; ++ii) { 26 | curUV[ii] = (mu::float2&)loopUV->uv; 27 | ++loopUV; 28 | } 29 | } 30 | 31 | } 32 | 33 | //---------------------------------------------------------------------------------------------------------------------- 34 | 35 | Material** BlenderUtility::GetMaterials(Object* obj) { 36 | Material*** matPointers = BKE_object_material_array_p(obj); 37 | return matPointers? *matPointers: NULL; 38 | } 39 | 40 | //---------------------------------------------------------------------------------------------------------------------- 41 | 42 | short BlenderUtility::GetNumMaterials(Object* obj) { 43 | const short* numMaterials = BKE_object_material_len_p(obj); 44 | return (nullptr == numMaterials) ? 0 : *numMaterials; 45 | } 46 | 47 | 48 | 49 | } //end namespace 50 | 51 | 52 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/BlenderUtility.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/MeshSync.h" 4 | 5 | namespace ms { 6 | class Mesh; 7 | } 8 | 9 | //---------------------------------------------------------------------------------------------------------------------- 10 | 11 | namespace blender{ 12 | 13 | class BMesh; 14 | 15 | class BlenderUtility { 16 | public: 17 | static void ApplyBMeshUVToMesh(const blender::BMesh* bMesh, const size_t numIndices, ms::Mesh* dest); 18 | static Material** GetMaterials(Object* obj); 19 | static short GetNumMaterials(Object* obj); 20 | }; 21 | 22 | } //end namespace 23 | 24 | 25 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenContextDefaultPathProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "msblenContextDefaultPathProvider.h" 2 | #include "msblenUtils.h" 3 | 4 | std::string msblenContextDefaultPathProvider::get_path(const Object* arm, const Bone* obj) { 5 | if (obj == nullptr) { 6 | return msblenUtils::get_path(arm); 7 | } 8 | 9 | return msblenUtils::get_path(arm, obj); 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenContextDefaultPathProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | class msblenContextDefaultPathProvider : public msblenContextPathProvider { 8 | public: 9 | std::string get_path(const Object* arm, const Bone* obj = nullptr) override; 10 | }; -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenContextIntermediatePathProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "msblenContextIntermediatePathProvider.h" 2 | #include "msblenUtils.h" 3 | #include 4 | 5 | std::string msblenContextIntermediatePathProvider::append_id(std::string path, const Object* obj) { 6 | auto data = (ID*)obj->data; 7 | 8 | path += "_" + std::string(data->name); 9 | 10 | // If we already have an object with this name but a different session_uuid, append the session_uuid as well 11 | auto it = mappedNames.find(data->name); 12 | 13 | if (it == mappedNames.end()) { 14 | mappedNames.insert(std::make_pair(data->name, data->session_uuid)); 15 | } 16 | else if (it->second != data->session_uuid) 17 | { 18 | path += "_" + std::to_string(data->session_uuid); 19 | } 20 | 21 | return path; 22 | } 23 | 24 | std::string msblenContextIntermediatePathProvider::get_path(const Object* obj, const Bone* bone) 25 | { 26 | std::string path; 27 | if (bone) { 28 | path = msblenUtils::get_path(obj, bone); 29 | } 30 | else { 31 | path = "/" + msblenUtils::get_name(obj); 32 | } 33 | 34 | return append_id(path, obj); 35 | } 36 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenContextIntermediatePathProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class msblenContextIntermediatePathProvider : public msblenContextPathProvider { 5 | private: 6 | std::string append_id(std::string path, const Object* obj); 7 | 8 | public: 9 | std::string get_path(const Object* obj, const Bone* bone) override; 10 | 11 | std::map mappedNames; 12 | }; -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenContextPathProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class msblenContextPathProvider { 6 | public: 7 | virtual std::string get_path(const Object* arm, const Bone* obj = nullptr) = 0; 8 | }; -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenContextState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "MeshSync/MeshSyncMacros.h" 4 | #include 5 | 6 | class msblenContextState { 7 | public: 8 | // note: 9 | // ObjectRecord and Blender's Object is *NOT* 1 on 1 because there is 'dupli group' in Blender. 10 | // dupli group is a collection of nodes that will be instanced. 11 | // so, only the path is unique. Object maybe shared by multiple ObjectRecord. 12 | struct ObjectRecord { 13 | MS_CLASS_DEFAULT_NOCOPY_NOASSIGN(ObjectRecord); 14 | //std::vector branches; // todo 15 | 16 | std::string path; 17 | std::string name; 18 | Object* host = nullptr; // parent of dupli group 19 | Object* obj = nullptr; 20 | Bone* bone = nullptr; 21 | 22 | ms::TransformPtr dst; 23 | 24 | bool touched = false; 25 | bool renamed = false; 26 | 27 | void clearState(); 28 | }; 29 | 30 | msblenContextState(ms::ITransformManager& manager) : manager(manager) 31 | { 32 | }; 33 | 34 | std::set pending; 35 | std::map records; 36 | std::map bones; 37 | 38 | ms::ITransformManager& manager; 39 | 40 | void eraseObjectRecords(); 41 | void eraseStaleObjects(); 42 | void clear(); 43 | void clearRecordsState(); 44 | 45 | msblenContextState::ObjectRecord& touchRecord( 46 | msblenContextPathProvider& path, 47 | const Object* obj, 48 | const std::string& base_path = "", 49 | bool children = false); 50 | }; 51 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenCurveHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../MeshSyncClientBlender/msblenContextState.h" 4 | #include "BlenderSyncSettings.h" 5 | #include "msblenEntityHandler.h" 6 | 7 | #include "MeshSync/SceneGraph/msCurve.h" 8 | 9 | #include "MeshSyncClient/AsyncTasksController.h" 10 | 11 | class msblenCurveHandler : msblenEntityHandler { 12 | private: 13 | void doExtractCurveData(msblenContextState& state, BlenderSyncSettings& settings, ms::Curve& dst, const Object* obj, Curve* data, mu::float4x4 world); 14 | 15 | public: 16 | ms::CurvePtr exportCurve(msblenContextState& state, msblenContextPathProvider& paths, BlenderSyncSettings& settings, const Object* obj, MeshSyncClient::AsyncTasksController& asyncTasksController); 17 | void importCurve(ms::Curve* curve); 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenEntityHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../MeshSyncClientBlender/msblenContextState.h" 4 | #include "BlenderSyncSettings.h" 5 | 6 | #include 7 | 8 | static const mu::float4x4 g_arm_to_world = mu::float4x4{ 9 | 1, 0, 0, 0, 10 | 0, 0,-1, 0, 11 | 0, 1, 0, 0, 12 | 0, 0, 0, 1 13 | }; 14 | static const mu::float4x4 g_world_to_arm = mu::float4x4{ 15 | 1, 0, 0, 0, 16 | 0, 0, 1, 0, 17 | 0,-1, 0, 0, 18 | 0, 0, 0, 1 19 | }; 20 | 21 | // Base class for exporting and importing entity data from and to blender. 22 | class msblenEntityHandler { 23 | public: 24 | // TODO: make all of these instance methods and have a handler for each entity type so: 25 | 26 | static mu::float4x4 getWorldMatrix(const Object* obj); 27 | static mu::float4x4 getLocalMatrix(const Object* obj); 28 | static mu::float4x4 getLocalMatrix(const Bone* bone); 29 | static mu::float4x4 getLocalMatrix(const bPoseChannel* pose); 30 | 31 | static void extractTransformData(BlenderSyncSettings& settings, const Object* src, 32 | mu::float3& t, mu::quatf& r, mu::float3& s, ms::VisibilityFlags& vis, 33 | mu::float4x4* dst_world = nullptr, mu::float4x4* dst_local = nullptr); 34 | static void extractTransformData(BlenderSyncSettings& settings, const Object* src, ms::Transform& dst); 35 | static void extractTransformData(BlenderSyncSettings& settings, const bPoseChannel* pose, mu::float3& t, mu::quatf& r, mu::float3& s); 36 | 37 | static void extract_bone_trs(const mu::float4x4& mat, mu::float3& t, mu::quatf& r, mu::float3& s); 38 | 39 | static void applyCorrectionIfNeeded(const Object* obj, mu::float4x4& matrix); 40 | static void applyCorrectionIfNeeded(mu::float4x4& matrix, bool is_camera, bool is_light); 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenGeometryNodeUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "pch.h" 4 | #include "MeshUtils/muMath.h" 5 | #include "DNA_object_types.h" 6 | #include "MeshSync/SceneGraph/msMesh.h" 7 | #include 8 | #include "MeshSyncClient/msInstancesManager.h" 9 | #include "MeshUtils/muMath.h" 10 | #include 11 | 12 | namespace blender { 13 | 14 | #if BLENDER_VERSION >= 300 15 | class GeometryNodesUtils 16 | { 17 | public: 18 | 19 | GeometryNodesUtils(); 20 | 21 | struct Record { 22 | Object* parent = nullptr; 23 | Object* obj = nullptr; 24 | SharedVector matrices; 25 | bool handled_matrices = false; 26 | bool handled_object = false; 27 | bool from_file = false; 28 | std::string name; 29 | std::string id; 30 | }; 31 | 32 | /// 33 | /// Invokes the handler function for each instance. 34 | /// 35 | /// 36 | /// The handling function: 37 | /// instancedObject is the object that is being instanced. 38 | /// transform is the transform of the instance 39 | /// 40 | void each_instance(std::function handler); 41 | 42 | /// 43 | /// Invokes the handler function for each instanced object. 44 | /// 45 | /// 46 | /// The handling function: 47 | /// instancedObject is the object that is being instanced. 48 | /// parent is the object that has the geometry node modifier. 49 | /// transforms is the collection of transforms for the instanced object. 50 | /// 51 | void each_instanced_object( 52 | std::function object_handler, 53 | std::function matrix_handler); 54 | 55 | /// 56 | /// Converts the world matrix from blender to Unity coordinate system 57 | /// 58 | mu::float4x4 blenderToUnityWorldMatrix(ms::TransformPtr transform, const mu::float4x4& blenderMatrix) const; 59 | 60 | void setInstancesDirty(bool dirty); 61 | bool getInstancesDirty(); 62 | 63 | private: 64 | bool m_instances_dirty; 65 | 66 | mu::float4x4 m_blender_to_unity_local; 67 | mu::float4x4 m_blender_to_unity_world; 68 | mu::float4x4 m_camera_light_correction; 69 | }; 70 | 71 | 72 | #endif 73 | } 74 | 75 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenMacros.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //Data structure change in Blender 2.81: https://developer.blender.org/D5558 4 | #define PointerRNA_OWNER_ID(ptr) (ptr.owner_id) 5 | #define PointerRNA_OWNER_ID_CAST(obj) reinterpret_cast(obj) 6 | 7 | namespace blender { 8 | 9 | template inline T rna_data(py::object p) { 10 | return reinterpret_cast(PointerRNA_OWNER_ID( reinterpret_cast(p.ptr())->ptr) ); 11 | } 12 | template inline void rna_data(py::object p, T& v) { 13 | v = reinterpret_cast(PointerRNA_OWNER_ID( reinterpret_cast(p.ptr())->ptr) ); 14 | } 15 | } 16 | 17 | //---------------------------------------------------------------------------------------------------------------------- 18 | 19 | #define MSBLEN_BOILERPLATE2(Type, BType)\ 20 | using btype = ::BType;\ 21 | static StructRNA *s_type;\ 22 | ::BType *m_ptr;\ 23 | static StructRNA* type() { return s_type; }\ 24 | Type(const void *p) : m_ptr((::BType*)p) {}\ 25 | Type(py::object p) : m_ptr(rna_data<::BType*>(p)) {}\ 26 | ::BType* ptr() {return m_ptr; } 27 | 28 | #define MSBLEN_BOILERPLATE(Type) MSBLEN_BOILERPLATE2(B##Type, Type) 29 | 30 | #define MSBLEN_COMPATIBLE(Type)\ 31 | operator Type() { return *(Type*)this; }\ 32 | operator Type() const { return *(const Type*)this; } 33 | 34 | #if BLENDER_VERSION >= 302 35 | #define OB_CURVE OB_CURVES_LEGACY 36 | #endif 37 | 38 | 39 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/msblenModifiers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "MeshSync/SceneGraph/msPropertyInfo.h" 5 | #include "msblenContextPathProvider.h" 6 | 7 | namespace blender { 8 | class msblenModifiers 9 | { 10 | public: 11 | static void exportProperties(const Object* obj, ms::PropertyManager* propertyManager, msblenContextPathProvider& paths); 12 | 13 | static void importProperties(std::vector props); 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | #define _CRT_SECURE_NO_WARNINGS 5 | #define NOMINMAX 6 | #include 7 | #endif 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "pybind11/pybind11.h" 26 | #include "pybind11/operators.h" 27 | #include "pybind11/eval.h" 28 | #include "pybind11/stl.h" 29 | namespace py = pybind11; 30 | 31 | #ifndef NDEBUG 32 | #define NDEBUG 33 | #endif 34 | #pragma warning( push ) 35 | #pragma warning( disable : 4200 ) // zero length array 36 | #include "BKE_blender_version.h" 37 | #include "BKE_main.h" 38 | #include "BKE_customdata.h" 39 | #include "BKE_context.h" 40 | #include "BKE_fcurve.h" 41 | #include "BKE_editmesh.h" 42 | #include "BKE_material.h" 43 | #include "BKE_node.h" 44 | #include "RNA_define.h" 45 | #include "RNA_types.h" 46 | 47 | #include "DNA_anim_types.h" 48 | #include "DNA_armature_types.h" 49 | #include "DNA_camera_types.h" 50 | #include "DNA_collection_types.h" 51 | #include "DNA_gpencil_types.h" //bGPdata 52 | #if BLENDER_VERSION < 302 53 | #include "DNA_hair_types.h" //Hair 54 | #endif 55 | #include "DNA_key_types.h" 56 | #include "DNA_light_types.h" 57 | #include "DNA_material_types.h" 58 | #include "DNA_mesh_types.h" 59 | #include "DNA_meshdata_types.h" 60 | #include "DNA_modifier_types.h" 61 | #include "DNA_object_types.h" 62 | #include "DNA_pointcloud_types.h" //PointCloud 63 | #include "DNA_scene_types.h" 64 | #include "DNA_volume_types.h" //Volume 65 | #include "DNA_packedFile_types.h" // PackedFile 66 | 67 | #include "BLI_utildefines.h" 68 | #include "BLI_math_base.h" 69 | #include "BLI_math_vector.h" 70 | #include "bmesh_class.h" 71 | #include "intern/rna_internal_types.h" 72 | #include "intern/bpy_rna.h" 73 | #include "intern/bmesh_structure.h" 74 | #pragma warning( pop ) 75 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/python/unity_mesh_sync_materials.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | from . import MeshSyncClientBlender as ms 3 | from .unity_mesh_sync_installation import * 4 | from .unity_mesh_sync_common import * 5 | 6 | msb_context = ms.Context() 7 | msb_cache = ms.Cache() 8 | 9 | class MESHSYNC_OT_SendMaterials(bpy.types.Operator): 10 | bl_idname = "meshsync.send_materials" 11 | bl_label = "Export materials" 12 | def execute(self, context): 13 | status = msb_try_setup_scene_server(context) 14 | if msb_error_messages_for_status(status, context) == False: 15 | return {'FINISHED'} 16 | msb_apply_scene_settings() 17 | msb_context.setup(bpy.context) 18 | msb_context.export(msb_context.TARGET_MATERIALS) 19 | return {'FINISHED'} 20 | 21 | class MESHSYNC_PT_Materials(MESHSYNC_PT, bpy.types.Panel): 22 | bl_label = "Materials" 23 | bl_parent_id = "MESHSYNC_PT_Main" 24 | 25 | def draw(self, context): 26 | scene = bpy.context.scene 27 | layout = self.layout 28 | layout.use_property_split = True 29 | layout.use_property_decorate = False 30 | layout.prop(scene, "meshsync_material_sync_mode", expand=True, text = "Data Mode") 31 | if scene.meshsync_material_sync_mode == '1': 32 | layout.label(text="Please bake materials to ensure this works.") 33 | 34 | layout.operator("meshsync.send_materials", text="Sync") -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/tools/extract_headers.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | import os 4 | import re 5 | import shutil 6 | 7 | if (len(sys.argv) != 2): 8 | print('Usage: %s blender_source_dir' % sys.argv[0]) 9 | quit() 10 | 11 | src_dir = sys.argv[1] 12 | dst_dir = os.getcwd() 13 | 14 | os.chdir(src_dir + '/source/blender') 15 | print(os.getcwd()) 16 | 17 | def cond(f): 18 | return re.search('\.h$', f) or\ 19 | f == 'math_base_inline.c' or\ 20 | f == 'math_bits_inline.c' or\ 21 | f == 'math_vector_inline.c' or\ 22 | f == 'math_color_inline.c' or\ 23 | f == 'math_geom_inline.c' or\ 24 | f == 'math_vector.c' or\ 25 | f == 'math_matrix.c' or\ 26 | f == 'math_rotation.c' or\ 27 | f == 'math_geom.c' 28 | 29 | for target in [ 30 | 'blenkernel', 31 | 'blenlib', 32 | 'bmesh', 33 | 'makesdna', 34 | 'makesrna', 35 | 'python' 36 | ]: 37 | shutil.copytree(target, dst_dir+'/'+target, 38 | ignore = lambda dir, list: [f for f in list if os.path.isfile(dir + '/' + f) and not cond(f)]) 39 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/tools/gen_initpy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | 4 | if (len(sys.argv) != 3): 5 | print 'Usage: %s [file] [version]' % sys.argv[0] 6 | quit() 7 | 8 | with open(sys.argv[1], 'w') as f: 9 | content = "from MeshSyncClientBlender%s.MeshSyncClientBlender import *" % sys.argv[2] 10 | f.write(content) 11 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientBlender/tools/replace_blender_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | import os 4 | import re 5 | 6 | if (len(sys.argv) != 3): 7 | print 'Usage: %s [file_to_modify] [version_string]' % sys.argv[0] 8 | quit() 9 | 10 | content = '' 11 | with open(sys.argv[1], 'r') as f: 12 | content = f.read(); 13 | 14 | r = re.compile(r"\"blender\": \((.+?)\)") 15 | content = r.sub("\"blender\": (" + sys.argv[2] + ")", content) 16 | 17 | with open(sys.argv[1], 'w') as f: 18 | f.write(content) 19 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | string(REGEX MATCH "([0-9.]+)$" MQ_VERSION "${CMAKE_CURRENT_SOURCE_DIR}") 2 | set(meshsync_client_metasequoia "MeshSyncClientMQ${MQ_VERSION}") 3 | 4 | # Setup Metasequoia SDK 5 | include(Metasequoia) 6 | get_mq(${MQ_VERSION}) 7 | setup_mq(${MQ_VERSION}) 8 | 9 | 10 | file(GLOB sources *.cpp *.h) 11 | list(FILTER sources EXCLUDE REGEX "MeshSyncClientMQ3\\.(h|cpp)") 12 | if(APPLE) 13 | file(GLOB mm_files *.mm) 14 | list(APPEND sources ${mm_files}) 15 | endif() 16 | 17 | add_library(${meshsync_client_metasequoia} MODULE ${sources}) 18 | set_target_properties(${meshsync_client_metasequoia} PROPERTIES OUTPUT_NAME "MeshSyncClientMQ") 19 | 20 | if(APPLE) 21 | set_target_properties(${meshsync_client_metasequoia} PROPERTIES BUNDLE ON) 22 | set_target_properties(${meshsync_client_metasequoia} PROPERTIES BUNDLE_EXTENSION "plugin") 23 | endif() 24 | 25 | add_dependencies(${meshsync_client_metasequoia} MeshSyncClient ) 26 | 27 | target_precompile_headers(${meshsync_client_metasequoia} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/pch.h") 28 | 29 | #ignore pch for the objective-c files 30 | set_source_files_properties(sdk_StringUtil.mm 31 | PROPERTIES SKIP_PRECOMPILE_HEADERS ON 32 | ) 33 | 34 | target_include_directories(${meshsync_client_metasequoia} PRIVATE 35 | "${CMAKE_CURRENT_SOURCE_DIR}" 36 | "${MQSDK_${MQ_VERSION}_DIR}" 37 | ) 38 | 39 | target_link_libraries(${meshsync_client_metasequoia} 40 | MeshSyncClient 41 | # ${COCOA_LIBRARY} 42 | ) 43 | 44 | 45 | # Install/copying after build 46 | set(DIST_DIR "${DIST_ROOT}/UnityMeshSync_${UNITY_PACKAGE_VERSION}_Metasequoia_${PLATFORM}/Metasequoia${MQ_VERSION}") 47 | install(TARGETS ${meshsync_client_metasequoia} DESTINATION ${DIST_DIR}) 48 | 49 | 50 | #set(DIST_DIR "${CMAKE_INSTALL_PREFIX}/UnityMeshSync_Metasequoia_${PLATFORM}/Metasequoia${MQ_VERSION}") 51 | #install(CODE "execute_process(COMMAND mkdir -p \"${DIST_DIR}/MeshSyncClientMQ4.plugin/\")") 52 | #install(CODE "execute_process(COMMAND rm -rf \"${DIST_DIR}/MeshSyncClientMQ4.plugin/\")") 53 | #install(CODE "execute_process(COMMAND cp -r \"${CMAKE_CURRENT_BINARY_DIR}/MeshSyncClientMQ4.bundle\" \"${DIST_DIR}/MeshSyncClientMQ4.plugin\")") 54 | 55 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/MQCacheSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseCacheSettings.h" 4 | 5 | struct MQCacheSettings : public MeshSyncClient::BaseCacheSettings { 6 | mu::nanosec time_start = 0; 7 | }; 8 | 9 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/MeshSyncClientMQ3.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "msmqPluginBase.h" 4 | 5 | class MeshSyncClientPlugin : public MQStationPlugin, public msmqPluginBase 6 | { 7 | public: 8 | MeshSyncClientPlugin(); 9 | ~MeshSyncClientPlugin() override; 10 | 11 | void GetPlugInID(DWORD *Product, DWORD *ID) override; 12 | const char *GetPlugInName(void) override; 13 | const char *EnumString(void) override; 14 | 15 | BOOL Initialize() override; 16 | void Exit() override; 17 | 18 | BOOL Activate(MQDocument doc, BOOL flag) override; 19 | BOOL IsActivated(MQDocument doc) override; 20 | void OnMinimize(MQDocument doc, BOOL flag) override; 21 | int OnReceiveUserMessage(MQDocument doc, DWORD src_product, DWORD src_id, const char *description, void *message) override; 22 | void OnDraw(MQDocument doc, MQScene scene, int width, int height) override; 23 | 24 | void OnNewDocument(MQDocument doc, const char *filename, NEW_DOCUMENT_PARAM& param) override; 25 | void OnEndDocument(MQDocument doc) override; 26 | BOOL OnUndo(MQDocument doc, int undo_state) override; 27 | BOOL OnRedo(MQDocument doc, int redo_state) override; 28 | void OnUpdateUndo(MQDocument doc, int undo_state, int undo_size) override; 29 | void OnObjectModified(MQDocument doc) override; 30 | void OnObjectSelected(MQDocument doc) override; 31 | void OnUpdateObjectList(MQDocument doc) override; 32 | void OnMaterialModified(MQDocument doc) override; 33 | void OnUpdateMaterialList(MQDocument doc) override; 34 | 35 | typedef bool (MeshSyncClientPlugin::*ExecuteCallbackProc)(MQDocument doc); 36 | void Execute(ExecuteCallbackProc proc); 37 | 38 | struct CallbackInfo { 39 | ExecuteCallbackProc proc; 40 | }; 41 | bool ExecuteCallback(MQDocument doc, void *option) override; 42 | 43 | 44 | bool& getActive(); 45 | 46 | void AutoSyncMeshes(); 47 | void AutoSyncCamera(); 48 | void Export(); 49 | void Import(); 50 | 51 | private: 52 | bool m_active = false; 53 | }; 54 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/msmqPluginBase.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "msmqPluginBase.h" 3 | 4 | msmqPluginBase::msmqPluginBase(MQBasePlugin *plugin) 5 | : m_context(plugin) 6 | { 7 | } 8 | 9 | msmqPluginBase::~msmqPluginBase() 10 | { 11 | } 12 | 13 | msmqContext& msmqPluginBase::getContext() 14 | { 15 | return m_context; 16 | } 17 | 18 | void msmqPluginBase::markSceneDirty() 19 | { 20 | m_scene_dirty = true; 21 | } 22 | 23 | bool msmqPluginBase::AutoSyncMeshesImpl(MQDocument doc) 24 | { 25 | auto& ctx = m_context; 26 | auto& settings = ctx.getSettings(); 27 | if (m_scene_dirty && (settings.auto_sync || settings.recording)) { 28 | m_scene_dirty = false; 29 | bool dirty_all = settings.recording; 30 | ctx.sendMeshes(doc, dirty_all); 31 | return true; 32 | } 33 | return false; 34 | } 35 | 36 | bool msmqPluginBase::AutoSyncCameraImpl(MQDocument doc) 37 | { 38 | auto& ctx = m_context; 39 | auto& settings = ctx.getSettings(); 40 | if (settings.sync_camera && (settings.auto_sync || settings.recording)) { 41 | ctx.sendCamera(doc, false); 42 | return true; 43 | } 44 | return false; 45 | } 46 | 47 | bool msmqPluginBase::SendImpl(MQDocument doc) 48 | { 49 | auto& ctx = m_context; 50 | auto& settings = ctx.getSettings(); 51 | if (!ctx.isServerAvailable()) { 52 | ctx.logInfo(ctx.getErrorMessage().c_str()); 53 | return false; 54 | } 55 | ctx.wait(); 56 | ctx.sendMeshes(doc, true); 57 | if (settings.sync_camera) { 58 | ctx.wait(); 59 | ctx.sendCamera(doc, true); 60 | } 61 | m_scene_dirty = false; 62 | return true; 63 | } 64 | 65 | bool msmqPluginBase::RecvImpl(MQDocument doc) 66 | { 67 | auto& ctx = m_context; 68 | if (!ctx.isServerAvailable()) { 69 | ctx.logInfo(ctx.getErrorMessage().c_str()); 70 | return false; 71 | } 72 | ctx.importMeshes(doc); 73 | return true; 74 | } 75 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/msmqPluginBase.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "msmqContext.h" 3 | 4 | class msmqPluginBase 5 | { 6 | public: 7 | msmqPluginBase(MQBasePlugin *plugin); 8 | virtual ~msmqPluginBase(); 9 | 10 | msmqContext& getContext(); 11 | void markSceneDirty(); 12 | 13 | protected: 14 | bool AutoSyncMeshesImpl(MQDocument doc); 15 | bool AutoSyncCameraImpl(MQDocument doc); 16 | bool SendImpl(MQDocument doc); 17 | bool RecvImpl(MQDocument doc); 18 | 19 | bool m_scene_dirty = true; 20 | msmqContext m_context; 21 | }; 22 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/msmqUI3/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Dialog.rc 4 | // 5 | #define IDD_MAINDLG 129 6 | #define IDC_STATIC_SERVER_PORT 1000 7 | #define IDC_EDIT_SERVER 1001 8 | #define IDC_EDIT_PORT 1002 9 | #define IDC_CHECK_AUTOSYNC 1003 10 | #define IDC_BUTTON_SYNC 1004 11 | #define IDC_BUTTON_IMPORT 1005 12 | #define IDC_EDIT_SCALEFACTOR 1006 13 | #define IDC_STATIC_SCALEFACTOR 1007 14 | #define IDC_STATIC_IMPORT_SETTINGS 1008 15 | #define IDC_CHECK_BAKE_SKIN 1009 16 | #define IDC_CHECK_BAKE_CLOTH 1010 17 | #define IDC_CHECK_CAMERA 1011 18 | #define IDC_CHECK_VCOLOR 1012 19 | #define IDC_STATIC_CAMERA_PATH 1013 20 | #define IDC_EDIT_CAMERA_PATH 1014 21 | #define IDC_CHECK_TEXTURES 1015 22 | #define IDC_TXT_VERSION 1016 23 | #define IDC_STATIC_SCENE_SETTINGS 1017 24 | #define IDC_CHECK_BOTHSIDED 1018 25 | #define IDC_TXT_LOG 1019 26 | 27 | // Next default values for new objects 28 | // 29 | #ifdef APSTUDIO_INVOKED 30 | #ifndef APSTUDIO_READONLY_SYMBOLS 31 | #define _APS_NEXT_RESOURCE_VALUE 202 32 | #define _APS_NEXT_COMMAND_VALUE 32775 33 | #define _APS_NEXT_CONTROL_VALUE 1020 34 | #define _APS_NEXT_SYMED_VALUE 101 35 | #endif 36 | #endif 37 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/msmqUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "msmqUtils.h" 3 | 4 | #include "MeshUtils/muDebugTimer.h" 5 | 6 | std::string GetName(MQObject obj) 7 | { 8 | char name[MaxNameBuffer]; 9 | obj->GetName(name, sizeof(name)); 10 | mu::SanitizeNodeName(name); 11 | return mu::ToUTF8(name); 12 | } 13 | 14 | std::string GetName(MQMaterial obj) 15 | { 16 | char name[MaxNameBuffer]; 17 | obj->GetName(name, sizeof(name)); 18 | mu::SanitizeNodeName(name); 19 | return mu::ToUTF8(name); 20 | } 21 | 22 | static std::string GetPathImpl(MQDocument doc, MQObject obj) 23 | { 24 | std::string ret; 25 | if (auto parent = doc->GetParentObject(obj)) 26 | ret += GetPathImpl(doc, parent); 27 | 28 | char name[MaxNameBuffer]; 29 | obj->GetName(name, sizeof(name)); 30 | mu::SanitizeNodeName(name); 31 | 32 | ret += "/"; 33 | ret += name; 34 | return ret; 35 | } 36 | std::string GetPath(MQDocument doc, MQObject obj) 37 | { 38 | return mu::ToUTF8(GetPathImpl(doc, obj)); 39 | } 40 | 41 | bool ExtractID(const char *name, int& id) 42 | { 43 | if (auto p = std::strstr(name, "[id:")) { 44 | if (sscanf(p, "[id:%08x]", &id) == 1) { 45 | return true; 46 | } 47 | } 48 | return false; 49 | } 50 | 51 | mu::float3 ToEular(const MQAngle& ang, bool flip_head) 52 | { 53 | if (flip_head) { 54 | return mu::float3{ 55 | ang.pitch, 56 | -ang.head + 180.0f, // I can't explain why this modification is needed... 57 | ang.bank 58 | } *mu::DegToRad; 59 | } 60 | else { 61 | return mu::float3{ 62 | ang.pitch, 63 | ang.head, 64 | ang.bank 65 | } *mu::DegToRad; 66 | } 67 | } 68 | 69 | mu::quatf ToQuaternion(const MQAngle& ang) 70 | { 71 | return rotate_zxy(ToEular(ang)); 72 | } 73 | 74 | void ExtractLocalTransform(MQObject obj, mu::float3& pos, mu::quatf& rot, mu::float3& scale) 75 | { 76 | pos = to_float3(obj->GetTranslation()); 77 | rot = ToQuaternion(obj->GetRotation()); 78 | scale = to_float3(obj->GetScaling()); 79 | } 80 | 81 | mu::float4x4 ExtractGlobalMatrix(MQDocument doc, MQObject obj) 82 | { 83 | auto mat = to_float4x4(obj->GetLocalMatrix()); 84 | if (auto parent = doc->GetParentObject(obj)) { 85 | auto pmat = ExtractGlobalMatrix(doc, parent); 86 | mat = mat * pmat; 87 | } 88 | return mat; 89 | } 90 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/msmqUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSync/MeshSync.h" 4 | #include "MeshUtils/muMath.h" 5 | 6 | #define MaxNameBuffer 128 7 | 8 | 9 | inline mu::float4 to_float4(const MQColor& v) 10 | { 11 | return { v.r, v.g, v.b, 1.0f }; 12 | } 13 | inline mu::float3 to_float3(const MQPoint& v) 14 | { 15 | return (const mu::float3&)v; 16 | } 17 | inline mu::float4x4 to_float4x4(const MQMatrix& v) 18 | { 19 | return (const mu::float4x4&)v; 20 | } 21 | inline MQColor to_MQColor(const mu::float4& v) 22 | { 23 | return MQColor(v[0], v[1], v[2]); 24 | } 25 | 26 | std::string GetName(MQObject obj); 27 | std::string GetName(MQMaterial obj); 28 | std::string GetPath(MQDocument doc, MQObject obj); 29 | bool ExtractID(const char *name, int& id); 30 | 31 | mu::float3 ToEular(const MQAngle& ang, bool flip_head = false); 32 | mu::quatf ToQuaternion(const MQAngle& ang); 33 | void ExtractLocalTransform(MQObject obj, mu::float3& pos, mu::quatf& rot, mu::float3& scale); 34 | mu::float4x4 ExtractGlobalMatrix(MQDocument doc, MQObject obj); 35 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | #pragma warning(disable:4996) 5 | #define NOMINMAX 6 | #include 7 | #include 8 | #else 9 | #include 10 | #ifdef __APPLE__ 11 | #include 12 | #else 13 | #include 14 | #endif 15 | #endif 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include "MQPlugin.h" 32 | #include "MQBasePlugin.h" 33 | #if MQPLUGIN_VERSION > 0x0400 34 | #include "MQWidget.h" 35 | #endif 36 | #if MQPLUGIN_VERSION >= 0x0464 37 | #include "MQBoneManager.h" 38 | #endif 39 | #if MQPLUGIN_VERSION >= 0x0470 40 | #include "MQMorphManager.h" 41 | #endif 42 | 43 | #define MQPluginProduct 0x483ADF11 44 | #define MQPluginID 0xB0CC9999 45 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/sdk_MQBasePlugin.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "MQPlugin.h" 3 | 4 | #include "MQBasePlugin.cpp" 5 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/sdk_MQBoneManager.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "MQPlugin.h" 3 | 4 | #if MQPLUGIN_VERSION >= 0x0464 5 | #include "MQBoneManager.cpp" 6 | #endif 7 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/sdk_MQInit.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "MQPlugin.h" 3 | 4 | #include "MQInit.cpp" 5 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/sdk_MQMorphManager.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "MQPlugin.h" 3 | 4 | #if MQPLUGIN_VERSION >= 0x0470 5 | #include "MQMorphManager.cpp" 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/sdk_MQPlugin.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "MQPlugin.h" 3 | 4 | #include "MQPlugin.cpp" 5 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/sdk_MQSetting.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "MQPlugin.h" 3 | 4 | #include "MQSetting.cpp" 5 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/sdk_MQWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "MQPlugin.h" 3 | 4 | #if MQPLUGIN_VERSION >= 0x0400 5 | #include "MQWidget.cpp" 6 | #endif 7 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMQ/sdk_StringUtil.mm: -------------------------------------------------------------------------------- 1 | #import 2 | #include "osx/StringUtil.mm" 3 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/LT/2018/MItDependencyGraph.h.patch: -------------------------------------------------------------------------------- 1 | diff --git "a/.\\Maya2018\\include\\maya\\MItDependencyGraph.h" "b/.\\MayaLT2018\\include\\maya\\MItDependencyGraph.h" 2 | index 940f698..b197a98 100644 3 | --- "a/.\\Maya2018\\include\\maya\\MItDependencyGraph.h" 4 | +++ "b/.\\MayaLT2018\\include\\maya\\MItDependencyGraph.h" 5 | @@ -145,6 +145,9 @@ public: 6 | Traversal traversal = kDepthFirst, 7 | Level level = kNodeLevel, 8 | MStatus* ReturnStatus = NULL ); 9 | +#if MAYA_LT 10 | + virtual 11 | +#endif 12 | ~MItDependencyGraph (); 13 | MStatus reset(); 14 | MStatus resetTo( MObject& rootNode, 15 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/LT/2018/MPxCommand.h.patch: -------------------------------------------------------------------------------- 1 | diff --git "a/.\\Maya2018\\include\\maya\\MPxCommand.h" "b/.\\MayaLT2018\\include\\maya\\MPxCommand.h" 2 | index ce9bb67..aa97bfc 100644 3 | --- "a/.\\Maya2018\\include\\maya\\MPxCommand.h" 4 | +++ "b/.\\MayaLT2018\\include\\maya\\MPxCommand.h" 5 | @@ -68,6 +68,9 @@ class OPENMAYA_EXPORT MPxCommand 6 | public: 7 | MPxCommand(); 8 | virtual ~MPxCommand(); 9 | +#if MAYA_LT 10 | + virtual void deleteSurplusMemory(); 11 | +#endif 12 | virtual MStatus doIt( const MArgList& args ); 13 | virtual MStatus undoIt( ); 14 | virtual MStatus redoIt( ); 15 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/LT/2018/make_import_library.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | 3 | for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" /latest /property installationPath`) do ( 4 | set VSDIR=%%i 5 | ) 6 | call "%VSDIR%\Common7\Tools\VsDevCmd.bat" 7 | cd %~dp0 8 | 9 | call :MakeImportLibrary "C:\Program Files\Autodesk\MayaLT2018\bin\Foundation.dll" Foundation 10 | call :MakeImportLibrary "C:\Program Files\Autodesk\MayaLT2018\bin\OpenMaya.dll" OpenMaya 11 | call :MakeImportLibrary "C:\Program Files\Autodesk\MayaLT2018\bin\OpenMayaAnim.dll" OpenMayaAnim 12 | pause 13 | exit /B 0 14 | 15 | :MakeImportLibrary 16 | dumpbin /exports "%~1" > %~2.txt 17 | echo LIBRARY %~3 > %~2.def 18 | echo EXPORTS >> %~2.def 19 | for /f "skip=19 tokens=4" %%l in (%~2.txt) do echo %%l >> %~2.def 20 | lib /def:%~2.def /out:%~2.lib /machine:x64 21 | undname %~2.txt > %~2.und.txt 22 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/LT/2019/MItDependencyGraph.h.patch: -------------------------------------------------------------------------------- 1 | diff --git "a/.\\Maya2019\\include\\maya\\MItDependencyGraph.h" "b/.\\MayaLT2019\\include\\maya\\MItDependencyGraph.h" 2 | index fe7eda2..2ebdc36 100644 3 | --- "a/.\\Maya2019\\include\\maya\\MItDependencyGraph.h" 4 | +++ "b/.\\MayaLT2019\\include\\maya\\MItDependencyGraph.h" 5 | @@ -146,6 +146,9 @@ public: 6 | Traversal traversal = kDepthFirst, 7 | Level level = kNodeLevel, 8 | MStatus* ReturnStatus = NULL ); 9 | +#if MAYA_LT 10 | + virtual 11 | +#endif 12 | ~MItDependencyGraph (); 13 | MStatus reset(); 14 | MStatus resetTo( MObject& rootNode, 15 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/LT/2019/MPxCommand.h.patch: -------------------------------------------------------------------------------- 1 | diff --git "a/.\\Maya2019\\include\\maya\\MPxCommand.h" "b/.\\MayaLT2019\\include\\maya\\MPxCommand.h" 2 | index b7aab2f..68a2bc9 100644 3 | --- "a/.\\Maya2019\\include\\maya\\MPxCommand.h" 4 | +++ "b/.\\MayaLT2019\\include\\maya\\MPxCommand.h" 5 | @@ -69,6 +69,9 @@ class OPENMAYA_EXPORT MPxCommand 6 | public: 7 | MPxCommand(); 8 | virtual ~MPxCommand(); 9 | +#if MAYA_LT 10 | + virtual void deleteSurplusMemory(); 11 | +#endif 12 | virtual MStatus doIt( const MArgList& args ); 13 | virtual MStatus undoIt( ); 14 | virtual MStatus redoIt( ); 15 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/LT/2019/make_import_library.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | 3 | for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" /latest /property installationPath`) do ( 4 | set VSDIR=%%i 5 | ) 6 | call "%VSDIR%\Common7\Tools\VsDevCmd.bat" 7 | cd %~dp0 8 | 9 | call :MakeImportLibrary "C:\Program Files\Autodesk\MayaLT2019\bin\Foundation.dll" Foundation 10 | call :MakeImportLibrary "C:\Program Files\Autodesk\MayaLT2019\bin\OpenMaya.dll" OpenMaya 11 | call :MakeImportLibrary "C:\Program Files\Autodesk\MayaLT2019\bin\OpenMayaAnim.dll" OpenMayaAnim 12 | pause 13 | exit /B 0 14 | 15 | :MakeImportLibrary 16 | dumpbin /exports "%~1" > %~2.txt 17 | echo LIBRARY %~3 > %~2.def 18 | echo EXPORTS >> %~2.def 19 | for /f "skip=19 tokens=4" %%l in (%~2.txt) do echo %%l >> %~2.def 20 | lib /def:%~2.def /out:%~2.lib /machine:x64 21 | undname %~2.txt > %~2.und.txt 22 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/MayaCacheSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseCacheSettings.h" 4 | 5 | struct MayaCacheSettings : public MeshSyncClient::BaseCacheSettings { 6 | bool remove_namespace = true; 7 | }; 8 | 9 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/MayaSyncSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseSyncSettings.h" 4 | 5 | struct MayaSyncSettings : public MeshSyncClient::BaseSyncSettings { 6 | float scale_factor = 0.01f; 7 | float frame_step = 1.0f; 8 | int timeout_ms = 5000; 9 | bool auto_sync = false; 10 | bool apply_tweak = false; 11 | bool sync_constraints = false; 12 | bool remove_namespace = true; 13 | bool multithreaded = false; 14 | bool fbx_compatible_transform = true; 15 | 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/MeshSyncClientMaya.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | #ifdef _WIN32 4 | #pragma comment(lib, "Foundation.lib") 5 | #pragma comment(lib, "OpenMaya.lib") 6 | #pragma comment(lib, "OpenMayaAnim.lib") 7 | #endif 8 | 9 | 10 | void msmayaInitialize(MObject& obj); 11 | void msmayaUninitialize(); 12 | 13 | #if MAYA_YEAR == 2017 14 | msAPI 15 | #endif 16 | MStatus initializePlugin(MObject obj) 17 | { 18 | msmayaInitialize(obj); 19 | return MS::kSuccess; 20 | } 21 | 22 | #if MAYA_YEAR == 2017 23 | msAPI 24 | #endif 25 | MStatus uninitializePlugin(MObject obj) 26 | { 27 | msmayaUninitialize(); 28 | return MS::kSuccess; 29 | } 30 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/etc/UnityMeshSync.mod: -------------------------------------------------------------------------------- 1 | + MAYAVERSION:2017 UnityMeshSync 20190902 ./UnityMeshSync/2017 2 | scripts: scripts 3 | 4 | + MAYAVERSION:2018 UnityMeshSync 20190902 ./UnityMeshSync/2018 5 | scripts: scripts 6 | 7 | + MAYAVERSION:2019 UnityMeshSync 20190902 ./UnityMeshSync/2019 8 | scripts: scripts 9 | 10 | + MAYAVERSION:2020 UnityMeshSync 20190902 ./UnityMeshSync/2020 11 | scripts: scripts 12 | 13 | + MAYAVERSION:2018LT UnityMeshSync 20190902 ./UnityMeshSync/2018LT 14 | scripts: scripts 15 | 16 | + MAYAVERSION:2019LT UnityMeshSync 20190902 ./UnityMeshSync/2019LT 17 | scripts: scripts 18 | 19 | + MAYAVERSION:2022 UnityMeshSync 20190902 ./UnityMeshSync/2022 20 | scripts: scripts 21 | 22 | + MAYAVERSION:2023 UnityMeshSync 20190902 ./UnityMeshSync/2023 23 | scripts: scripts 24 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/msmayaCommand.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if MAYA_LT 4 | #define LT_PAD64 char pad[64] = {0} 5 | #else 6 | #define LT_PAD64 7 | #endif 8 | 9 | 10 | class CmdServerStatus: public MPxCommand 11 | { 12 | public: 13 | static void* create(); 14 | static const char* name(); 15 | static MSyntax createSyntax(); 16 | 17 | MStatus doIt(const MArgList& args) override; 18 | LT_PAD64; 19 | }; 20 | 21 | class CmdSettings : public MPxCommand 22 | { 23 | public: 24 | static void* create(); 25 | static const char* name(); 26 | static MSyntax createSyntax(); 27 | 28 | MStatus doIt(const MArgList& args) override; 29 | LT_PAD64; 30 | }; 31 | 32 | class CmdSend : public MPxCommand 33 | { 34 | public: 35 | static void* create(); 36 | static const char* name(); 37 | static MSyntax createSyntax(); 38 | 39 | MStatus doIt(const MArgList&) override; 40 | LT_PAD64; 41 | }; 42 | 43 | class CmdImport : public MPxCommand 44 | { 45 | public: 46 | static void* create(); 47 | static const char* name(); 48 | static MSyntax createSyntax(); 49 | 50 | MStatus doIt(const MArgList&) override; 51 | LT_PAD64; 52 | }; 53 | 54 | 55 | class CmdExportCache : public MPxCommand 56 | { 57 | public: 58 | static void* create(); 59 | static const char* name(); 60 | static MSyntax createSyntax(); 61 | 62 | MStatus doIt(const MArgList&) override; 63 | LT_PAD64; 64 | }; 65 | 66 | #define EachCommand(Body)\ 67 | Body(CmdServerStatus)\ 68 | Body(CmdSettings)\ 69 | Body(CmdSend)\ 70 | Body(CmdImport)\ 71 | Body(CmdExportCache) 72 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMaya/scripts/userSetup.mel: -------------------------------------------------------------------------------- 1 | UnityMeshSync_Shelf; -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Requires the following environment var to be setup previously 2 | # - MODO_SDK 3 | 4 | string(REGEX MATCH "([0-9.]+)$" modo_version "${CMAKE_CURRENT_SOURCE_DIR}") 5 | set(meshsync_client_modo "MeshSyncClientModo${modo_version}") 6 | 7 | include(Modo) 8 | setup_modo(${modo_version}) 9 | 10 | # Get sources 11 | file(TO_CMAKE_PATH $ENV{MODO_SDK} modo_sdk_path) 12 | file(GLOB sources 13 | *.cpp 14 | *.h 15 | "${modo_sdk_path}/common/*.cpp" 16 | ) 17 | list(FILTER sources EXCLUDE REGEX "initialize.cpp") 18 | list(FILTER sources EXCLUDE REGEX "clean.cpp") 19 | 20 | #DTolerance linker error 21 | list(FILTER sources EXCLUDE REGEX "lxu_geometry_triangulation.cpp") 22 | 23 | 24 | add_library(${meshsync_client_modo} SHARED ${sources}) 25 | add_dependencies(${meshsync_client_modo} 26 | MeshSyncClient 27 | ) 28 | target_include_directories(${meshsync_client_modo} 29 | PRIVATE 30 | "${CMAKE_SOURCE_DIR}" 31 | "$ENV{MODO_SDK}/include" 32 | "${MODO_${modo_version}_QT_INCLUDE_DIRS}" 33 | ) 34 | 35 | # pch doesn't work currently because we are compiling MODO_SDK at the same time, so the dependencies get mixed up. 36 | # target_precompile_headers(${meshsync_client_modo} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/pch.h") 37 | 38 | target_link_libraries(${meshsync_client_modo} MeshSyncClient MeshSync MeshUtils ${Poco_LIBRARIES} ${MODO_${modo_version}_QT_LIBRARIES}) 39 | 40 | 41 | if(LINUX) 42 | target_link_libraries(${meshsync_client_modo} "-Wl,--no-undefined") 43 | endif() 44 | 45 | set_target_properties(${meshsync_client_modo} PROPERTIES PREFIX "") 46 | set_target_properties(${meshsync_client_modo} PROPERTIES SUFFIX ".lx") 47 | set_target_properties(${meshsync_client_modo} PROPERTIES OUTPUT_NAME "MeshSyncClientModo") 48 | 49 | # Install/copying after build 50 | set(dist_dir "${DIST_ROOT}/UnityMeshSync_${UNITY_PACKAGE_VERSION}_Modo_${PLATFORM}/Modo${modo_version}") 51 | install(TARGETS ${meshsync_client_modo} DESTINATION ${dist_dir}) 52 | 53 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/ModoCacheSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseCacheSettings.h" 4 | 5 | struct ModoCacheSettings : public MeshSyncClient::BaseCacheSettings { 6 | 7 | }; 8 | 9 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/ModoSyncSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MeshSyncClient/BaseSyncSettings.h" 4 | 5 | struct ModoSyncSettings : public MeshSyncClient::BaseSyncSettings { 6 | float scale_factor = 1.0f; 7 | float frame_step = 1.0f; 8 | int timeout_ms = 5000; 9 | bool auto_sync = false; 10 | 11 | bool sync_mesh_instances = true; 12 | bool sync_replicators = true; 13 | 14 | }; 15 | 16 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/msmodoCommand.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define msmodoViewName "UnityMeshSync" 4 | #define msmodoCmdSettingsName "unity.meshsync.settings" 5 | #define msmodoCmdExportName "unity.meshsync.export" 6 | #define msmodoCmdImportName "unity.meshsync.import" 7 | #define msmodoCmdCacheName "unity.meshsync.cache" 8 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/msmodoCompat.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // for Modo 10 4 | 5 | class CLxLoc_MeshFilter1 : public CLxLocalize 6 | { 7 | public: 8 | void _init() { m_loc = 0; } 9 | CLxLoc_MeshFilter1() { _init(); } 10 | CLxLoc_MeshFilter1(ILxUnknownID obj) { _init(); set(obj); } 11 | CLxLoc_MeshFilter1(const CLxLoc_MeshFilter1 &other) { _init(); set(other.m_loc); } 12 | const LXtGUID * guid() const { return &lx::guid_MeshFilter1; } 13 | unsigned 14 | Type(void) 15 | { 16 | return m_loc[0]->Type(m_loc); 17 | } 18 | 19 | LxResult 20 | Generate(void **ppvObj) 21 | { 22 | return m_loc[0]->Generate(m_loc, ppvObj); 23 | } 24 | 25 | CLxResult 26 | Generate(CLxLocalizedObject &o_dest) 27 | { 28 | LXtObjectID o_obj; 29 | LxResult r_c = m_loc[0]->Generate(m_loc, &o_obj); 30 | return lx::TakeResult(o_dest, r_c, o_obj); 31 | } 32 | }; 33 | 34 | class CLxUser_MeshFilter1 : public CLxLoc_MeshFilter1 35 | { 36 | public: 37 | CLxUser_MeshFilter1() {} 38 | CLxUser_MeshFilter1(ILxUnknownID obj) : CLxLoc_MeshFilter1(obj) {} 39 | 40 | bool 41 | GetMesh( 42 | CLxLoc_Mesh &mesh) 43 | { 44 | return Generate(mesh); 45 | } 46 | }; 47 | 48 | 49 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/msmodoUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "msmodoUtils.h" 3 | 4 | #include "MeshSync/msClient.h" //SanitizeNodeName 5 | 6 | CLxUser_Item GetParent(CLxUser_Item& obj) 7 | { 8 | CLxUser_Item parent; 9 | if (valid(obj) && LXx_OK(obj.Parent(parent))) 10 | return parent; 11 | return nullptr; 12 | } 13 | 14 | std::string GetName(CLxUser_Item& obj) 15 | { 16 | if (!valid(obj)) 17 | return std::string(); 18 | 19 | std::string ret; 20 | { 21 | const char *name = nullptr; 22 | obj.UniqueName(&name); 23 | if (name) { 24 | ret = name; 25 | // modo allows name to contain '/' 26 | mu::SanitizeNodeName(ret); 27 | } 28 | } 29 | return ret; 30 | } 31 | 32 | std::string GetPath(CLxUser_Item& obj) 33 | { 34 | if (!valid(obj)) 35 | return std::string(); 36 | std::string ret; 37 | if (auto parent = GetParent(obj)) 38 | ret += GetPath(parent); 39 | ret += '/'; 40 | ret += GetName(obj); 41 | return ret; 42 | } 43 | 44 | 45 | class GetMapNames_Visitor : public CLxImpl_AbstractVisitor 46 | { 47 | public: 48 | GetMapNames_Visitor(CLxUser_MeshMap *mmap) : m_mmap(mmap) {} 49 | 50 | LxResult Evaluate() override 51 | { 52 | const char *name; 53 | if (LXx_OK(m_mmap->Name(&name))) 54 | m_names.push_back(name); 55 | return LXe_OK; 56 | } 57 | 58 | CLxUser_MeshMap *m_mmap; 59 | std::vector m_names; 60 | }; 61 | 62 | std::vector GetMapNames(CLxUser_MeshMap& mmap, const LXtID4& id4) 63 | { 64 | GetMapNames_Visitor name_visitor(&mmap); 65 | mmap.FilterByType(id4); 66 | mmap.Enum(&name_visitor); 67 | return name_visitor.m_names; 68 | } 69 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/msmodoUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MeshUtils/muMath.h" 3 | 4 | CLxUser_Item GetParent(CLxUser_Item& obj); 5 | std::string GetName(CLxUser_Item& obj); 6 | std::string GetPath(CLxUser_Item& obj); 7 | std::vector GetMapNames(CLxUser_MeshMap& mmap, const LXtID4& id4); 8 | 9 | inline bool valid(CLxUser_Item& obj) 10 | { 11 | // Type() seems return 0 if the object is dead 12 | return obj.test() && obj.Type() != 0; 13 | } 14 | 15 | inline bool match(const char *a, const char *b) 16 | { 17 | return std::strcmp(a, b) == 0; 18 | } 19 | 20 | inline mu::float2 to_float2(const LXtFVector2& v) 21 | { 22 | return (mu::float2&)(v[0]); 23 | } 24 | inline mu::float3 to_float3(const LXtVector& v) 25 | { 26 | return { (float)v[0], (float)v[1], (float)v[2] }; 27 | } 28 | inline mu::float3 to_float3(const LXtFVector& v) 29 | { 30 | return (mu::float3&)(v[0]); 31 | } 32 | inline mu::float4 to_float4(const LXtFVector4& v) 33 | { 34 | return (mu::float4&)(v[0]); 35 | } 36 | inline mu::float3x3 to_float4(const LXtFMatrix& v) 37 | { 38 | return (mu::float3x3&)(v[0][0]); 39 | } 40 | inline mu::float4x4 to_float4x4(const LXtMatrix& v) 41 | { 42 | return mu::float4x4{ 43 | (float)v[0][0], (float)v[1][0], (float)v[2][0], 0.0f, 44 | (float)v[0][1], (float)v[1][1], (float)v[2][1], 0.0f, 45 | (float)v[0][2], (float)v[1][2], (float)v[2][2], 0.0f, 46 | 0.0f, 0.0f, 0.0f, 1.0f, 47 | }; 48 | } 49 | inline mu::float4x4 to_float4x4(const LXtMatrix4& v) 50 | { 51 | return mu::float4x4{ 52 | (float)v[0][0], (float)v[0][1], (float)v[0][2], (float)v[0][3], 53 | (float)v[1][0], (float)v[1][1], (float)v[1][2], (float)v[1][3], 54 | (float)v[2][0], (float)v[2][1], (float)v[2][2], (float)v[2][3], 55 | (float)v[3][0], (float)v[3][1], (float)v[3][2], (float)v[3][3], 56 | }; 57 | } 58 | 59 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #ifdef _WIN32 21 | #pragma warning(push, 0) 22 | #endif 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #ifdef _WIN32 46 | #pragma warning(pop) 47 | #define NOMAXMIN 48 | #define NOMINMAX 49 | #include 50 | #endif 51 | 52 | #include "MeshSync/MeshSync.h" 53 | #ifdef GetObject 54 | #undef GetObject 55 | #endif 56 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/tool/make_import_library.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | 3 | for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" /latest /property installationPath`) do ( 4 | set VSDIR=%%i 5 | ) 6 | call "%VSDIR%\Common7\Tools\VsDevCmd.bat" 7 | cd %~dp0 8 | 9 | call :MakeImportLibrary "C:\Program Files\Foundry\Modo\13.0v1\QtCore4.dll" QtCore4 10 | call :MakeImportLibrary "C:\Program Files\Foundry\Modo\13.0v1\QtGui4.dll" QtGui4 11 | pause 12 | exit /B 0 13 | 14 | :MakeImportLibrary 15 | dumpbin /exports "%~1" > %~2.txt 16 | echo LIBRARY %~3 > %~2.def 17 | echo EXPORTS >> %~2.def 18 | for /f "skip=19 tokens=4" %%l in (%~2.txt) do echo %%l >> %~2.def 19 | lib /def:%~2.def /out:%~2.lib /machine:x64 20 | undname %~2.txt > %~2.und.txt 21 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientModo/tool/moc.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | ..\External\Qt\4.8.5\bin\moc.exe msmodoWidget.cpp > msmodoWidget_moc.h -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMotionBuilder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | string(REGEX MATCH "([0-9.]+)$" MOTIONBUILDER_VERSION "${CMAKE_CURRENT_SOURCE_DIR}") 2 | set(MESHSYNC_CLIENT_MOTIONBUILDER "MeshSyncClientMotionBuilder${MOTIONBUILDER_VERSION}") 3 | 4 | include(MotionBuilder) 5 | setup_motionbuilder(${MOTIONBUILDER_VERSION}) 6 | add_definitions(-DMOTIONBUILDER_VERSION=${MOTIONBUILDER_VERSION}) 7 | 8 | file(GLOB sources *.cpp *.h) 9 | add_library(${MESHSYNC_CLIENT_MOTIONBUILDER} SHARED ${sources}) 10 | add_dependencies(${MESHSYNC_CLIENT_MOTIONBUILDER} MeshSyncClient) 11 | target_precompile_headers(${MESHSYNC_CLIENT_MOTIONBUILDER} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/pch.h") 12 | target_include_directories(${MESHSYNC_CLIENT_MOTIONBUILDER} 13 | PRIVATE 14 | "${MOTIONBUILDER${MOTIONBUILDER_VERSION}_INCLUDE_DIR}" 15 | ) 16 | 17 | # message(abc: ${MOTIONBUILDER${MOTIONBUILDER_VERSION}_LIBRARIES}) 18 | target_link_libraries(${MESHSYNC_CLIENT_MOTIONBUILDER} 19 | PRIVATE 20 | MeshSyncClient 21 | ${MOTIONBUILDER${MOTIONBUILDER_VERSION}_LIBRARIES} 22 | ) 23 | 24 | 25 | if(LINUX) 26 | target_link_libraries(${MESHSYNC_CLIENT_MOTIONBUILDER} PRIVATE "-Wl,--no-undefined") 27 | elseif(MAC) 28 | set_target_properties(${MESHSYNC_CLIENT_MOTIONBUILDER} PROPERTIES COMPILE_FLAGS -DOSMac_) 29 | set_target_properties(${MESHSYNC_CLIENT_MOTIONBUILDER} PROPERTIES SUFFIX ".bundle") 30 | elseif(WIN32) 31 | set_target_properties(${MESHSYNC_CLIENT_MOTIONBUILDER} PROPERTIES SUFFIX ".dll") 32 | endif() 33 | set_target_properties(${MESHSYNC_CLIENT_MOTIONBUILDER} PROPERTIES PREFIX "") 34 | set_target_properties(${MESHSYNC_CLIENT_MOTIONBUILDER} PROPERTIES OUTPUT_NAME "MeshSyncClientMotionBuilder") 35 | 36 | set(DEST_DIR "${DIST_ROOT}/UnityMeshSync_${UNITY_PACKAGE_VERSION}_MotionBuilder_${PLATFORM}") 37 | set(CONTENT_DIR "${DEST_DIR}/MotionBuilder${MOTIONBUILDER_VERSION}") 38 | 39 | install(TARGETS ${MESHSYNC_CLIENT_MOTIONBUILDER} DESTINATION "${CONTENT_DIR}/") 40 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMotionBuilder/MeshSyncClientMotionBuilder.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "msmobuDevice.h" 3 | #include "msmobuLayout.h" 4 | 5 | #ifdef _WIN32 6 | #pragma comment(lib, "fbsdk.lib") 7 | #endif 8 | 9 | 10 | FBLibraryDeclare(msmobuDevice) 11 | { 12 | FBLibraryRegister(msmobuDevice); 13 | FBLibraryRegister(msmobuLayout); 14 | } 15 | FBLibraryDeclareEnd; 16 | 17 | bool FBLibrary::LibInit() { return true; } 18 | bool FBLibrary::LibOpen() { return true; } 19 | bool FBLibrary::LibReady() { return true; } 20 | bool FBLibrary::LibClose() { return true; } 21 | bool FBLibrary::LibRelease() { return true; } 22 | 23 | 24 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMotionBuilder/msmobuLayout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | class msmobuLayout : public FBDeviceLayout 5 | { 6 | FBDeviceLayoutDeclare(msmobuLayout, FBDeviceLayout); 7 | public: 8 | bool FBCreate() override; 9 | void FBDestroy() override; 10 | 11 | private: 12 | void onServerSettingsChange(HIRegister pCaller, HKEventBase pEvent); 13 | void onSceneSettingsChange(HIRegister pCaller, HKEventBase pEvent); 14 | void onAnimationSettingsChange(HIRegister pCaller, HKEventBase pEvent); 15 | void onAutoSync(HIRegister pCaller, HKEventBase pEvent); 16 | void onManualSync(HIRegister pCaller, HKEventBase pEvent); 17 | void onSyncAnimation(HIRegister pCaller, HKEventBase pEvent); 18 | 19 | private: 20 | msmobuDevice* m_device; 21 | 22 | FBLabel m_lb_server; 23 | FBLabel m_lb_address; 24 | FBEdit m_ed_address; 25 | FBLabel m_lb_port; 26 | FBEditNumber m_ed_port; 27 | 28 | FBLabel m_lb_scene; 29 | FBLabel m_lb_scale; 30 | FBEditNumber m_ed_scale; 31 | FBButton m_bu_auto_sync; 32 | FBButton m_bu_manual_sync; 33 | FBButton m_bu_sync_cameras; 34 | FBButton m_bu_sync_lights; 35 | FBButton m_bu_sync_meshes; 36 | FBButton m_bu_make_double_sided; 37 | FBButton m_bu_bake_deformers; 38 | 39 | FBLabel m_lb_animation; 40 | FBLabel m_lb_frame_step; 41 | FBEditNumber m_ed_frame_step; 42 | FBButton m_bu_sync_animations; 43 | 44 | FBLabel m_lb_version; 45 | }; 46 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMotionBuilder/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugins~/Src/MeshSyncClientMotionBuilder/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #pragma warning(push) 20 | #pragma warning(disable:4263 4264) 21 | #include 22 | #pragma warning(pop) 23 | 24 | #ifdef _WIN32 25 | #define NOMINMAX 26 | #include 27 | #endif -------------------------------------------------------------------------------- /Plugins~/Src/ReleaseChecklist.txt: -------------------------------------------------------------------------------- 1 | msConfig.h (Server) 2 | - update msReleaseDate and msReleaseDateStr (msConfig.h) 3 | - increment msProtocolVersion if format changed 4 | 5 | UnityMeshSync.mod (Maya) 6 | - update version number 7 | 8 | unity_mesh_sync.py (Blender) 9 | - update version number 10 | -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7034cbc8624507458ab34f9aff327f8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/bake_test_1.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/TestAssets/Test scenes/bake_test_1.blend -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/material test scene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5f5288d2fe48354d8f8b1bd808569fb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/material test scene/material_sync_test_scene_1.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/TestAssets/Test scenes/material test scene/material_sync_test_scene_1.blend -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/material test scene/test_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/TestAssets/Test scenes/material test scene/test_1.png -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/material test scene/test_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/TestAssets/Test scenes/material test scene/test_2.png -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/material test scene/test_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/TestAssets/Test scenes/material test scene/test_3.png -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/material test scene/test_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/TestAssets/Test scenes/material test scene/test_4.png -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/material test scene/test_height.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/TestAssets/Test scenes/material test scene/test_height.exr -------------------------------------------------------------------------------- /Plugins~/TestAssets/Test scenes/material test scene/test_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/MeshSyncDCCPlugins/65e76cd51f9d7567a2d727a398bd558a7be1f483/Plugins~/TestAssets/Test scenes/material test scene/test_normal.png -------------------------------------------------------------------------------- /Readme.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2050290eb19dc4d47840909e4335593e 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Readme_JP.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3a5c1422f10540f3b73c45f2ca321ec 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scripts~/sync_package_info.sh: -------------------------------------------------------------------------------- 1 | packageName="com.unity.meshsync-dcc-plugins" 2 | 3 | cp package.json "MeshSyncDCCPlugins~/Packages/${packageName}" 4 | cp CHANGELOG.md "MeshSyncDCCPlugins~/Packages/${packageName}" 5 | 6 | -------------------------------------------------------------------------------- /Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d385cb85163924011a790760a7f990a6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/.tests.json: -------------------------------------------------------------------------------- 1 | { 2 | "createSeparatePackage": false 3 | } 4 | -------------------------------------------------------------------------------- /Tests/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10426d7680fa1480b8e0ba6bb05d67ad 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor/PluginsTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System.IO; 3 | 4 | namespace Unity.MeshSyncDCCPlugin { 5 | 6 | class PluginsTest { 7 | 8 | [Test] 9 | public void DCCPluginsExist() { 10 | 11 | string path = Path.Combine("Packages", "com.unity.meshsync.dcc-plugins","Editor","Plugins"); 12 | path = Path.GetFullPath(path); 13 | int numFiles = Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly).Length; 14 | Assert.Greater(numFiles,0,"There are no DCC plugins"); 15 | } 16 | 17 | } 18 | 19 | } //end namespace 20 | -------------------------------------------------------------------------------- /Tests/Editor/PluginsTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12616b21132d44fca968b1811e49cdaa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Editor/Unity.MeshSyncDCCPlugin.EditorTests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.MeshSyncDCCPlugin.EditorTests", 3 | "references": [ 4 | "GUID:27619889b8ba8c24980f49ee34dbb44a", 5 | "GUID:0acc523941302664db1f4e527237feb3" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": true, 13 | "precompiledReferences": [ 14 | "nunit.framework.dll" 15 | ], 16 | "autoReferenced": false, 17 | "defineConstraints": [ 18 | "UNITY_INCLUDE_TESTS" 19 | ], 20 | "versionDefines": [], 21 | "noEngineReferences": false 22 | } -------------------------------------------------------------------------------- /Tests/Editor/Unity.MeshSyncDCCPlugin.EditorTests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bea33a6878bcc43d8a7943fdf8e1fa76 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Third Party Notices.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ddcac2cbcaf20465893a030391a785b2 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.unity.meshsync.dcc-plugins", 3 | "displayName":"MeshSync DCC Plugins", 4 | "version": "0.17.1-preview", 5 | "unity": "2020.3", 6 | "description": "This package contains plugin binaries of DCC tools for using MeshSync, which is another package for synchronizing meshes/models editing in DCC tools into Unity in real time.", 7 | "dependencies": { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97bf47958231740708c869dd1adae2a1 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------