From a95a65993d9f9ec7e6c330e6ce1ac9134a39b89b Mon Sep 17 00:00:00 2001 From: Hamed Sabri Date: Sun, 25 Oct 2020 12:15:38 -0400 Subject: [PATCH 1/7] MAYA-105277 : implement UsdUndoReorderCommand --- lib/mayaUsd/ufe/CMakeLists.txt | 2 + lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp | 30 ++++++-- lib/mayaUsd/ufe/ProxyShapeHierarchy.h | 11 ++- lib/mayaUsd/ufe/UsdHierarchy.cpp | 30 ++++++-- lib/mayaUsd/ufe/UsdHierarchy.h | 12 ++-- lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp | 85 +++++++++++++++++++++++ lib/mayaUsd/ufe/UsdUndoReorderCommand.h | 60 ++++++++++++++++ 7 files changed, 204 insertions(+), 26 deletions(-) create mode 100644 lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp create mode 100644 lib/mayaUsd/ufe/UsdUndoReorderCommand.h diff --git a/lib/mayaUsd/ufe/CMakeLists.txt b/lib/mayaUsd/ufe/CMakeLists.txt index 8d113b8699..45e8bba2ea 100644 --- a/lib/mayaUsd/ufe/CMakeLists.txt +++ b/lib/mayaUsd/ufe/CMakeLists.txt @@ -43,6 +43,7 @@ if(CMAKE_UFE_V2_FEATURES_AVAILABLE) UsdUndoAddNewPrimCommand.cpp UsdUndoCreateGroupCommand.cpp UsdUndoInsertChildCommand.cpp + UsdUndoReorderCommand.cpp ) if(UFE_PREVIEW_VERSION_NUM GREATER_EQUAL 2022) target_sources(${PROJECT_NAME} @@ -93,6 +94,7 @@ if(CMAKE_UFE_V2_FEATURES_AVAILABLE) UsdUndoAddNewPrimCommand.h UsdUndoCreateGroupCommand.h UsdUndoInsertChildCommand.h + UsdUndoReorderCommand.h ) endif() diff --git a/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp b/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp index c1fe36710e..c226f7a56a 100644 --- a/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp +++ b/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp @@ -31,6 +31,7 @@ #ifdef UFE_V2_FEATURES_AVAILABLE #include #include +#include #endif namespace { @@ -214,16 +215,16 @@ Ufe::InsertChildCommand::Ptr ProxyShapeHierarchy::insertChildCmd( } Ufe::SceneItem::Ptr ProxyShapeHierarchy::insertChild( - const Ufe::SceneItem::Ptr& , - const Ufe::SceneItem::Ptr& + const Ufe::SceneItem::Ptr& child, + const Ufe::SceneItem::Ptr& pos ) { - // Should be possible to implement trivially when support for returning the - // result of the parent command (MAYA-105278) is implemented. For now, - // Ufe::Hierarchy::insertChildCmd() returns a base class - // Ufe::UndoableCommand::Ptr object, from which we can't retrieve the added - // child. PPT, 13-Jul-2020. + #ifdef UFE_V2_FEATURES_AVAILABLE + auto insertChildCommand = insertChildCmd(child, pos); + return insertChildCommand->insertedChild(); + #else return nullptr; + #endif } Ufe::SceneItem::Ptr ProxyShapeHierarchy::createGroup(const Ufe::Selection& selection, const Ufe::PathComponent& name) const @@ -247,6 +248,21 @@ Ufe::UndoableCommand::Ptr ProxyShapeHierarchy::createGroupCmd(const Ufe::Selecti return UsdUndoCreateGroupCommand::create(usdItem, selection, name.string()); } +Ufe::UndoableCommand::Ptr ProxyShapeHierarchy::reorderCmd(const Ufe::SceneItemList& orderedList) const +{ + std::vector orderedTokens; + + for (const auto& item : orderedList) { + orderedTokens.emplace_back(downcast(item)->prim().GetPath().GetNameToken()); + } + + // TODO HS Oct 23, 2020, grab any child and pass it to UsdUndoReorderCommand + // in order to get the parent out of it. + const auto& childPrim = downcast((*orderedList.begin()))->prim(); + + return UsdUndoReorderCommand::create(childPrim, orderedTokens); +} + Ufe::SceneItem::Ptr ProxyShapeHierarchy::defaultParent() const { // Maya shape nodes cannot be unparented. diff --git a/lib/mayaUsd/ufe/ProxyShapeHierarchy.h b/lib/mayaUsd/ufe/ProxyShapeHierarchy.h index b268b4d0b6..cf28b4d7c6 100644 --- a/lib/mayaUsd/ufe/ProxyShapeHierarchy.h +++ b/lib/mayaUsd/ufe/ProxyShapeHierarchy.h @@ -69,16 +69,15 @@ class MAYAUSD_CORE_PUBLIC ProxyShapeHierarchy : public Ufe::Hierarchy #endif #ifdef UFE_V2_FEATURES_AVAILABLE - Ufe::InsertChildCommand::Ptr insertChildCmd(const Ufe::SceneItem::Ptr& child, const Ufe::SceneItem::Ptr& pos) override; - Ufe::SceneItem::Ptr createGroup(const Ufe::Selection& selection, const Ufe::PathComponent& name) const override; Ufe::UndoableCommand::Ptr createGroupCmd(const Ufe::Selection& selection, const Ufe::PathComponent& name) const override; Ufe::SceneItem::Ptr defaultParent() const override; - Ufe::SceneItem::Ptr insertChild( - const Ufe::SceneItem::Ptr& child, - const Ufe::SceneItem::Ptr& pos - ) override; + + Ufe::SceneItem::Ptr insertChild(const Ufe::SceneItem::Ptr& child,const Ufe::SceneItem::Ptr& pos) override; + Ufe::InsertChildCommand::Ptr insertChildCmd(const Ufe::SceneItem::Ptr& child, const Ufe::SceneItem::Ptr& pos) override; + + Ufe::UndoableCommand::Ptr reorderCmd(const Ufe::SceneItemList& orderedList) const override; #endif private: diff --git a/lib/mayaUsd/ufe/UsdHierarchy.cpp b/lib/mayaUsd/ufe/UsdHierarchy.cpp index d3fe2f3246..07ca24b9b2 100644 --- a/lib/mayaUsd/ufe/UsdHierarchy.cpp +++ b/lib/mayaUsd/ufe/UsdHierarchy.cpp @@ -39,6 +39,7 @@ #ifdef UFE_V2_FEATURES_AVAILABLE #include #include +#include #endif namespace { @@ -201,16 +202,16 @@ Ufe::InsertChildCommand::Ptr UsdHierarchy::insertChildCmd( } Ufe::SceneItem::Ptr UsdHierarchy::insertChild( - const Ufe::SceneItem::Ptr& , - const Ufe::SceneItem::Ptr& + const Ufe::SceneItem::Ptr& child, + const Ufe::SceneItem::Ptr& pos ) { - // Should be possible to implement trivially when support for returning the - // result of the parent command (MAYA-105278) is implemented. For now, - // Ufe::Hierarchy::insertChildCmd() returns a base class - // Ufe::UndoableCommand::Ptr object, from which we can't retrieve the added - // child. PPT, 13-Jul-2020. + #ifdef UFE_V2_FEATURES_AVAILABLE + auto insertChildCommand = insertChildCmd(child, pos); + return insertChildCommand->insertedChild(); + #else return nullptr; + #endif } // Create a transform. @@ -244,6 +245,21 @@ Ufe::SceneItem::Ptr UsdHierarchy::defaultParent() const return createItem(proxyShapePath); } +Ufe::UndoableCommand::Ptr UsdHierarchy::reorderCmd(const Ufe::SceneItemList& orderedList) const +{ + std::vector orderedTokens; + + for (const auto& item : orderedList) { + orderedTokens.emplace_back(downcast(item)->prim().GetPath().GetNameToken()); + } + + // TODO HS Oct 23, 2020, grab any child and pass it to UsdUndoReorderCommand + // in order to get the parent out of it. + const auto& childPrim = downcast((*orderedList.begin()))->prim(); + + return UsdUndoReorderCommand::create(childPrim, orderedTokens); +} + #endif // UFE_V2_FEATURES_AVAILABLE } // namespace ufe diff --git a/lib/mayaUsd/ufe/UsdHierarchy.h b/lib/mayaUsd/ufe/UsdHierarchy.h index 79269357ab..2f85aabef1 100644 --- a/lib/mayaUsd/ufe/UsdHierarchy.h +++ b/lib/mayaUsd/ufe/UsdHierarchy.h @@ -66,15 +66,15 @@ class MAYAUSD_CORE_PUBLIC UsdHierarchy : public Ufe::Hierarchy #endif #ifdef UFE_V2_FEATURES_AVAILABLE - Ufe::InsertChildCommand::Ptr insertChildCmd(const Ufe::SceneItem::Ptr& child, const Ufe::SceneItem::Ptr& pos) override; - Ufe::SceneItem::Ptr createGroup(const Ufe::Selection& selection, const Ufe::PathComponent& name) const override; Ufe::UndoableCommand::Ptr createGroupCmd(const Ufe::Selection& selection, const Ufe::PathComponent& name) const override; + Ufe::SceneItem::Ptr defaultParent() const override; - Ufe::SceneItem::Ptr insertChild( - const Ufe::SceneItem::Ptr& child, - const Ufe::SceneItem::Ptr& pos - ) override; + + Ufe::SceneItem::Ptr insertChild(const Ufe::SceneItem::Ptr& child,const Ufe::SceneItem::Ptr& pos) override; + Ufe::InsertChildCommand::Ptr insertChildCmd(const Ufe::SceneItem::Ptr& child, const Ufe::SceneItem::Ptr& pos) override; + + Ufe::UndoableCommand::Ptr reorderCmd(const Ufe::SceneItemList& orderedList) const override; #endif private: diff --git a/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp b/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp new file mode 100644 index 0000000000..402a761bee --- /dev/null +++ b/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp @@ -0,0 +1,85 @@ +// +// Copyright 2020 Autodesk +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#include "UsdUndoReorderCommand.h" + +#include + +#include + +namespace MAYAUSD_NS_DEF { +namespace ufe { + +UsdUndoReorderCommand::UsdUndoReorderCommand(const UsdPrim& child, const std::vector& tokenList) + : Ufe::UndoableCommand() + , _childPrim(child) + , _orderedTokens(tokenList) +{ +} + +UsdUndoReorderCommand::~UsdUndoReorderCommand() +{ +} + +UsdUndoReorderCommand::Ptr UsdUndoReorderCommand::create(const UsdPrim& child, const std::vector& tokenList) +{ + if (!child) { + return nullptr; + } + return std::make_shared(child, tokenList); +} + +bool UsdUndoReorderCommand::reorderRedo() +{ + const auto& parentPrim = _childPrim.GetParent(); + const auto& parentPrimSpec = MayaUsdUtils::getPrimSpecAtEditTarget(parentPrim); + + parentPrimSpec->SetNameChildrenOrder(_orderedTokens); + + return true; +} + +bool UsdUndoReorderCommand::reorderUndo() +{ + const auto& parentPrim = _childPrim.GetParent(); + const auto& parentPrimSpec = MayaUsdUtils::getPrimSpecAtEditTarget(parentPrim); + + parentPrimSpec->SetNameChildrenOrder(_orderedTokens); + + return true; +} + +void UsdUndoReorderCommand::undo() +{ + try { + if (!reorderUndo()) { + UFE_LOG("reorder undo failed"); + } + } + catch (const std::exception& e) { + UFE_LOG(e.what()); + throw; // re-throw the same exception + } +} + +void UsdUndoReorderCommand::redo() +{ + if (!reorderRedo()) { + UFE_LOG("reorder redo failed"); + } +} + +} // namespace ufe +} // namespace MayaUsd diff --git a/lib/mayaUsd/ufe/UsdUndoReorderCommand.h b/lib/mayaUsd/ufe/UsdUndoReorderCommand.h new file mode 100644 index 0000000000..e30108eaae --- /dev/null +++ b/lib/mayaUsd/ufe/UsdUndoReorderCommand.h @@ -0,0 +1,60 @@ +// +// Copyright 2020 Autodesk +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#pragma once + +#include + +#include +#include + +PXR_NAMESPACE_USING_DIRECTIVE + +namespace MAYAUSD_NS_DEF { +namespace ufe { + +//! \brief UsdUndoReorderCommand +class MAYAUSD_CORE_PUBLIC UsdUndoReorderCommand : public Ufe::UndoableCommand +{ +public: + typedef std::shared_ptr Ptr; + + UsdUndoReorderCommand(const UsdPrim& child, const std::vector& orderedTokens); + ~UsdUndoReorderCommand() override; + + // Delete the copy/move constructors assignment operators. + UsdUndoReorderCommand(const UsdUndoReorderCommand&) = delete; + UsdUndoReorderCommand& operator=(const UsdUndoReorderCommand&) = delete; + UsdUndoReorderCommand(UsdUndoReorderCommand&&) = delete; + UsdUndoReorderCommand& operator=(UsdUndoReorderCommand&&) = delete; + + //! Create a UsdUndoReorderCommand + static UsdUndoReorderCommand::Ptr create(const UsdPrim& child, const std::vector& orderedTokens); + +private: + bool reorderRedo(); + bool reorderUndo(); + + void undo() override; + void redo() override; + + UsdPrim _childPrim; + + std::vector _orderedTokens; + +}; // UsdUndoReorderCommand + +} // namespace ufe +} // namespace MayaUsd From d38fcdeb66055e1145bd0b095e8ef37e64fab01a Mon Sep 17 00:00:00 2001 From: Hamed Sabri Date: Sun, 25 Oct 2020 12:17:22 -0400 Subject: [PATCH 2/7] MAYA-105277 : add testReorderCmd. --- test/lib/ufe/CMakeLists.txt | 1 + test/lib/ufe/testReorderCmd.py | 149 ++++++++++++++++ test/testSamples/reorderCmd/primitives.ma | 186 ++++++++++++++++++++ test/testSamples/reorderCmd/primitives.usda | 53 ++++++ test/testUtils/mayaUtils.py | 7 +- 5 files changed, 393 insertions(+), 3 deletions(-) create mode 100644 test/lib/ufe/testReorderCmd.py create mode 100644 test/testSamples/reorderCmd/primitives.ma create mode 100644 test/testSamples/reorderCmd/primitives.usda diff --git a/test/lib/ufe/CMakeLists.txt b/test/lib/ufe/CMakeLists.txt index d59786f8f3..b0d12bada1 100644 --- a/test/lib/ufe/CMakeLists.txt +++ b/test/lib/ufe/CMakeLists.txt @@ -27,6 +27,7 @@ if(CMAKE_UFE_V2_FEATURES_AVAILABLE) testObject3d.py testRename.py testParentCmd.py + testReorderCmd.py testRotateCmd.py testRotatePivot.py testScaleCmd.py diff --git a/test/lib/ufe/testReorderCmd.py b/test/lib/ufe/testReorderCmd.py new file mode 100644 index 0000000000..abb70b3fb8 --- /dev/null +++ b/test/lib/ufe/testReorderCmd.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python + +# +# Copyright 2020 Autodesk +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import usdUtils, mayaUtils + +import ufe +import mayaUsd.ufe +import maya.cmds as cmds + +import unittest +import re +import os + +def findIndex(childItem): + hier = ufe.Hierarchy.hierarchy(childItem) + childrenList = ufe.Hierarchy.hierarchy(hier.parent()).children(); + index = childrenList.index(childItem) + return index + +class ReorderCmdTestCase(unittest.TestCase): + '''Verify the Maya reorder command on a USD scene.''' + + pluginsLoaded = False + + @classmethod + def setUpClass(cls): + if not cls.pluginsLoaded: + cls.pluginsLoaded = mayaUtils.isMayaUsdPluginLoaded() + + @classmethod + def tearDownClass(cls): + cmds.file(new=True, force=True) + + def setUp(self): + # load plugins + self.assertTrue(self.pluginsLoaded) + + # open primitives.ma scene in test-samples + mayaUtils.openPrimitivesScene() + + # clear selection to start off + cmds.select(clear=True) + + def testReorderRelative(self): + ''' Reorder (a.k.a move) objects relative to their siblings. + For relative moves, both positive and negative numbers may be specified. + ''' + shapeSegment = mayaUtils.createUfePathSegment("|world|Primitives_usd|Primitives_usdShape") + cylinderPath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Cylinder1")]) + cylinderItem = ufe.Hierarchy.createItem(cylinderPath) + + # start by getting the children from the parent node ( Xform1 ) + hier = ufe.Hierarchy.hierarchy(cylinderItem) + childrenList = ufe.Hierarchy.hierarchy(hier.parent()).children(); + + # get Cylinder1 position ( index ) before the move + index = childrenList.index(cylinderItem) + self.assertEqual(index, 3) + + # move Cylinder1 forward ( + ) by 3 + cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cylinder1", r=3) + + # check Cylinder1 position ( index ) after the move + self.assertEqual(findIndex(cylinderItem), 6) + + # move Cylinder1 backward ( - ) by 3 + cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cylinder1", r=-3) + + # check Cylinder1 position ( index ) after the move + self.assertEqual(findIndex(cylinderItem), 3) + + def testFrontBackRelative(self): + ''' + Reorder (a.k.a move) to front and back of the sibling list + ''' + shapeSegment = mayaUtils.createUfePathSegment("|world|Primitives_usd|Primitives_usdShape") + cylinderPath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Cylinder1")]) + cylinderItem = ufe.Hierarchy.createItem(cylinderPath) + + # make Cylinder1 the first sibling ( front ) + cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cylinder1", front=True) + + # check Cylinder1 position ( index ) after the move + self.assertEqual(findIndex(cylinderItem), 0) + + # make Cylinder1 the last sibling ( back ) + cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cylinder1", back=True) + + # check Cylinder1 position ( index ) after the move + self.assertEqual(findIndex(cylinderItem), 7) + + def testUndoRedo(self): + ''' + Undo/Redo reorder command + ''' + # create multiple items + shapeSegment = mayaUtils.createUfePathSegment("|world|Primitives_usd|Primitives_usdShape") + + capsulePath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Capsule1")]) + capsuleItem = ufe.Hierarchy.createItem(capsulePath) + + conePath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Cone1")]) + coneItem = ufe.Hierarchy.createItem(conePath) + + cubePath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Cube1")]) + cubeItem = ufe.Hierarchy.createItem(cubePath) + + # move items forward ( + ) + cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Capsule1", r=3) + cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cone1", r=3) + cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cube1", r=3) + + # check positions + self.assertEqual(findIndex(capsuleItem), 1) + self.assertEqual(findIndex(coneItem), 2) + self.assertEqual(findIndex(cubeItem), 3) + + # undo + for _ in range(3): + cmds.undo() + + # check positions + self.assertEqual(findIndex(capsuleItem), 0) + self.assertEqual(findIndex(coneItem), 1) + self.assertEqual(findIndex(cubeItem), 2) + + # redo + for _ in range(3): + cmds.redo() + + # check positions + self.assertEqual(findIndex(capsuleItem), 1) + self.assertEqual(findIndex(coneItem), 2) + self.assertEqual(findIndex(cubeItem), 3) diff --git a/test/testSamples/reorderCmd/primitives.ma b/test/testSamples/reorderCmd/primitives.ma new file mode 100644 index 0000000000..3ffe2664a9 --- /dev/null +++ b/test/testSamples/reorderCmd/primitives.ma @@ -0,0 +1,186 @@ +//Maya ASCII 2020 scene +//Name: primitives.ma +//Last modified: Thu, Oct 22, 2020 07:44:51 PM +//Codeset: 1252 +requires maya "2020"; +requires -nodeType "mayaUsdProxyShape" -dataType "pxrUsdStageData" "mayaUsdPlugin" "0.5.0"; +currentUnit -l centimeter -a degree -t film; +fileInfo "application" "maya"; +fileInfo "product" "Maya 2021"; +fileInfo "version" "Preview Release 120"; +fileInfo "cutIdentifier" "202009220010-000000"; +fileInfo "osv" "Windows 10 Pro v1909 (Build: 18363)"; +fileInfo "UUID" "E741AE6A-47EC-4E4C-A919-3AA64EDB51BD"; +createNode transform -s -n "persp"; + rename -uid "8CEDE604-4B9D-78BA-CC65-F08E2034DE2A"; + setAttr ".v" no; + setAttr ".t" -type "double3" 28 -29 21 ; + setAttr ".r" -type "double3" 62.482924915355788 -3.1805546814635176e-15 43.994913994745808 ; +createNode camera -s -n "perspShape" -p "persp"; + rename -uid "C97F9055-457A-A92F-466E-C09769A0AF0C"; + setAttr -k off ".v" no; + setAttr ".fl" 34.999999999999993; + setAttr ".coi" 45.453272709454041; + setAttr ".imn" -type "string" "persp"; + setAttr ".den" -type "string" "persp_depth"; + setAttr ".man" -type "string" "persp_mask"; + setAttr ".hc" -type "string" "viewSet -p %camera"; +createNode transform -s -n "top"; + rename -uid "426DD09A-46DA-E060-C3E6-838EC42DD11E"; + setAttr ".v" no; + setAttr ".t" -type "double3" 0 0 1000.1 ; +createNode camera -s -n "topShape" -p "top"; + rename -uid "5F3AE7A3-441D-1509-0CB6-B68ACA51FB9A"; + setAttr -k off ".v" no; + setAttr ".rnd" no; + setAttr ".coi" 1000.1; + setAttr ".ow" 30; + setAttr ".imn" -type "string" "top"; + setAttr ".den" -type "string" "top_depth"; + setAttr ".man" -type "string" "top_mask"; + setAttr ".hc" -type "string" "viewSet -t %camera"; + setAttr ".o" yes; +createNode transform -s -n "front"; + rename -uid "6696B5B1-46B6-62E0-6689-03B9C1A09208"; + setAttr ".v" no; + setAttr ".t" -type "double3" 0 -1000.1 0 ; + setAttr ".r" -type "double3" 90 0 0 ; +createNode camera -s -n "frontShape" -p "front"; + rename -uid "FA916391-4C23-2C88-FE1A-CCB48268BD09"; + setAttr -k off ".v" no; + setAttr ".rnd" no; + setAttr ".coi" 1000.1; + setAttr ".ow" 30; + setAttr ".imn" -type "string" "front"; + setAttr ".den" -type "string" "front_depth"; + setAttr ".man" -type "string" "front_mask"; + setAttr ".hc" -type "string" "viewSet -f %camera"; + setAttr ".o" yes; +createNode transform -s -n "side"; + rename -uid "98E01516-47F1-546C-C329-9BA5E28AE618"; + setAttr ".v" no; + setAttr ".t" -type "double3" 1000.1 0 0 ; + setAttr ".r" -type "double3" 90 0 90 ; +createNode camera -s -n "sideShape" -p "side"; + rename -uid "FC58F624-453A-4960-8819-588DB61B0F59"; + setAttr -k off ".v" no; + setAttr ".rnd" no; + setAttr ".coi" 1000.1; + setAttr ".ow" 30; + setAttr ".imn" -type "string" "side"; + setAttr ".den" -type "string" "side_depth"; + setAttr ".man" -type "string" "side_mask"; + setAttr ".hc" -type "string" "viewSet -s %camera"; + setAttr ".o" yes; +createNode transform -n "Primitives_usd"; + rename -uid "AA4B3580-4759-EFFF-C32B-3BA592783DAE"; +createNode mayaUsdProxyShape -n "Primitives_usdShape" -p "Primitives_usd"; + rename -uid "C051DBA0-44D5-D285-4017-829E91B39EF3"; + addAttr -r false -ci true -h true -sn "forceCompute" -ln "forceCompute" -min 0 + -max 1 -at "bool"; + setAttr -k off ".v"; + setAttr ".covm[0]" 0 1 1; + setAttr ".cdvm[0]" 0 1 1; + setAttr ".fp" -type "string" "primitives.usda"; +createNode lightLinker -s -n "lightLinker1"; + rename -uid "D623B91B-4F3F-9171-4249-649BBF23FCFC"; + setAttr -s 2 ".lnk"; + setAttr -s 2 ".slnk"; +createNode shapeEditorManager -n "shapeEditorManager"; + rename -uid "873A68AC-4225-747D-519D-63948B8FD99A"; +createNode poseInterpolatorManager -n "poseInterpolatorManager"; + rename -uid "202F6085-4D39-3BD7-5EDD-F28B66EDC16A"; +createNode displayLayerManager -n "layerManager"; + rename -uid "AF264B8B-4B99-26C4-C001-DD903B483BBB"; +createNode displayLayer -n "defaultLayer"; + rename -uid "D51812BF-45FC-0B75-D6EC-65BA5F5F15A6"; +createNode renderLayerManager -n "renderLayerManager"; + rename -uid "5CB814AD-4BEB-7241-AC55-7283C760F213"; +createNode renderLayer -n "defaultRenderLayer"; + rename -uid "F8CD5721-4D0B-1B3E-D69C-20BAA121108D"; + setAttr ".g" yes; +createNode script -n "uiConfigurationScriptNode"; + rename -uid "8EFA5D14-4466-83AA-35B3-D386F0AC43AD"; + setAttr ".b" -type "string" ( + "// Maya Mel UI Configuration File.\n//\n// This script is machine generated. Edit at your own risk.\n//\n//\n\nglobal string $gMainPane;\nif (`paneLayout -exists $gMainPane`) {\n\n\tglobal int $gUseScenePanelConfig;\n\tint $useSceneConfig = $gUseScenePanelConfig;\n\tint $nodeEditorPanelVisible = stringArrayContains(\"nodeEditorPanel1\", `getPanel -vis`);\n\tint $nodeEditorWorkspaceControlOpen = (`workspaceControl -exists nodeEditorPanel1Window` && `workspaceControl -q -visible nodeEditorPanel1Window`);\n\tint $menusOkayInPanels = `optionVar -q allowMenusInPanels`;\n\tint $nVisPanes = `paneLayout -q -nvp $gMainPane`;\n\tint $nPanes = 0;\n\tstring $editorName;\n\tstring $panelName;\n\tstring $itemFilterName;\n\tstring $panelConfig;\n\n\t//\n\t// get current state of the UI\n\t//\n\tsceneUIReplacement -update $gMainPane;\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Top View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 16384\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n" + + " -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n" + + " -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Side View\")) `;\n" + + "\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 16384\n -fogging 0\n" + + " -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n" + + " -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n" + + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Front View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n" + + " -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 16384\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n" + + " -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n" + + " -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Persp View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n" + + " -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 16384\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n" + + " -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n" + + " -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1261\n -height 838\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"ToggledOutliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"ToggledOutliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -docTag \"isolOutln_fromSeln\" \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n" + + " -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -autoExpandAnimatedShapes 1\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -isSet 0\n -isSetMember 0\n -displayMode \"DAG\" \n" + + " -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n -renderFilterIndex 0\n -selectionOrder \"chronological\" \n -expandAttribute 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"Outliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -autoExpandAnimatedShapes 1\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n" + + " -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"graphEditor\" (localizedPanelLabel(\"Graph Editor\")) `;\n" + + "\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 1\n -autoExpandAnimatedShapes 1\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 0\n -ignoreDagHierarchy 0\n" + + " -expandConnections 1\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n" + + " -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 1\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayValues 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showPlayRangeShades \"on\" \n -lockPlayRangeShades \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n -showUpstreamCurves 1\n -stackedCurvesMin -1\n -stackedCurvesMax 1\n -stackedCurvesSpace 0.2\n -preSelectionHighlight 0\n -constrainDrag 0\n -valueLinesToggle 1\n -highlightAffectedCurves 0\n" + + " $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dopeSheetPanel\" (localizedPanelLabel(\"Dope Sheet\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -autoExpandAnimatedShapes 1\n -showDagOnly 0\n -showAssets 1\n" + + " -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUpstreamCurves 1\n -showUnitlessCurves 0\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n" + + " -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayValues 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -outliner \"dopeSheetPanel1OutlineEd\" \n -showSummary 1\n -showScene 0\n -hierarchyBelow 0\n -showTicks 1\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"timeEditorPanel\" (localizedPanelLabel(\"Time Editor\")) `;\n" + + "\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Time Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"clipEditorPanel\" (localizedPanelLabel(\"Trax Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n -displayValues 0\n -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"sequenceEditorPanel\" (localizedPanelLabel(\"Camera Sequencer\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n" + + "\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Camera Sequencer\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = sequenceEditorNameFromPanel($panelName);\n clipEditor -e \n -displayValues 0\n -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperGraphPanel\" (localizedPanelLabel(\"Hypergraph Hierarchy\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -mergeConnections 0\n -zoom 1\n -animateTransition 0\n -showRelationships 1\n" + + " -showShapes 0\n -showDeformers 0\n -showExpressions 0\n -showConstraints 0\n -showConnectionFromSelected 0\n -showConnectionToSelected 0\n -showConstraintLabels 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -opaqueContainers 0\n -freeform 0\n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -heatMapDisplay 0\n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -range 0 0 \n -iconSize \"smallIcons\" \n -showCachedConnections 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperShadePanel\" (localizedPanelLabel(\"Hypershade\")) `;\n" + + "\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"visorPanel\" (localizedPanelLabel(\"Visor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"nodeEditorPanel\" (localizedPanelLabel(\"Node Editor\")) `;\n\tif ($nodeEditorPanelVisible || $nodeEditorWorkspaceControlOpen) {\n\t\tif (\"\" == $panelName) {\n\t\t\tif ($useSceneConfig) {\n\t\t\t\t$panelName = `scriptedPanel -unParent -type \"nodeEditorPanel\" -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n" + + " -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n -showNamespace 1\n -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -editorMode \"default\" \n" + + " -hasWatchpoint 0\n $editorName;\n\t\t\t}\n\t\t} else {\n\t\t\t$label = `panel -q -label $panelName`;\n\t\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n" + + " -popupMenuScript \"nodeEdBuildPanelMenus\" \n -showNamespace 1\n -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -editorMode \"default\" \n -hasWatchpoint 0\n $editorName;\n\t\t\tif (!$useSceneConfig) {\n\t\t\t\tpanel -e -l $label $panelName;\n\t\t\t}\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"createNodePanel\" (localizedPanelLabel(\"Create Node\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Create Node\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"polyTexturePlacementPanel\" (localizedPanelLabel(\"UV Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"UV Editor\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"renderWindowPanel\" (localizedPanelLabel(\"Render View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"shapePanel\" (localizedPanelLabel(\"Shape Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tshapePanel -edit -l (localizedPanelLabel(\"Shape Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"posePanel\" (localizedPanelLabel(\"Pose Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tposePanel -edit -l (localizedPanelLabel(\"Pose Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n" + + "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynRelEdPanel\" (localizedPanelLabel(\"Dynamic Relationships\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"relationshipPanel\" (localizedPanelLabel(\"Relationship Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"referenceEditorPanel\" (localizedPanelLabel(\"Reference Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"componentEditorPanel\" (localizedPanelLabel(\"Component Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Component Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynPaintScriptedPanelType\" (localizedPanelLabel(\"Paint Effects\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"scriptEditorPanel\" (localizedPanelLabel(\"Script Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels $panelName;\n" + + "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"profilerPanel\" (localizedPanelLabel(\"Profiler Tool\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Profiler Tool\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"contentBrowserPanel\" (localizedPanelLabel(\"Content Browser\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Content Browser\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\tif ($useSceneConfig) {\n string $configName = `getPanel -cwl (localizedPanelLabel(\"Current Layout\"))`;\n if (\"\" != $configName) {\n\t\t\tpanelConfiguration -edit -label (localizedPanelLabel(\"Current Layout\")) \n\t\t\t\t-userCreated false\n\t\t\t\t-defaultImage \"vacantCell.xP:/\"\n" + + "\t\t\t\t-image \"\"\n\t\t\t\t-sc false\n\t\t\t\t-configString \"global string $gMainPane; paneLayout -e -cn \\\"single\\\" -ps 1 100 100 $gMainPane;\"\n\t\t\t\t-removeAllPanels\n\t\t\t\t-ap false\n\t\t\t\t\t(localizedPanelLabel(\"Persp View\")) \n\t\t\t\t\t\"modelPanel\"\n" + + "\t\t\t\t\t\"$panelName = `modelPanel -unParent -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels `;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 16384\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -greasePencils 1\\n -shadows 0\\n -captureSequenceNumber -1\\n -width 1261\\n -height 838\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName\"\n" + + "\t\t\t\t\t\"modelPanel -edit -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels $panelName;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 16384\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -greasePencils 1\\n -shadows 0\\n -captureSequenceNumber -1\\n -width 1261\\n -height 838\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName\"\n" + + "\t\t\t\t$configName;\n\n setNamedPanelLayout (localizedPanelLabel(\"Current Layout\"));\n }\n\n panelHistory -e -clear mainPanelHistory;\n sceneUIReplacement -clear;\n\t}\n\n\ngrid -spacing 5 -size 12 -divisions 5 -displayAxes yes -displayGridLines yes -displayDivisionLines yes -displayPerspectiveLabels no -displayOrthographicLabels no -displayAxesBold yes -perspectiveLabelPosition axis -orthographicLabelPosition edge;\nviewManip -drawCompass 0 -compassAngle 0 -frontParameters \"\" -homeParameters \"\" -selectionLockParameters \"\";\n}\n"); + setAttr ".st" 3; +createNode script -n "sceneConfigurationScriptNode"; + rename -uid "0583D8FC-4820-0B89-B876-4BB103A8B3ED"; + setAttr ".b" -type "string" "playbackOptions -min 1 -max 120 -ast 1 -aet 200 "; + setAttr ".st" 6; +select -ne :time1; + setAttr ".o" 1; + setAttr ".unw" 1; +select -ne :hardwareRenderingGlobals; + setAttr ".otfna" -type "stringArray" 22 "NURBS Curves" "NURBS Surfaces" "Polygons" "Subdiv Surface" "Particles" "Particle Instance" "Fluids" "Strokes" "Image Planes" "UI" "Lights" "Cameras" "Locators" "Joints" "IK Handles" "Deformers" "Motion Trails" "Components" "Hair Systems" "Follicles" "Misc. UI" "Ornaments" ; + setAttr ".otfva" -type "Int32Array" 22 0 1 1 1 1 1 + 1 1 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 ; + setAttr ".fprt" yes; +select -ne :renderPartition; + setAttr -s 2 ".st"; +select -ne :renderGlobalsList1; +select -ne :defaultShaderList1; + setAttr -s 5 ".s"; +select -ne :postProcessList1; + setAttr -s 2 ".p"; +select -ne :defaultRenderingList1; +select -ne :initialShadingGroup; + setAttr ".ro" yes; +select -ne :initialParticleSE; + setAttr ".ro" yes; +select -ne :defaultRenderGlobals; + addAttr -ci true -h true -sn "dss" -ln "defaultSurfaceShader" -dt "string"; + setAttr ".dss" -type "string" "lambert1"; +select -ne :defaultResolution; + setAttr ".pa" 1; +select -ne :hardwareRenderGlobals; + setAttr ".ctrs" 256; + setAttr ".btrs" 512; +connectAttr ":time1.o" "Primitives_usdShape.tm"; +relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message"; +relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message"; +relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message"; +relationship "shadowLink" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message"; +connectAttr "layerManager.dli[0]" "defaultLayer.id"; +connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid"; +connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na; +// End of primitives.ma diff --git a/test/testSamples/reorderCmd/primitives.usda b/test/testSamples/reorderCmd/primitives.usda new file mode 100644 index 0000000000..2a21473e5f --- /dev/null +++ b/test/testSamples/reorderCmd/primitives.usda @@ -0,0 +1,53 @@ +#usda 1.0 + +def Xform "Xform1" +{ + def Capsule "Capsule1" + { + double3 xformOp:translate = (-7.607727590772411, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cone "Cone1" + { + double3 xformOp:translate = (-2.986010731900584, -3.534467217462761, -0.5436290254897678) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cube "Cube1" + { + double3 xformOp:translate = (3.970508182982382, -2.7311656363302603, 1.1741844108896409) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cylinder "Cylinder1" + { + double3 xformOp:translate = (5.009519938016915, 1.2977105186817894, 2.4365802837636696) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Sphere "Sphere1" + { + double3 xformOp:translate = (-4.965455570134174, -0.09389110573597037, 4.443657435819965) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Sphere "Sphere2" + { + double3 xformOp:translate = (-0.5527416759188446, 0.6708366258753031, 6.8059410098320825) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Sphere "Sphere3" + { + double3 xformOp:translate = (-0.606326554504018, -0.7060700109306381, 1.9297408220127679) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Sphere "Sphere4" + { + double3 xformOp:translate = (1.3242755094579097, 2.6282557204081325, 3.771510933679874) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} + diff --git a/test/testUtils/mayaUtils.py b/test/testUtils/mayaUtils.py index 7d27773758..6af3352fd9 100644 --- a/test/testUtils/mayaUtils.py +++ b/test/testUtils/mayaUtils.py @@ -25,9 +25,6 @@ import ufe -from mayaUsd import lib as mayaUsdLib -from pxr import Usd, UsdGeom - mayaRuntimeID = 1 mayaSeparator = "|" @@ -164,6 +161,10 @@ def openGroupBallsScene(): filePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "testSamples", "groupBalls", "ballset.ma" ) cmds.file(filePath, force=True, open=True) +def openPrimitivesScene(): + filePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "testSamples", "reorderCmd", "primitives.ma" ) + cmds.file(filePath, force=True, open=True) + def createProxyAndStage(): """ Create in-memory stage From 13330c47611e69ec0c13ef1191ebfe4c0fa137fa Mon Sep 17 00:00:00 2001 From: Hamed Sabri Date: Sun, 25 Oct 2020 12:39:02 -0400 Subject: [PATCH 3/7] MAYA-105277: add guards around reorder command. --- lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp | 2 ++ lib/mayaUsd/ufe/ProxyShapeHierarchy.h | 2 ++ lib/mayaUsd/ufe/UsdHierarchy.cpp | 2 ++ lib/mayaUsd/ufe/UsdHierarchy.h | 2 ++ test/lib/ufe/testReorderCmd.py | 1 + 5 files changed, 9 insertions(+) diff --git a/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp b/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp index c226f7a56a..deb6a98854 100644 --- a/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp +++ b/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp @@ -248,6 +248,7 @@ Ufe::UndoableCommand::Ptr ProxyShapeHierarchy::createGroupCmd(const Ufe::Selecti return UsdUndoCreateGroupCommand::create(usdItem, selection, name.string()); } +#if UFE_PREVIEW_VERSION_NUM >= 2026 Ufe::UndoableCommand::Ptr ProxyShapeHierarchy::reorderCmd(const Ufe::SceneItemList& orderedList) const { std::vector orderedTokens; @@ -262,6 +263,7 @@ Ufe::UndoableCommand::Ptr ProxyShapeHierarchy::reorderCmd(const Ufe::SceneItemLi return UsdUndoReorderCommand::create(childPrim, orderedTokens); } +#endif Ufe::SceneItem::Ptr ProxyShapeHierarchy::defaultParent() const { diff --git a/lib/mayaUsd/ufe/ProxyShapeHierarchy.h b/lib/mayaUsd/ufe/ProxyShapeHierarchy.h index cf28b4d7c6..ded3a946aa 100644 --- a/lib/mayaUsd/ufe/ProxyShapeHierarchy.h +++ b/lib/mayaUsd/ufe/ProxyShapeHierarchy.h @@ -77,8 +77,10 @@ class MAYAUSD_CORE_PUBLIC ProxyShapeHierarchy : public Ufe::Hierarchy Ufe::SceneItem::Ptr insertChild(const Ufe::SceneItem::Ptr& child,const Ufe::SceneItem::Ptr& pos) override; Ufe::InsertChildCommand::Ptr insertChildCmd(const Ufe::SceneItem::Ptr& child, const Ufe::SceneItem::Ptr& pos) override; +#if UFE_PREVIEW_VERSION_NUM >= 2026 Ufe::UndoableCommand::Ptr reorderCmd(const Ufe::SceneItemList& orderedList) const override; #endif +#endif private: const UsdPrim& getUsdRootPrim() const; diff --git a/lib/mayaUsd/ufe/UsdHierarchy.cpp b/lib/mayaUsd/ufe/UsdHierarchy.cpp index 07ca24b9b2..52839205de 100644 --- a/lib/mayaUsd/ufe/UsdHierarchy.cpp +++ b/lib/mayaUsd/ufe/UsdHierarchy.cpp @@ -245,6 +245,7 @@ Ufe::SceneItem::Ptr UsdHierarchy::defaultParent() const return createItem(proxyShapePath); } +#if UFE_PREVIEW_VERSION_NUM >= 2026 Ufe::UndoableCommand::Ptr UsdHierarchy::reorderCmd(const Ufe::SceneItemList& orderedList) const { std::vector orderedTokens; @@ -259,6 +260,7 @@ Ufe::UndoableCommand::Ptr UsdHierarchy::reorderCmd(const Ufe::SceneItemList& ord return UsdUndoReorderCommand::create(childPrim, orderedTokens); } +#endif #endif // UFE_V2_FEATURES_AVAILABLE diff --git a/lib/mayaUsd/ufe/UsdHierarchy.h b/lib/mayaUsd/ufe/UsdHierarchy.h index 2f85aabef1..aa14a57bc9 100644 --- a/lib/mayaUsd/ufe/UsdHierarchy.h +++ b/lib/mayaUsd/ufe/UsdHierarchy.h @@ -74,8 +74,10 @@ class MAYAUSD_CORE_PUBLIC UsdHierarchy : public Ufe::Hierarchy Ufe::SceneItem::Ptr insertChild(const Ufe::SceneItem::Ptr& child,const Ufe::SceneItem::Ptr& pos) override; Ufe::InsertChildCommand::Ptr insertChildCmd(const Ufe::SceneItem::Ptr& child, const Ufe::SceneItem::Ptr& pos) override; +#if UFE_PREVIEW_VERSION_NUM >= 2026 Ufe::UndoableCommand::Ptr reorderCmd(const Ufe::SceneItemList& orderedList) const override; #endif +#endif private: Ufe::SceneItemList createUFEChildList(const UsdPrimSiblingRange& range) const; diff --git a/test/lib/ufe/testReorderCmd.py b/test/lib/ufe/testReorderCmd.py index abb70b3fb8..ab243a48de 100644 --- a/test/lib/ufe/testReorderCmd.py +++ b/test/lib/ufe/testReorderCmd.py @@ -32,6 +32,7 @@ def findIndex(childItem): index = childrenList.index(childItem) return index +@unittest.skipIf(os.getenv('UFE_PREVIEW_VERSION_NUM', '0000') < '2026', 'testReorderCmd is only available in Maya with UFE preview version 0.2.26 and greater') class ReorderCmdTestCase(unittest.TestCase): '''Verify the Maya reorder command on a USD scene.''' From 66e7ab5b74a7caf7b5ba984ef95b7759eb25eed1 Mon Sep 17 00:00:00 2001 From: Hamed Sabri Date: Sun, 25 Oct 2020 14:32:36 -0400 Subject: [PATCH 4/7] MAYA-105277 : fix the bad merge. --- test/testUtils/mayaUtils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/testUtils/mayaUtils.py b/test/testUtils/mayaUtils.py index 6af3352fd9..2fc76e7c6e 100644 --- a/test/testUtils/mayaUtils.py +++ b/test/testUtils/mayaUtils.py @@ -25,6 +25,9 @@ import ufe +from mayaUsd import lib as mayaUsdLib +from pxr import Usd, UsdGeom + mayaRuntimeID = 1 mayaSeparator = "|" From e5023995adcd26aa227f5fd7d04e4c37bf9cd2ed Mon Sep 17 00:00:00 2001 From: Hamed Sabri Date: Mon, 26 Oct 2020 17:17:20 -0400 Subject: [PATCH 5/7] MAYA-105277: react to ufe interface changes. --- lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp | 16 +++------------- lib/mayaUsd/ufe/UsdUndoReorderCommand.h | 3 +-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp b/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp index 402a761bee..30fe577147 100644 --- a/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp +++ b/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp @@ -41,17 +41,7 @@ UsdUndoReorderCommand::Ptr UsdUndoReorderCommand::create(const UsdPrim& child, c return std::make_shared(child, tokenList); } -bool UsdUndoReorderCommand::reorderRedo() -{ - const auto& parentPrim = _childPrim.GetParent(); - const auto& parentPrimSpec = MayaUsdUtils::getPrimSpecAtEditTarget(parentPrim); - - parentPrimSpec->SetNameChildrenOrder(_orderedTokens); - - return true; -} - -bool UsdUndoReorderCommand::reorderUndo() +bool UsdUndoReorderCommand::reorder() { const auto& parentPrim = _childPrim.GetParent(); const auto& parentPrimSpec = MayaUsdUtils::getPrimSpecAtEditTarget(parentPrim); @@ -64,7 +54,7 @@ bool UsdUndoReorderCommand::reorderUndo() void UsdUndoReorderCommand::undo() { try { - if (!reorderUndo()) { + if (!reorder()) { UFE_LOG("reorder undo failed"); } } @@ -76,7 +66,7 @@ void UsdUndoReorderCommand::undo() void UsdUndoReorderCommand::redo() { - if (!reorderRedo()) { + if (!reorder()) { UFE_LOG("reorder redo failed"); } } diff --git a/lib/mayaUsd/ufe/UsdUndoReorderCommand.h b/lib/mayaUsd/ufe/UsdUndoReorderCommand.h index e30108eaae..a395063498 100644 --- a/lib/mayaUsd/ufe/UsdUndoReorderCommand.h +++ b/lib/mayaUsd/ufe/UsdUndoReorderCommand.h @@ -44,8 +44,7 @@ class MAYAUSD_CORE_PUBLIC UsdUndoReorderCommand : public Ufe::UndoableCommand static UsdUndoReorderCommand::Ptr create(const UsdPrim& child, const std::vector& orderedTokens); private: - bool reorderRedo(); - bool reorderUndo(); + bool reorder(); void undo() override; void redo() override; From 0977cf12e569a8eec7d8b05982d832f112846022 Mon Sep 17 00:00:00 2001 From: Hamed Sabri Date: Tue, 27 Oct 2020 15:39:02 -0400 Subject: [PATCH 6/7] MAYA-105277: address feedbacks. --- lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp | 10 +++------ lib/mayaUsd/ufe/UsdHierarchy.cpp | 18 ++++++---------- lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp | 13 ++++++------ lib/mayaUsd/ufe/UsdUndoReorderCommand.h | 9 ++++---- test/lib/ufe/testReorderCmd.py | 26 ++++++++++------------- test/testUtils/mayaUtils.py | 3 +-- 6 files changed, 33 insertions(+), 46 deletions(-) diff --git a/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp b/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp index deb6a98854..3f94677d24 100644 --- a/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp +++ b/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp @@ -219,12 +219,8 @@ Ufe::SceneItem::Ptr ProxyShapeHierarchy::insertChild( const Ufe::SceneItem::Ptr& pos ) { - #ifdef UFE_V2_FEATURES_AVAILABLE auto insertChildCommand = insertChildCmd(child, pos); return insertChildCommand->insertedChild(); - #else - return nullptr; - #endif } Ufe::SceneItem::Ptr ProxyShapeHierarchy::createGroup(const Ufe::Selection& selection, const Ufe::PathComponent& name) const @@ -257,11 +253,11 @@ Ufe::UndoableCommand::Ptr ProxyShapeHierarchy::reorderCmd(const Ufe::SceneItemLi orderedTokens.emplace_back(downcast(item)->prim().GetPath().GetNameToken()); } - // TODO HS Oct 23, 2020, grab any child and pass it to UsdUndoReorderCommand - // in order to get the parent out of it. + // create a reorder command and pass in the parent and its ordered children list const auto& childPrim = downcast((*orderedList.begin()))->prim(); + const auto& parentPrim = childPrim.GetParent(); - return UsdUndoReorderCommand::create(childPrim, orderedTokens); + return UsdUndoReorderCommand::create(parentPrim, orderedTokens); } #endif diff --git a/lib/mayaUsd/ufe/UsdHierarchy.cpp b/lib/mayaUsd/ufe/UsdHierarchy.cpp index 52839205de..e563ae2074 100644 --- a/lib/mayaUsd/ufe/UsdHierarchy.cpp +++ b/lib/mayaUsd/ufe/UsdHierarchy.cpp @@ -206,12 +206,8 @@ Ufe::SceneItem::Ptr UsdHierarchy::insertChild( const Ufe::SceneItem::Ptr& pos ) { - #ifdef UFE_V2_FEATURES_AVAILABLE auto insertChildCommand = insertChildCmd(child, pos); return insertChildCommand->insertedChild(); - #else - return nullptr; - #endif } // Create a transform. @@ -248,17 +244,17 @@ Ufe::SceneItem::Ptr UsdHierarchy::defaultParent() const #if UFE_PREVIEW_VERSION_NUM >= 2026 Ufe::UndoableCommand::Ptr UsdHierarchy::reorderCmd(const Ufe::SceneItemList& orderedList) const { - std::vector orderedTokens; + std::vector orderedTokens; - for (const auto& item : orderedList) { - orderedTokens.emplace_back(downcast(item)->prim().GetPath().GetNameToken()); - } + for (const auto& item : orderedList) { + orderedTokens.emplace_back(downcast(item)->prim().GetPath().GetNameToken()); + } - // TODO HS Oct 23, 2020, grab any child and pass it to UsdUndoReorderCommand - // in order to get the parent out of it. + // create a reorder command and pass in the parent and its reordered children list const auto& childPrim = downcast((*orderedList.begin()))->prim(); + const auto& parentPrim = childPrim.GetParent(); - return UsdUndoReorderCommand::create(childPrim, orderedTokens); + return UsdUndoReorderCommand::create(parentPrim, orderedTokens); } #endif diff --git a/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp b/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp index 30fe577147..1cc23be08e 100644 --- a/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp +++ b/lib/mayaUsd/ufe/UsdUndoReorderCommand.cpp @@ -22,9 +22,9 @@ namespace MAYAUSD_NS_DEF { namespace ufe { -UsdUndoReorderCommand::UsdUndoReorderCommand(const UsdPrim& child, const std::vector& tokenList) +UsdUndoReorderCommand::UsdUndoReorderCommand(const UsdPrim& parentPrim, const std::vector& tokenList) : Ufe::UndoableCommand() - , _childPrim(child) + , _parentPrim(parentPrim) , _orderedTokens(tokenList) { } @@ -33,18 +33,17 @@ UsdUndoReorderCommand::~UsdUndoReorderCommand() { } -UsdUndoReorderCommand::Ptr UsdUndoReorderCommand::create(const UsdPrim& child, const std::vector& tokenList) +UsdUndoReorderCommand::Ptr UsdUndoReorderCommand::create(const UsdPrim& parentPrim, const std::vector& tokenList) { - if (!child) { + if (!parentPrim) { return nullptr; } - return std::make_shared(child, tokenList); + return std::make_shared(parentPrim, tokenList); } bool UsdUndoReorderCommand::reorder() { - const auto& parentPrim = _childPrim.GetParent(); - const auto& parentPrimSpec = MayaUsdUtils::getPrimSpecAtEditTarget(parentPrim); + const auto& parentPrimSpec = MayaUsdUtils::getPrimSpecAtEditTarget(_parentPrim); parentPrimSpec->SetNameChildrenOrder(_orderedTokens); diff --git a/lib/mayaUsd/ufe/UsdUndoReorderCommand.h b/lib/mayaUsd/ufe/UsdUndoReorderCommand.h index a395063498..ea64caa956 100644 --- a/lib/mayaUsd/ufe/UsdUndoReorderCommand.h +++ b/lib/mayaUsd/ufe/UsdUndoReorderCommand.h @@ -18,7 +18,8 @@ #include #include -#include + +#include PXR_NAMESPACE_USING_DIRECTIVE @@ -31,7 +32,7 @@ class MAYAUSD_CORE_PUBLIC UsdUndoReorderCommand : public Ufe::UndoableCommand public: typedef std::shared_ptr Ptr; - UsdUndoReorderCommand(const UsdPrim& child, const std::vector& orderedTokens); + UsdUndoReorderCommand(const UsdPrim& parentPrim, const std::vector& orderedTokens); ~UsdUndoReorderCommand() override; // Delete the copy/move constructors assignment operators. @@ -41,7 +42,7 @@ class MAYAUSD_CORE_PUBLIC UsdUndoReorderCommand : public Ufe::UndoableCommand UsdUndoReorderCommand& operator=(UsdUndoReorderCommand&&) = delete; //! Create a UsdUndoReorderCommand - static UsdUndoReorderCommand::Ptr create(const UsdPrim& child, const std::vector& orderedTokens); + static UsdUndoReorderCommand::Ptr create(const UsdPrim& parentPrim, const std::vector& orderedTokens); private: bool reorder(); @@ -49,7 +50,7 @@ class MAYAUSD_CORE_PUBLIC UsdUndoReorderCommand : public Ufe::UndoableCommand void undo() override; void redo() override; - UsdPrim _childPrim; + UsdPrim _parentPrim; std::vector _orderedTokens; diff --git a/test/lib/ufe/testReorderCmd.py b/test/lib/ufe/testReorderCmd.py index ab243a48de..522c116ca7 100644 --- a/test/lib/ufe/testReorderCmd.py +++ b/test/lib/ufe/testReorderCmd.py @@ -61,8 +61,7 @@ def testReorderRelative(self): ''' Reorder (a.k.a move) objects relative to their siblings. For relative moves, both positive and negative numbers may be specified. ''' - shapeSegment = mayaUtils.createUfePathSegment("|world|Primitives_usd|Primitives_usdShape") - cylinderPath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Cylinder1")]) + cylinderPath = ufe.PathString.path("|Primitives_usd|Primitives_usdShape,/Xform1/Cylinder1") cylinderItem = ufe.Hierarchy.createItem(cylinderPath) # start by getting the children from the parent node ( Xform1 ) @@ -89,18 +88,17 @@ def testFrontBackRelative(self): ''' Reorder (a.k.a move) to front and back of the sibling list ''' - shapeSegment = mayaUtils.createUfePathSegment("|world|Primitives_usd|Primitives_usdShape") - cylinderPath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Cylinder1")]) + cylinderPath = ufe.PathString.path("|Primitives_usd|Primitives_usdShape,/Xform1/Cylinder1") cylinderItem = ufe.Hierarchy.createItem(cylinderPath) # make Cylinder1 the first sibling ( front ) - cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cylinder1", front=True) + cmds.reorder(ufe.PathString.string(cylinderPath), front=True) # check Cylinder1 position ( index ) after the move self.assertEqual(findIndex(cylinderItem), 0) # make Cylinder1 the last sibling ( back ) - cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cylinder1", back=True) + cmds.reorder(ufe.PathString.string(cylinderPath), back=True) # check Cylinder1 position ( index ) after the move self.assertEqual(findIndex(cylinderItem), 7) @@ -109,22 +107,20 @@ def testUndoRedo(self): ''' Undo/Redo reorder command ''' - # create multiple items - shapeSegment = mayaUtils.createUfePathSegment("|world|Primitives_usd|Primitives_usdShape") - - capsulePath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Capsule1")]) + # create multiple item + capsulePath = ufe.PathString.path("|Primitives_usd|Primitives_usdShape,/Xform1/Capsule1") capsuleItem = ufe.Hierarchy.createItem(capsulePath) - conePath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Cone1")]) + conePath = ufe.PathString.path("|Primitives_usd|Primitives_usdShape,/Xform1/Cone1") coneItem = ufe.Hierarchy.createItem(conePath) - cubePath = ufe.Path([shapeSegment, usdUtils.createUfePathSegment("/Xform1/Cube1")]) + cubePath = ufe.PathString.path("|Primitives_usd|Primitives_usdShape,/Xform1/Cube1") cubeItem = ufe.Hierarchy.createItem(cubePath) # move items forward ( + ) - cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Capsule1", r=3) - cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cone1", r=3) - cmds.reorder("|Primitives_usd|Primitives_usdShape,/Xform1/Cube1", r=3) + cmds.reorder(ufe.PathString.string(capsulePath), r=3) + cmds.reorder(ufe.PathString.string(conePath), r=3) + cmds.reorder(ufe.PathString.string(cubePath), r=3) # check positions self.assertEqual(findIndex(capsuleItem), 1) diff --git a/test/testUtils/mayaUtils.py b/test/testUtils/mayaUtils.py index a8b3160245..3408eb3b41 100644 --- a/test/testUtils/mayaUtils.py +++ b/test/testUtils/mayaUtils.py @@ -170,8 +170,7 @@ def openGroupBallsScene(): return openTestScene("groupBalls", "ballset.ma" ) def openPrimitivesScene(): - filePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "testSamples", "reorderCmd", "primitives.ma" ) - cmds.file(filePath, force=True, open=True) + return openTestScene("reorderCmd", "primitives.ma" ) def createProxyAndStage(): """ From 520b36de46f29948c6fc3ad99a67f2080c3f1cda Mon Sep 17 00:00:00 2001 From: Hamed Sabri Date: Tue, 27 Oct 2020 17:03:15 -0400 Subject: [PATCH 7/7] Address feedback. --- lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp | 5 +---- lib/mayaUsd/ufe/UsdHierarchy.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp b/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp index 3f94677d24..125a3a22ed 100644 --- a/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp +++ b/lib/mayaUsd/ufe/ProxyShapeHierarchy.cpp @@ -254,10 +254,7 @@ Ufe::UndoableCommand::Ptr ProxyShapeHierarchy::reorderCmd(const Ufe::SceneItemLi } // create a reorder command and pass in the parent and its ordered children list - const auto& childPrim = downcast((*orderedList.begin()))->prim(); - const auto& parentPrim = childPrim.GetParent(); - - return UsdUndoReorderCommand::create(parentPrim, orderedTokens); + return UsdUndoReorderCommand::create(getUsdRootPrim(), orderedTokens); } #endif diff --git a/lib/mayaUsd/ufe/UsdHierarchy.cpp b/lib/mayaUsd/ufe/UsdHierarchy.cpp index e563ae2074..f3895d6415 100644 --- a/lib/mayaUsd/ufe/UsdHierarchy.cpp +++ b/lib/mayaUsd/ufe/UsdHierarchy.cpp @@ -251,10 +251,7 @@ Ufe::UndoableCommand::Ptr UsdHierarchy::reorderCmd(const Ufe::SceneItemList& ord } // create a reorder command and pass in the parent and its reordered children list - const auto& childPrim = downcast((*orderedList.begin()))->prim(); - const auto& parentPrim = childPrim.GetParent(); - - return UsdUndoReorderCommand::create(parentPrim, orderedTokens); + return UsdUndoReorderCommand::create(downcast(sceneItem())->prim(), orderedTokens); } #endif