Votes
1
Product:
iClone 7
Version:
7.4
Status:
Assigned
Issue 5603
RRgb/RColor Issue
There seems to be some issue when using RRgb(r,g,b) and RColor(r,g,b,1.0)

When using one of the color constants everything is ok:
print(str(RLPy.RRgb.BLUE.Red())+" "+str(RLPy.RRgb.BLUE.Red())+" "+str(RLPy.RRgb.BLUE.Blue()))
OUTPUT: 0 0 255

When converting r, g, b values to an RRgb value there is a problem:
rgb = RLPy.RRgb(100,200,50)

print(str(rgb.Red())+" "+str(rgb.Green())+" "+str(rgb.Blue()))
OUTPUT: 25500 51000 12750

print(str(rgb.R())+" "+str(rgb.G())+" "+str(rgb.G()))
OUTPUT: 100.0 200.0 50.0

Same for converting r, g, b values to an RColor value, there is a problem:
rgbc = RLPy.RColor(100,200,50,1.0)

print("rgbc "+str(rgbc.Red())+" "+str(rgbc.Blue())+" "+str(rgbc.BLUE.Green()))
OUTPUT: 25500 51000 12750

print(str(rgbc.R())+" "+str(rgbc.G())+" "+str(rgbc.G()))
OUTPUT: 100.0 200.0 50.0

print(str(rgb.R())+" "+str(rgb.G())+" "+str(rgb.G()))
OUTPUT: 100.0 200.0 50.0

When using the AddDiffuseKey a RRgb value must be passed.
When using one of the color Constants (i.e. RRgb.BLUE) it works fine.
When using a custom color (i.e. RRgb(r,g,b)) it does not.
OS: Windows 7
  •  1
  •  910
Submitted byjlittle
1
COMMENTS (1)
AllenLee (RL)
Hi jlittle,

The value of the RRgb constructor must be in the range of 0 to -1.

Allen Lee
1