I am trying to print all of the looks that are installed inside of the colormanagement look enum. Currently I have:

for look in bpy.context.scene.view_settings.bl_rna.properties['look'].enum_items:

but what this gives me is

Do not modify image in an artistic manner

and nothing else.

It does not change from None when you select a different look. How can I make this print each possible value?

  • 1
    $\begingroup$ Added color management and removed my answer. Generally you can list the enum property members by looking at bl_rna.properties["the_enum_prop"].enum_items this doesn't appear to be the case for color management enums. btw in your question you are pretty much saying for character in string. $\endgroup$ – batFINGER Nov 5 '16 at 16:03
  • $\begingroup$ I updated the question. $\endgroup$ – John Roper Nov 5 '16 at 20:16
  • $\begingroup$ You can get the looks from the version/datafiles/colormanagement/config.ocio data file. Could use opencolorio.org/developers/bindings/PythonAPI.html or parse the file for `- !<Look>' and the details there. The items list of the enum is prob populated in source code based on this file. $\endgroup$ – batFINGER Nov 6 '16 at 4:44
  • $\begingroup$ ok, I will take a look into it. $\endgroup$ – John Roper Nov 8 '16 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.