OSL mx_geompropvalue_filename never returns the geomprop value
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- computer-graphics
Research direction
Open libraries/stdlib/genosl/mx_geompropvalue_filename.osl and inspect the getattribute condition in mx_geompropvalue_filename. Verify the success and failure paths, then correct the condition so the geomprop filename replaces the default only when the attribute is found; done means the found value is returned and the default remains otherwise.
Written by the indexing model from the issue text.
Description
I'm no OSL expoert, but it appears as though the found geomprop is only assigned when it is not found, i.e. it's never assigned:
void mx_geompropvalue_filename(string geomprop, textureresource defaultVal, output textureresource out)
{
// Initialize to the default
out = defaultVal;
// Replace the filename component from the geomprop
string defaultFilename = defaultVal.filename;
if (getattribute(geomprop, defaultFilename) == 0) // <--- this should be == 1 I think?
out.filename = defaultFilename;
}
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 464
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AcademySoftwareFoundation/MaterialX
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AcademySoftwareFoundation/MaterialX#2896 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AcademySoftwareFoundation/MaterialX#2704 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
All issues in AcademySoftwareFoundation/MaterialX
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·