[Py] c4d.GetViewColor returns mostly Vector(0)

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 23/02/2012 at 08:13, xxxxxxxx wrote:

User Information:
Cinema 4D Version:    
Platform:      
Language(s) :

---------
Checked in R12 and R13. The following are the constants for which c4d.GetViewColor does not return Vector(0).

COLORBYTES_ACMYK  
COLORBYTES_AGRAY  
COLORBYTES_AGRAYf  
COLORBYTES_ARGB  
COLORBYTES_ARGBf  
COLORBYTES_CMYK  
COLORBYTES_GRAY  
COLORBYTES_GRAYf  
COLORBYTES_MAX  
COLORBYTES_RGB  
COLORBYTES_RGBf  
COLORMODE_ACMYK  
COLORMODE_AGRAY  
COLORMODE_AGRAYw  
COLORMODE_ALPHA  
COLORMODE_AMASK  
COLORMODE_ARGB  
COLORMODE_ARGBf  
COLORMODE_ARGBw  
COLORMODE_CMYK  
COLORMODE_GRAY  
COLORMODE_GRAYw  
COLORMODE_ILLEGAL  
COLORMODE_ILLEGALw  
COLORMODE_MASK  
COLORMODE_MASKf  
COLORMODE_MASKw  
COLORMODE_RGB  
COLORMODE_RGBf  
COLORMODE_RGBw  
COLORPROFILEINFO_COPYRIGHT  
COLORPROFILEINFO_DESCRIPTION  
COLORPROFILEINFO_MANUFACTURER  
COLORPROFILEINFO_MODEL  
COLORSPACETRANSFORMATION_LINEAR_TO_SRGB  
COLORSPACETRANSFORMATION_LINEAR_TO_VIEW  
COLORSPACETRANSFORMATION_NONE  
COLORSPACETRANSFORMATION_SRGB_TO_LINEAR  
COLORSPACETRANSFORMATION_SRGB_TO_VIEW  
COLORSYSTEM_HSV  
COLORSYSTEM_HSVTAB  
COLORSYSTEM_HSV_COLOR  
COLORSYSTEM_RANGE_255  
COLORSYSTEM_RANGE_65535  
COLORSYSTEM_RANGE_DEGREE  
COLORSYSTEM_RANGE_PERCENT  
COLORSYSTEM_RGB  
COLORSYSTEM_RGB_COLOR

The following are the constants for which it returns Vector(0). I don't see that much black in Cinema 4D, that's why it seems like a bug to me.

COLORMAPPING_BACKGROUND  
COLORMAPPING_BRIGHTMULTIPLIER  
COLORMAPPING_DARKMULTIPLIER  
COLORMAPPING_EXPONENTIAL  
COLORMAPPING_HSV  
COLORMODE_AGRAYf  
COLORMODE_GRAYf  
COLORMODE_ILLEGALf  
COLORMODE_MAXCOLOR  
COLORSHADER_BRIGHTNESS  
COLORSHADER_COLOR  
COLORSYSTEM_TABLE  
COLOR_3DTEXT  
COLOR_AM_ANIMDOT  
COLOR_AM_ANIMDOT_CHANGED  
COLOR_AM_ANIMDOT_MUTED  
COLOR_AM_BPDOT  
COLOR_B  
COLOR_BG  
COLOR_BGEDIT  
COLOR_BGFOCUS  
COLOR_BGGADGET  
COLOR_BGSELECTEDTEXT  
COLOR_BGTRISTATE  
COLOR_BG_DARK1  
COLOR_BG_DARK2  
COLOR_BG_GROUP1  
COLOR_BG_GROUP2  
COLOR_BG_GROUPBAR1  
COLOR_BG_GROUPBAR2  
COLOR_BG_MM_E_ACTIVE_LAYER  
COLOR_BG_MM_E_ACTIVE_TEXTURE  
COLOR_BG_MM_E_INACTIVE_LAYER  
COLOR_BG_MM_E_INACTIVE_TEXTURE  
COLOR_BG_MM_E_SELECTED_LAYER  
COLOR_BG_PALETTE  
COLOR_BG_TEXTUREVIEW  
COLOR_BORDER_ACTIVE_1  
COLOR_BORDER_ACTIVE_3  
COLOR_BORDER_ACTIVE_4  
COLOR_BORDER_PALETTE  
COLOR_BUBBLE_BG  
COLOR_BUBBLE_BORDER  
COLOR_BUBBLE_FG  
COLOR_CONSOLE_BG  
COLOR_CONSOLE_TEXT  
COLOR_CONTENTBROWSER_BG_TEXT_ACT  
COLOR_CONTENTBROWSER_BG_TEXT_INACT  
COLOR_CONTENTBROWSER_FG_TEXT_ACT  
COLOR_CONTENTBROWSER_FG_TEXT_INACT  
COLOR_CONTENTBROWSER_NOTAVAILABLE  
COLOR_CONTENTBROWSER_TEXT  
COLOR_CTIMELINE_BG  
COLOR_CTIMELINE_BGOUTSIDE  
COLOR_CTIMELINE_BGPREVIEW  
COLOR_CTIMELINE_BREAKDOWN  
COLOR_CTIMELINE_CLIP  
COLOR_CTIMELINE_CLIPMASTER  
COLOR_CTIMELINE_CLIPTEXT  
COLOR_CTIMELINE_CLIPTEXTHL  
COLOR_CTIMELINE_CURRENTFRAME  
COLOR_CTIMELINE_CURSORINDICATOR  
COLOR_CTIMELINE_FCHIGHLIGHT  
COLOR_CTIMELINE_FCKEY  
COLOR_CTIMELINE_FCSELECTION  
COLOR_CTIMELINE_GENERAL  
COLOR_CTIMELINE_GREY  
COLOR_CTIMELINE_GRID  
COLOR_CTIMELINE_GRIDTEXT  
COLOR_CTIMELINE_GRIDTEXTSUB  
COLOR_CTIMELINE_HIGHLIGHT  
COLOR_CTIMELINE_HLECURVE  
COLOR_CTIMELINE_KEYSYMBOLS  
COLOR_CTIMELINE_MARKER  
COLOR_CTIMELINE_MARKERTEXT  
COLOR_CTIMELINE_MASTERGREY  
COLOR_CTIMELINE_POSITION  
COLOR_CTIMELINE_REGIONAREA  
COLOR_CTIMELINE_ROTATION  
COLOR_CTIMELINE_SCALE  
COLOR_CTIMELINE_SELECTION  
COLOR_CTIMELINE_SELECTION2  
COLOR_CTIMELINE_SEQUENCE  
COLOR_CTIMELINE_SNAPSHOT  
COLOR_CTIMELINE_SPLINE  
COLOR_CTIMELINE_TANGENT  
COLOR_CTIMELINE_TANGENT2  
COLOR_CTIMELINE_TEXTCOLOR  
COLOR_DBARBG1  
COLOR_DBARBG2  
COLOR_DBARBG3  
COLOR_DBARFG1  
COLOR_DBARFG2  
COLOR_DEPRECATED_XOR  
COLOR_DUMMY_  
COLOR_EDGEBL  
COLOR_EDGEDK  
COLOR_EDGELT  
COLOR_EDGEWH  
COLOR_EMBOSS_DK  
COLOR_EMBOSS_WH  
COLOR_FGSELECTEDTEXT  
COLOR_FG_MM_E_ACTIVE_LAYER  
COLOR_FG_MM_E_ACTIVE_TEXTURE  
COLOR_FG_MM_E_INACTIVE_LAYER  
COLOR_FG_MM_E_INACTIVE_TEXTURE  
COLOR_FG_MM_E_SELECTED_LAYER  
COLOR_G  
COLOR_ICONS_BG_ACTIVE  
COLOR_MATERIALMANAGER_BG  
COLOR_MATERIALMANAGER_SELECTED  
COLOR_MATERIALMANAGER_TEXT  
COLOR_MATERIALMANAGER_TEXT_SELECTED  
COLOR_MENU_BG  
COLOR_MENU_BG_BORDER  
COLOR_MENU_BG_ICON  
COLOR_MENU_BG_SELECTED  
COLOR_MENU_BORDER_DK  
COLOR_MENU_BORDER_WH  
COLOR_MENU_TEXT  
COLOR_MENU_TEXT_DISABLED  
COLOR_MENU_TEXT_SELECTED  
COLOR_PAINTER_SELECTED  
COLOR_PAINTER_TREE  
COLOR_PALETTE_SEPARATOR  
COLOR_PALETTE_TEXT  
COLOR_PALETTE_TEXT_DISABLED  
COLOR_PALETTE_TEXT_SELECTED  
COLOR_POWERBG  
COLOR_POWERBGDRAG  
COLOR_POWEREDGE  
COLOR_POWERFRAME  
COLOR_POWERFRAMEDRAG  
COLOR_POWERFRAMEMARKER  
COLOR_POWERHANDLEDRAG  
COLOR_POWERKEYP  
COLOR_POWERKEYR  
COLOR_POWERKEYS  
COLOR_POWERKEYSELECTED  
COLOR_POWERKEYUNSELECTED  
COLOR_POWERLOOP  
COLOR_POWERSELECTED  
COLOR_POWERSLIDEBG  
COLOR_POWERSLIDEHANDLES  
COLOR_POWERSOUND  
COLOR_PROGRESSBAR  
COLOR_PV_ASAFE  
COLOR_PV_BUCKET  
COLOR_PV_CACHE  
COLOR_PV_COMPARE  
COLOR_PV_FPS  
COLOR_PV_FULLBG  
COLOR_PV_FULLBOR  
COLOR_PV_FULLELE  
COLOR_PV_FULLTXT  
COLOR_PV_HDHIGH  
COLOR_PV_HDLOW  
COLOR_PV_HDMED  
COLOR_PV_HISTO  
COLOR_PV_HISTOFILTER  
COLOR_PV_NAVIAREA  
COLOR_PV_NOTALL  
COLOR_PV_TEXT  
COLOR_PV_TSAFE  
COLOR_QUICKBAR_BG  
COLOR_QUICKBAR_BG2  
COLOR_QUICKBAR_TEXT  
COLOR_QUICKBAR_TEXT2  
COLOR_QUICKTAB_BG_ACTIVE  
COLOR_QUICKTAB_BG_ACTIVE_ALTERNATE1  
COLOR_QUICKTAB_BG_INACTIVE  
COLOR_QUICKTAB_BORDER  
COLOR_QUICKTAB_TEXT_ACTIVE  
COLOR_QUICKTAB_TEXT_INACTIVE  
COLOR_R  
COLOR_RM_ERROR  
COLOR_RM_FINISHED  
COLOR_RM_PROG  
COLOR_RM_QUEUE  
COLOR_RM_STOP  
COLOR_SB_BG1  
COLOR_SB_BG2  
COLOR_SB_LAYER_BORDER  
COLOR_SB_TEXT  
COLOR_SB_TEXTHG1  
COLOR_SB_TEXTHG2  
COLOR_SB_TEXT_ACTIVE1  
COLOR_SB_TEXT_ACTIVE2  
COLOR_SB_TEXT_BORDER  
COLOR_SB_TEXT_FOLDER_MAIN  
COLOR_SB_TEXT_FOLDER_SUB  
COLOR_SB_TREE1  
COLOR_SB_TREE2  
COLOR_SPREADSHEET_BG  
COLOR_SPREADSHEET_EDITBG  
COLOR_SPREADSHEET_EDITTEXT  
COLOR_SPREADSHEET_SELECTED  
COLOR_SPREADSHEET_TEXT  
COLOR_SYNTAX_CLASS  
COLOR_SYNTAX_COFFEE  
COLOR_SYNTAX_COMMENT  
COLOR_SYNTAX_COMMENTWRONG  
COLOR_SYNTAX_CONSTANT  
COLOR_SYNTAX_FUNCTION  
COLOR_SYNTAX_INCLUDE  
COLOR_SYNTAX_MEMBER  
COLOR_SYNTAX_STRING  
COLOR_TEXT  
COLOR_TEXTFOCUS  
COLOR_TEXT_BUTTON  
COLOR_TEXT_BUTTON_DISABLED  
COLOR_TEXT_COMBO  
COLOR_TEXT_COMBO_DISABLED  
COLOR_TEXT_DISABLED  
COLOR_TEXT_EDIT  
COLOR_TEXT_EDIT_DISABLED  
COLOR_TEXT_MENU  
COLOR_TEXT_MENU_DISABLED  
COLOR_TEXT_SELECTED  
COLOR_TEXT_SELECTED_DARK  
COLOR_TEXT_TAB  
COLOR_TEXT_TAB_ACTIVE  
COLOR_TEXT_TAB_DISABLED  
COLOR_TRACK_S  
COLOR_TRACK_X  
COLOR_TRACK_Y  
COLOR_TRACK_Z  
COLOR_TRANS  
COLOR_XOR  
EX_COLOR_BROWSER_LINES_SELECTED  
EX_COLOR_CTIMELINE_COLOR  
EX_COLOR_CTIMELINE_MASTER  
EX_COLOR_CTIMELINE_MASTERIDENTICAL  
EX_COLOR_CTIMELINE_PLA  
EX_COLOR_FCURVE_BG  
EX_COLOR_FCURVE_GRAY1  
EX_COLOR_FCURVE_GRAY2  
EX_COLOR_FCURVE_GRAY3  
EX_COLOR_FCURVE_LINES  
EX_COLOR_FCURVE_LLTGRAY  
EX_COLOR_FCURVE_MAINGRID  
EX_COLOR_FCURVE_POINTSELECTED  
EX_COLOR_FCURVE_SUBGRID  
EX_COLOR_FCURVE_TEXT  
EX_COLOR_OBJECTMANAGER_ACTIVECAMERA  
EX_COLOR_OBJECTMANAGER_BG  
EX_COLOR_OBJECTMANAGER_INACTIVECAMERA  
EX_COLOR_OBJECTMANAGER_SELECTEDTAG  
EX_COLOR_OBJECTMANAGER_TEXT  
EX_COLOR_OBJECTMANAGER_TEXT_ACTIVE  
EX_COLOR_OBJECTMANAGER_TEXT_ACTIVE2  
EX_COLOR_OBJECTMANAGER_TEXT_ACTIVE3  
EX_COLOR_OBJECTMANAGER_TREE  
EX_COLOR_TIMELINE  
EX_COLOR_TIMELINESCROLLER_CURRENT  
EX_COLOR_TIMELINESCROLLER_MINMAX  
EX_COLOR_TIMELINE_BG  
EX_COLOR_TIMELINE_BG_DARK  
EX_COLOR_TIMELINE_LAYER0  
EX_COLOR_TIMELINE_LAYER1  
EX_COLOR_TIMELINE_LAYER2  
EX_COLOR_TIMELINE_LAYER3  
EX_COLOR_TIMELINE_LAYER4  
EX_COLOR_TIMELINE_LAYER5  
EX_COLOR_TIMELINE_LAYER6  
EX_COLOR_TIMELINE_LAYER7  
EX_COLOR_TIMELINE_LINES  
EX_COLOR_TIMELINE_LINES_SEL  
EX_COLOR_TIMELINE_LINES_SEPARATOR1  
EX_COLOR_TIMELINE_LINES_SEPARATOR2  
EX_COLOR_TIMELINE_LOOP  
EX_COLOR_TIMELINE_SELECTION  
EX_COLOR_TIMELINE_TEXT  
EX_COLOR_TIMELINE_TEXT_SELECTED  
EX_COLOR_TIMELINE_TEXT_SELECTED2  
EX_COLOR_TIMELINE_TICKS1  
EX_COLOR_TIMELINE_TICKS2  
EX_COLOR_TIMELINE_TREE

There are also some third-party constants (that don't start with EX_COLOR or COLOR) for which c4d.GetViewColor does not return Vector(0) and some, where it does.

This is the code I used to figure out all constants.

  
import c4d  
mode = "good"    # or "bad"  
  
if mode == "bad":  
  def compare(x) :  
      return x == c4d.Vector(0)  
elif mode == "good":  
  def compare(x) :  
      return x != c4d.Vector(0)  
  
for e in dir(c4d) :  
  if e.startswith("COLOR") or e.startswith("EX_COLOR") :  
      v = getattr(c4d, e, None)  
      if v is not None:  
          v = c4d.GetViewColor(v)  
          if compare(v) :  
              print e

Also, c4d.SetViewColor doesn't seem to work, too.

PS: @Maxon support: There are many bug-reports that are not replied, something like "Checked", "On our list!" or "Just fixed this issue" would be nice. 😕

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 24/02/2012 at 06:33, xxxxxxxx wrote:

The constants for GetViewColor start with VIEWCOLOR_ not COLOR_. This note will be added to the docs.
Btw, constants which start with EX_ are outdated and will not work. //closed

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 11/12/2012 at 01:11, xxxxxxxx wrote:

Is it possible to get the color value of the constant colors? I want to use the "General - Text"-Color in a treeview

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 11/12/2012 at 01:16, xxxxxxxx wrote:

Nevermind just found the GetColorRGB. And sorry didn't realize that this is located in the bug reports.