diff --git a/direct/src/directdevices/DirectDeviceManager.py b/direct/src/directdevices/DirectDeviceManager.py index 9744d05bdf..78c8615bdf 100644 --- a/direct/src/directdevices/DirectDeviceManager.py +++ b/direct/src/directdevices/DirectDeviceManager.py @@ -48,10 +48,10 @@ class DirectButtons(ButtonNode, DirectObject): def __init__(self, vrpnClient, device): # Keep track of number of buttons created DirectButtons.buttonCount += 1 - # Create a unique name for this button object - self.name = 'DirectButtons-' + repr(DirectButtons.buttonCount) # Create a new button node for the given device ButtonNode.__init__(self, vrpnClient, device) + # Create a unique name for this button object + self.name = 'DirectButtons-' + repr(DirectButtons.buttonCount) # Attach node to data graph self.nodePath = myBase.dataRoot.attachNewNode(self) @@ -86,10 +86,10 @@ class DirectAnalogs(AnalogNode, DirectObject): def __init__(self, vrpnClient, device): # Keep track of number of analogs created DirectAnalogs.analogCount += 1 - # Create a unique name for this analog object - self.name = 'DirectAnalogs-' + repr(DirectAnalogs.analogCount) # Create a new analog node for the given device AnalogNode.__init__(self, vrpnClient, device) + # Create a unique name for this analog object + self.name = 'DirectAnalogs-' + repr(DirectAnalogs.analogCount) # Attach node to data graph self.nodePath = myBase.dataRoot.attachNewNode(self) # See if any of the general analog parameters are dconfig'd @@ -182,10 +182,10 @@ class DirectTracker(TrackerNode, DirectObject): def __init__(self, vrpnClient, device): # Keep track of number of trackers created DirectTracker.trackerCount += 1 - # Create a unique name for this tracker object - self.name = 'DirectTracker-' + repr(DirectTracker.trackerCount) # Create a new tracker node for the given device TrackerNode.__init__(self, vrpnClient, device) + # Create a unique name for this tracker object + self.name = 'DirectTracker-' + repr(DirectTracker.trackerCount) # Attach node to data graph self.nodePath = myBase.dataRoot.attachNewNode(self) @@ -209,10 +209,10 @@ class DirectDials(DialNode, DirectObject): def __init__(self, vrpnClient, device): # Keep track of number of dials created DirectDials.dialCount += 1 - # Create a unique name for this dial object - self.name = 'DirectDials-' + repr(DirectDials.dialCount) # Create a new dial node for the given device DialNode.__init__(self, vrpnClient, device) + # Create a unique name for this dial object + self.name = 'DirectDials-' + repr(DirectDials.dialCount) # Attach node to data graph self.nodePath = myBase.dataRoot.attachNewNode(self) @@ -249,6 +249,8 @@ class DirectTimecodeReader(AnalogNode, DirectObject): def __init__(self, vrpnClient, device): # Keep track of number of timecodeReader created DirectTimecodeReader.timecodeReaderCount += 1 + # Create a new dial node for the given device + AnalogNode.__init__(self, vrpnClient, device) # Create a unique name for this dial object self.name = ('DirectTimecodeReader-' + repr(DirectTimecodeReader.timecodeReaderCount)) @@ -257,8 +259,6 @@ class DirectTimecodeReader(AnalogNode, DirectObject): self.seconds = 0 self.minutes = 0 self.hours = 0 - # Create a new dial node for the given device - AnalogNode.__init__(self, vrpnClient, device) # Attach node to data graph self.nodePath = myBase.dataRoot.attachNewNode(self)