Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Python command attributeQuery doesn't return values on colorspace

Anonymous

Python command attributeQuery doesn't return values on colorspace

Anonymous
Not applicable

Hi Hive Mind,

 

I am trying this command for getting the available colorspace values for a given image plane in Python:

 

print cmds.attributeQuery('colorSpace', n='<nameOfImagePlane>', le=True)

But this returns 'none'

 

Surprisingly it works for the rest of the attributes of an imagePlane like 'type', 'displayMode', 'textureFilter' etc. returning the available values in them and just doesn't work for the 'colorSpace' attribute.

 

Can anyone explain why it could do that and advice any solution for " getting the available colorspaces of a given imagePlane "

 

Thank you!
Sravan

 

@Anonymous 

@coding

 

0 Likes
Reply
Accepted solutions (1)
859 Views
5 Replies
Replies (5)

mspeer
Consultant
Consultant

Hi!

This is not an enum,

it's just a simple string, you can get the current value with getAttr.

 

If you want to get all available Color Space values try colorManagementCatalog or colorManagementPrefs .

 

jordan.giboney
Autodesk Support
Autodesk Support

Hi @Anonymous 

 

Thanks for posting! Did @mspeer's post sufficiently answer your questions? Anything else we can help with?

 

If you are all set, please consider marking the thread as solved by clicking the "Accept Solution" button - this will help other Maya users find their answers faster.

 

Thanks again for being a part of our community!



Jordan Giboney
Technical Solutions Engineer | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA


Anonymous
Not applicable

Hi @mspeer ,

 

Thank you for the reply. getAttr can only give us the current value like you mentioned. But I need a list of all available values. Looks like ColorManagementCatalog or Prefs is for colorspaces of the viewport ?

 

I am looking for the attribute of colorSpaces on the imagePlane in particular (when you select an imagePlane and open the attribute editor you can see a dropdown list for selecting colorspaces). Would you say colorManagement also points to the same ?

0 Likes

mspeer
Consultant
Consultant
Accepted solution

Hi!

Yes, that's what I wanted to say.

You you can't get these values directly from the image plane, the drop down list shows all options provided by the Color Management, these are not individual options of the current image plane node.

Anonymous
Not applicable

Hi @mspeer ,

 

Thank you for your input on this.

I understood the connection and found exactly what I was looking for in the colorManagement Prefs:

cmds.colorManagementPrefs(q=True, inputSpaceNames=True)

 

Many thanks,

Cheers,

Sravan

0 Likes