Skip to content

Commit c7f3b13

Browse files
authored
Merge pull request #102 from Unity-Technologies/UNI-22958-sprint22-release
UNI-22958 sprint 22 release
2 parents 3a11e8c + 9d1e3e9 commit c7f3b13

File tree

5 files changed

+56
-9
lines changed

5 files changed

+56
-9
lines changed

Assets/FbxExporters/Editor/ReviewLastSavedModel.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,24 @@ private static Object LoadModel (string fbxFileName)
112112
return modelGO as Object;
113113
}
114114

115+
private static Bounds GetRendererBounds(GameObject modelGO)
116+
{
117+
var renderers = modelGO.GetComponentsInChildren<Renderer> ();
118+
if (renderers.Length > 0) {
119+
var bounds = renderers [0].bounds;
120+
for (int i = 1; i < renderers.Length; i++) {
121+
bounds.Encapsulate (renderers [i].bounds);
122+
}
123+
return bounds;
124+
}
125+
return new Bounds ();
126+
}
127+
115128
private static void FrameCameraOnModel(GameObject modelGO)
116129
{
117130
// Set so camera frames model
118131
// Note: this code assumes the model is at 0,0,0
119-
Vector3 boundsSize = modelGO.GetComponent<Renderer>().bounds.size;
132+
Vector3 boundsSize = GetRendererBounds(modelGO).size;
120133
float distance = Mathf.Max(boundsSize.x, boundsSize.y, boundsSize.z);
121134
distance /= (2.0f * Mathf.Tan(0.5f * Camera.main.fieldOfView * Mathf.Deg2Rad));
122135
Camera.main.transform.position = new Vector3(Camera.main.transform.position.x, Camera.main.transform.position.y, -distance * 2.0f);

Assets/FbxExporters/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (c) 2017 Unity Technologies. All rights reserved.
44

55
See LICENSE.txt file for full license information.
66

7-
**Version**: 0.0.10a
7+
**Version**: 0.0.11a
88

99
Requirements
1010
------------

Assets/Integrations/Autodesk/maya2017/scripts/unityOneClick/commands.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,19 @@ def doIt(self, args):
222222
return
223223

224224
# make sure the GamePipeline and fbxmaya plugins are loaded
225-
if self.loadDependencies():
226-
# save fbx to Assets/_safe_to_delete/
227-
savePath = unityTempSavePath
228-
maya.cmds.sysFile(savePath, makeDir=True)
229-
savePath = savePath + "/TurnTableModel.fbx"
230-
maya.mel.eval(r'file -force -options "" -typ "FBX export" -pr -es "{0}"'.format(savePath));
225+
if not self.loadDependencies():
226+
return
227+
228+
# select the export set for export, if it exists,
229+
# otherwise take what is currently selected
230+
if self.setExists(self._exportSet):
231+
maya.cmds.select(self._exportSet, r=True, ne=True)
232+
233+
# save fbx to Assets/_safe_to_delete/
234+
savePath = unityTempSavePath
235+
maya.cmds.sysFile(savePath, makeDir=True)
236+
savePath = savePath + "/TurnTableModel.fbx"
237+
maya.mel.eval(r'file -force -options "" -typ "FBX export" -pr -es "{0}"'.format(savePath));
231238

232239
if maya.cmds.about(macOS=True):
233240
# Use 'open -a' to bring app to front if it has already been started.

Assets/Integrations/Autodesk/maya2017/scripts/unityOneClick/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def versionName():
3232
Return version string for the unityOneClick plugin
3333
@ingroup UnityOneClickPluginVersion
3434
"""
35-
return '0.0.10a'
35+
return '0.0.11a'
3636

3737
def pluginName():
3838
"""

RELEASE_NOTES.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
RELEASE NOTES
22

3+
**Version**: 0.0.11a
4+
5+
NEW FEATURES
6+
7+
* Maya Integration: Publish automatically writes to the same file you imported from.
8+
9+
On Unity->Import, store the path and filename of the imported FBX as attributes on the export set.
10+
On Unity->Publish, if path and filename attributes are set, publish directly to this location without prompting user.
11+
12+
* Maya Integration: Unity->Import creates export set containing imported objects
13+
14+
If an export set already exists, replace its contents with newly imported objects
15+
16+
* Maya Integration: Unity->Publish exports what is in the export set
17+
18+
Export contents of export set, or if there is no export set, then the current selection will be exported.
19+
20+
* Maya Integration: Fbx export options are set from a file in the Unity project
21+
22+
Export settings stored in Integrations/Autodesk/maya2017/scripts/unityFbxExportSettings.mel are loaded into Maya before
23+
exporting either with Unity->Review or Unity->Publish.
24+
25+
FIXES
26+
27+
* Export Settings: fix export path doesn't refresh if selectable text box selected
28+
* Convert to Prefab: fix model added to wrong scene if multiple scenes open
29+
330
**Version**: 0.0.10a
431

532
NEW FEATURES

0 commit comments

Comments
 (0)