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-687 : fix a test related to Usd Ufe lights #12

Closed
wants to merge 1 commit into from

Conversation

lanierd-adsk
Copy link
Collaborator

No description provided.

@lanierd-adsk lanierd-adsk self-assigned this Nov 16, 2023
@lanierd-adsk
Copy link
Collaborator Author

@lanierd-adsk lanierd-adsk added the bug Something isn't working label Nov 16, 2023
@@ -35,7 +35,7 @@ bool IsUfeLight(const HdSceneIndexBasePtr& sceneIndex, const SdfPath& primPath)
}
// The shape prim is used to display the light's wireframe and is the only prim we want to allow
// for UFE lights
bool isShapePrim = primPath.GetElementString().find("ufeLightProxyShape") < std::string::npos;
bool isShapePrim = primPath.GetElementString().find("ufeLightProxy") < std::string::npos;
Copy link
Collaborator

@debloip-adsk debloip-adsk Nov 16, 2023

Choose a reason for hiding this comment

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

This seems wrong : if a prim comes in named ufeLightProxy, this method will now return false when it should return true. The original bug that this test looks for is that previously, MayaUSD added its lights both through UFE and through its UsdStageSceneIndex, which led to the light being present twice. The fix I did was to filter out the UFE light (ufeLightProxy), but not its wireframe display (ufeLightProxyShape). So conceptually, this method returns primPath == "ufeLightProxy" (I can't recall if there was a reason I didn't do this directly and instead used find calls). So if this test fails, to me this points to a different issue.

Copy link
Collaborator

@debloip-adsk debloip-adsk Nov 16, 2023

Choose a reason for hiding this comment

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

Follow-up : I've taken a look at this and it seems that even though we still filter the UFE lights correctly, the ufeLightProxyShape prims now have a parent ufeLightProxy prim which is essentially just an empty prim that has the shape prim as its child. But there is still no actual light prim being created, which is good. We just need to adjust the test accordingly. I've opened #14 to change the check to a more robust one than the one I previously did. As for the reason I used std::string::find, it's because the prim names contain id numbers (e.g. ufeLightProxy1).

@lanierd-adsk lanierd-adsk deleted the lanierd/HYDRA-687 branch July 18, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants