Skip to content

Commit

Permalink
update readme;
Browse files Browse the repository at this point in the history
fix bug;
  • Loading branch information
1xinghuan committed Sep 2, 2020
1 parent b940dfb commit cc29f20
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
21 changes: 21 additions & 0 deletions Supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,25 @@

## Maya

This is an example workflow using usdNodeGraph. Test with maya 2020.2 and maya-usd 0.3.0.

1. Load the [master.usda](examples/layer/master.usda) file in maya and rename the node to "s00";

2. Open UsdNodeGraph and set the stage(using the code in [README](README.md));

3. Go into set.usda Layer node;

4. Create a PrimDefine node and connect it to 'PrimDefine(/world)'. Set parameter 'primName' to 'house1' and 'typeName' to 'Xform';

5. Create a 'Reference' node and connect it to 'PrimDefine1' node. Set parameter 'assetPath' to the path of [house.usda](examples/model/house.usda);

6. Click **'File->Apply'** or use 'Ctrl+Shift+A' short cut, then you can see the house in maya;

7. Copy the created two nodes and paste, change the 'PrimDefine2' node 'primName' parameter to 'house2'. Apply the changes and there will be two houses in scene. You can check it in maya outliner;

8. Go into layout.usda Layer node;

9. Move the house2 to other place in maya's viewer, go back to UsdNodeGraph and click **'File->Reload Layer'**. There should be two 'PrimOverride' nodes and a 'Transform' node. You can see and edit the translate value in parameter panel after double click the node.

10. You can save current edit by click **'File->Save Layer'**.

6 changes: 3 additions & 3 deletions lib/python/usdNodeGraph/core/parameter/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def isBuiltIn(self):
def isVisible(self):
return self._visible

def _getValue(self, _value, _timeSamples):
def _getValue(self, _value, _timeSamples, time):
if _timeSamples is None:
return _value
else:
Expand All @@ -207,10 +207,10 @@ def _getValue(self, _value, _timeSamples):
return value

def getInheritValue(self, time=None):
return self._getValue(self._inheritValue, self._inheritTimeSamples)
return self._getValue(self._inheritValue, self._inheritTimeSamples, time)

def getOverrideValue(self, time=None):
return self._getValue(self._overrideValue, self._overrideTimeSamples)
return self._getValue(self._overrideValue, self._overrideTimeSamples, time)

def getValue(self, time=None):
if self._node.hasProperty(self._name):
Expand Down

0 comments on commit cc29f20

Please sign in to comment.