Skip to content

Add hasAlias method to ColorSpace and NamedTransform classes#2059

Merged
doug-walker merged 3 commits into
AcademySoftwareFoundation:mainfrom
annieln:hasAlias
Sep 27, 2024
Merged

Add hasAlias method to ColorSpace and NamedTransform classes#2059
doug-walker merged 3 commits into
AcademySoftwareFoundation:mainfrom
annieln:hasAlias

Conversation

@annieln
Copy link
Copy Markdown
Contributor

@annieln annieln commented Sep 26, 2024

Issue #2047

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Sep 26, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@carolalynn carolalynn added the devdays24 Label for PRs for Dev Days 2024. label Sep 26, 2024
Copy link
Copy Markdown
Collaborator

@doug-walker doug-walker left a comment

Choose a reason for hiding this comment

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

This is great work Annie! Really nice job on the unit tests!

There is one other part necessary so that the new method shows up in the Python binding too. Please update the files:
OpenColorIO/src/bindings/python/PyColorSpace.cpp
OpenColorIO/src/bindings/python/PyNamedTransform.cpp
OpenColorIO/tests/python/ColorSpaceTest.py
OpenColorIO/tests/python/NamedTransformTest.py

The syntax using for the Python bindings (pybind11) is a bit arcane, but you should be able to copy what you see for the other methods. Let us know if you have a question.

Comment thread src/OpenColorIO/NamedTransform.h Outdated
Comment thread src/OpenColorIO/ColorSpace.cpp Outdated
Signed-off-by: annie <annieyhlin09@gmail.com>
Signed-off-by: annie <annieyhlin09@gmail.com>
Signed-off-by: annie <annieyhlin09@gmail.com>
Copy link
Copy Markdown
Collaborator

@doug-walker doug-walker left a comment

Choose a reason for hiding this comment

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

This is excellent work, thank you so much Annie!

Copy link
Copy Markdown
Contributor

@KelSolaar KelSolaar left a comment

Choose a reason for hiding this comment

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

LGTM!

def test_aliases(self):
"""
Test NamedTransform aliases.
Test ColorSpace aliases.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice catch!

@doug-walker doug-walker merged commit 7fc59f8 into AcademySoftwareFoundation:main Sep 27, 2024
chrisnashdisguise pushed a commit to chrisnashdisguise/OpenColorIO that referenced this pull request Oct 30, 2024
…SoftwareFoundation#2059)

* Add hasAlias method to ColorSpace and NamedTransform classes

Signed-off-by: annie <annieyhlin09@gmail.com>

* minor style changes

Signed-off-by: annie <annieyhlin09@gmail.com>

* Update Python binding to include hasAlias method with unit tests

Signed-off-by: annie <annieyhlin09@gmail.com>

---------

Signed-off-by: annie <annieyhlin09@gmail.com>
Signed-off-by: Chris Nash <chris.nash@disguise.one>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devdays24 Label for PRs for Dev Days 2024.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants