# =============================================================================
# IMPORTS
# =============================================================================

import hou

# =============================================================================
# FUNCTIONS
# =============================================================================

# -----------------------------------------------------------------------------
#    Name: oncreate(kwargs, node_type=None)
#  Raises: N/A
# Returns: None
#    Desc: Engine setting.
# -----------------------------------------------------------------------------

def oncreate(kwargs, node_type=None):
	node = kwargs["node"]
	# -----------------------------------------------------------------------------
	#    Desc: Set studio debug color. 
	# -----------------------------------------------------------------------------

	node.setColor(hou.Color( (0.0, 0.6, 1.0) ) )

	# -----------------------------------------------------------------------------
	#    Desc: Set the frange ranges to be non-variable based.
	# -----------------------------------------------------------------------------

	if node.parm('f1') and node.parm('f2') :
		timeRange = hou.playbar.timelineRange()

		node.parm('f1').deleteAllKeyframes()
		node.parm('f1').set(timeRange[0])

		node.parm('f2').deleteAllKeyframes()
		node.parm('f2').set(timeRange[1])