Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HYDRA-1043 : Fix Bifrost graphs can't be displayed in Hydra viewport #170

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/mayaHydra/hydraExtensions/mixedUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ SdfPath DagPathToSdfPath(
std::string name = dagPath.fullPathName().asChar();
if ( name.empty() ) {
MFnDependencyNode dep(dagPath.node());
TF_WARN("Empty fullpath name for DAG object : %s of type : %s", dep.name().asChar(), dep.typeName().asChar());
if (dep.name().length() || dep.typeName().length()){
TF_WARN("Empty fullpath name for DAG object : %s of type : %s", dep.name().asChar(), dep.typeName().asChar());
}
return SdfPath();
}
SanitizeNameForSdfPath(name, stripNamespaces);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,11 @@ namespace {
template<> inline SdfPath maybePrepend<MRenderItem>(
const MRenderItem& ri, const SdfPath& inPath
) {
// Prepend Maya path, for organisation and readability.
// Prepend Maya path, for organization and readability.
auto sdfDagPath = DagPathToSdfPath(ri.sourceDagPath(), false, false).MakeRelativePath(SdfPath::AbsoluteRootPath());
if (sdfDagPath.IsEmpty()){
return inPath;
}
return sdfDagPath.AppendPath(inPath);
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import mayaUtils
from testUtils import PluginLoaded
import platform
import unittest

class TestMayaDefaultMaterial(mtohUtils.MayaHydraBaseTestCase): #Subclassing mtohUtils.MayaHydraBaseTestCase to be able to call self.assertSnapshotClose
# MayaHydraBaseTestCase.setUpClass requirement.
Expand All @@ -45,15 +46,14 @@ def test_MayaDefaultMaterial(self):
cmds.refresh()
self.assertSnapshotClose("defaultMaterial" + ".png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT)

@unittest.skipUnless(platform.system() != "Darwin", 'This test is disabled on OSX as not all implicit surfaces are fully implemented on OSX.')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who will support them on OSX? If it's us, should we track via a ticket?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should take the ownership of those on OSX.
We should see if a ticket is logged in OpenUSD about that and if not log one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created PixarAnimationStudios/OpenUSD#3305 in the OpenUSd github to see if there is already something logged.

def test_MayaDefaultMaterialUsdPrims(self):
# open a Maya scene with usd prims (sphere, capsule, cube, cylinder ...)
testFile = mayaUtils.openTestScene(
"testDefaultMaterial",
"testMayaDefaultMaterial_Usd_proceduralShapes.ma", useTestSettings=False)
cmds.refresh()

#Cone and cylinder_1 are not supported on OSX with USD 24.05 so they are not in our test scene

#Use Default Material
panel = mayaUtils.activeModelPanel()
cmds.modelEditor(panel, edit=True, useDefaultMaterial=True)
Expand Down
Loading