Skip to content

Commit 1a50b2f

Browse files
author
Graphos
committed
Use VIEWCOLOR_HANDLES if R21 or more for py-rounded_tube
closes #5
1 parent 95f7a37 commit 1a50b2f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/py-rounded_tube_r13/py-rounded_tube_r13.pyp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,8 @@ class RoundedTube(c4d.plugins.ObjectData, RoundedTubeHelper):
390390
# Iterates over our handle count and draw them
391391
for i in xrange(self.HANDLECOUNT):
392392
# Defines the color of the handle according of the hovered state of the object.
393-
hoverColor = c4d.VIEWCOLOR_SELECTION_PREVIEW if hitId == i else c4d.VIEWCOLOR_ACTIVEPOINT
393+
handleColorFlag = c4d.VIEWCOLOR_HANDLES if c4d.GetC4DVersion() > 20000 else c4d.VIEWCOLOR_ACTIVEPOINT
394+
hoverColor = c4d.VIEWCOLOR_SELECTION_PREVIEW if hitId == i else handleColorFlag
394395
bd.SetPen(c4d.GetViewColor(hoverColor))
395396

396397
# Retrieves the information of the current handle.
@@ -401,7 +402,7 @@ class RoundedTube(c4d.plugins.ObjectData, RoundedTubeHelper):
401402
bd.DrawHandle(info.position, c4d.DRAWHANDLE_BIG, 0)
402403

403404
# Sets the color back to normal before drawing lines
404-
bd.SetPen(c4d.GetViewColor(c4d.VIEWCOLOR_ACTIVEPOINT))
405+
bd.SetPen(c4d.GetViewColor(handleColorFlag))
405406

406407
# Draws the lines 0, 1, 2 are draw in the same drawcall
407408
if i is 0:

0 commit comments

Comments
 (0)