general: no more iPos, iPosHpr, iPosHprScale

they're all deprecated
This commit is contained in:
John Cote 2019-11-23 17:30:18 -05:00
parent 9c053371da
commit 10f827e2bd
7 changed files with 20 additions and 20 deletions

View file

@ -23,7 +23,7 @@ class Wake(NodePath):
def createRipple(self, zPos, rate = 1.0, startFrame = 0): def createRipple(self, zPos, rate = 1.0, startFrame = 0):
ripple = self.ripples.copyTo(self) ripple = self.ripples.copyTo(self)
ripple.iPos(self.target) ripple.setPos(self.target, 0, 0, 0)
ripple.setZ(render, zPos + self.rippleCount * 0.001) ripple.setZ(render, zPos + self.rippleCount * 0.001)
ripple.setBin('fixed', self.sortBase + self.rippleCount, 1) ripple.setBin('fixed', self.sortBase + self.rippleCount, 1)
seqNode = ripple.find('**/+SequenceNode').node() seqNode = ripple.find('**/+SequenceNode').node()

View file

@ -1139,7 +1139,7 @@ class DistributedCannon(DistributedObject.DistributedObject):
dot = normal.dot(vel) dot = normal.dot(vel)
self.notify.debug('--------------dot product = %s---------------' % dot) self.notify.debug('--------------dot product = %s---------------' % dot)
temp = render.attachNewNode('temp') temp = render.attachNewNode('temp')
temp.iPosHpr() temp.setPosHpr(0, 0, 0, 0, 0, 0)
temp.lookAt(Point3(normal)) temp.lookAt(Point3(normal))
temp.reparentTo(roof) temp.reparentTo(roof)
self.notify.debug('avatar pos = %s, landingPos = %s' % (avatar.getPos(), self.landingPos)) self.notify.debug('avatar pos = %s, landingPos = %s' % (avatar.getPos(), self.landingPos))

View file

@ -190,7 +190,7 @@ class MovableObject(NodePath, DirectObject):
else: else:
self.setIsTable(0) self.setIsTable(0)
m = self.getTransform() m = self.getTransform()
self.iPosHpr() self.setPosHpr(0, 0, 0, 0, 0, 0)
bMin, bMax = self.bounds = self.getTightBounds() bMin, bMax = self.bounds = self.getTightBounds()
bMin -= Vec3(0.1, 0.1, 0) bMin -= Vec3(0.1, 0.1, 0)
bMax += Vec3(0.1, 0.1, 0) bMax += Vec3(0.1, 0.1, 0)
@ -559,7 +559,7 @@ class ObjectManager(NodePath, DirectObject):
self.selectedObject.collisionNodePath.stash() self.selectedObject.collisionNodePath.stash()
self.selectedObject.dfitem.startAdjustPosHpr() self.selectedObject.dfitem.startAdjustPosHpr()
self.firstTime = 1 self.firstTime = 1
self.iPosHpr() self.setPosHpr(0, 0, 0, 0, 0, 0)
self.startPoseValid = 0 self.startPoseValid = 0
self.centerMarker['image'] = self.grabDown self.centerMarker['image'] = self.grabDown
self.centerMarker.configure(text=TTLocalizer.HDMoveLabel, text_pos=(0, 1), text_scale=0.7, text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), image_scale=0.3) self.centerMarker.configure(text=TTLocalizer.HDMoveLabel, text_pos=(0, 1), text_scale=0.7, text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), image_scale=0.3)
@ -580,7 +580,7 @@ class ObjectManager(NodePath, DirectObject):
def moveObjectTask(self, state): def moveObjectTask(self, state):
so = self.selectedObject so = self.selectedObject
target = self.targetNodePath target = self.targetNodePath
self.startPose.iPosHpr(so) self.startPose.setPosHpr(so, 0, 0, 0, 0, 0, 0)
self.iRay.setParentNP(base.cam) self.iRay.setParentNP(base.cam)
entry = self.iRay.pickBitMask(bitMask=ToontownGlobals.FurnitureDragBitmask, targetNodePath=target, skipFlags=SKIP_BACKFACE | SKIP_CAMERA | SKIP_UNPICKABLE) entry = self.iRay.pickBitMask(bitMask=ToontownGlobals.FurnitureDragBitmask, targetNodePath=target, skipFlags=SKIP_BACKFACE | SKIP_CAMERA | SKIP_UNPICKABLE)
if not entry: if not entry:
@ -590,8 +590,8 @@ class ObjectManager(NodePath, DirectObject):
self.moveObjectInit() self.moveObjectInit()
self.firstTime = 0 self.firstTime = 0
else: else:
self.gridSnapNP.iPos() self.gridSnapNP.setPos(0, 0, 0)
self.collisionOffsetNP.iPosHpr() self.collisionOffsetNP.setPosHpr(0, 0, 0, 0, 0, 0)
if self.gridSpacing: if self.gridSpacing:
pos = self.dragPointNP.getPos(target) pos = self.dragPointNP.getPos(target)
self.gridSnapNP.setPos(target, ROUND_TO(pos[0], self.gridSpacing), ROUND_TO(pos[1], self.gridSpacing), pos[2]) self.gridSnapNP.setPos(target, ROUND_TO(pos[0], self.gridSpacing), ROUND_TO(pos[1], self.gridSpacing), pos[2])
@ -770,7 +770,7 @@ class ObjectManager(NodePath, DirectObject):
return return
so = self.selectedObject so = self.selectedObject
so.dfitem.startAdjustPosHpr() so.dfitem.startAdjustPosHpr()
self.iPosHpr(so) self.setPosHpr(so, 0, 0, 0, 0, 0, 0)
self.moveObjectInit() self.moveObjectInit()
if so.getOnWall(): if so.getOnWall():
startR = self.gridSnapNP.getR() startR = self.gridSnapNP.getR()
@ -794,7 +794,7 @@ class ObjectManager(NodePath, DirectObject):
return return
so = self.selectedObject so = self.selectedObject
so.dfitem.startAdjustPosHpr() so.dfitem.startAdjustPosHpr()
self.iPosHpr(so) self.setPosHpr(so, 0, 0, 0, 0, 0, 0)
self.moveObjectInit() self.moveObjectInit()
if so.getOnWall(): if so.getOnWall():
startR = self.gridSnapNP.getR() startR = self.gridSnapNP.getR()
@ -815,8 +815,8 @@ class ObjectManager(NodePath, DirectObject):
def moveObjectInit(self): def moveObjectInit(self):
self.dragPointNP.setPosHpr(self.selectedObject, self.selectedObject.dragPoint, Vec3(0)) self.dragPointNP.setPosHpr(self.selectedObject, self.selectedObject.dragPoint, Vec3(0))
self.gridSnapNP.iPosHpr() self.gridSnapNP.setPosHpr(0, 0, 0, 0, 0, 0)
self.collisionOffsetNP.iPosHpr() self.collisionOffsetNP.setPosHpr(0, 0, 0, 0, 0, 0)
self.selectedObject.wrtReparentTo(self.collisionOffsetNP) self.selectedObject.wrtReparentTo(self.collisionOffsetNP)
def resetFurniture(self): def resetFurniture(self):
@ -1268,7 +1268,7 @@ class ObjectManager(NodePath, DirectObject):
for object in self.objectDict.values(): for object in self.objectDict.values():
object.stashBuiltInCollisionNodes() object.stashBuiltInCollisionNodes()
self.gridSnapNP.iPosHpr() self.gridSnapNP.setPosHpr(0, 0, 0, 0, 0, 0)
target = self.targetNodePath target = self.targetNodePath
self.iRay.setParentNP(base.localAvatar) self.iRay.setParentNP(base.localAvatar)
entry = self.iRay.pickBitMask3D(bitMask=ToontownGlobals.WallBitmask, targetNodePath=target, origin=Point3(0, 0, 6), dir=Vec3(0, 1, 0), skipFlags=SKIP_BACKFACE | SKIP_CAMERA | SKIP_UNPICKABLE) entry = self.iRay.pickBitMask3D(bitMask=ToontownGlobals.WallBitmask, targetNodePath=target, origin=Point3(0, 0, 6), dir=Vec3(0, 1, 0), skipFlags=SKIP_BACKFACE | SKIP_CAMERA | SKIP_UNPICKABLE)

View file

@ -858,7 +858,7 @@ class DistributedCannonGame(DistributedMinigame):
s = Sequence(Wait(0.5), toon.posInterval(duration=LAND_TIME - 0.5, pos=hitPos, blendType='easeIn')) s = Sequence(Wait(0.5), toon.posInterval(duration=LAND_TIME - 0.5, pos=hitPos, blendType='easeIn'))
self.toonIntervalDict[task.info['avId']] = s self.toonIntervalDict[task.info['avId']] = s
s.start() s.start()
avatar.iPos() avatar.setPos(0, 0, 0)
avatar.pose('slip-forward', 25) avatar.pose('slip-forward', 25)
base.playSfx(self.sndHitTower) base.playSfx(self.sndHitTower)
elif task.info['hitWhat'] == self.HIT_GROUND: elif task.info['hitWhat'] == self.HIT_GROUND:

View file

@ -153,7 +153,7 @@ class DistributedTravelGame(DistributedMinigame):
key = self.keys[i] key = self.keys[i]
key.setTwoSided(1) key.setTwoSided(1)
ref = self.trolleyCar.attachNewNode('key' + `i` + 'ref') ref = self.trolleyCar.attachNewNode('key' + `i` + 'ref')
ref.iPosHpr(key) ref.setPosHpr(key, 0, 0, 0, 0, 0, 0)
self.keyRef.append(ref) self.keyRef.append(ref)
self.keyInit.append(key.getTransform()) self.keyInit.append(key.getTransform())
@ -164,7 +164,7 @@ class DistributedTravelGame(DistributedMinigame):
for i in range(self.numFrontWheels): for i in range(self.numFrontWheels):
wheel = self.frontWheels[i] wheel = self.frontWheels[i]
ref = self.trolleyCar.attachNewNode('frontWheel' + `i` + 'ref') ref = self.trolleyCar.attachNewNode('frontWheel' + `i` + 'ref')
ref.iPosHpr(wheel) ref.setPosHpr(wheel, 0, 0, 0, 0, 0, 0)
self.frontWheelRef.append(ref) self.frontWheelRef.append(ref)
self.frontWheelInit.append(wheel.getTransform()) self.frontWheelInit.append(wheel.getTransform())
@ -175,7 +175,7 @@ class DistributedTravelGame(DistributedMinigame):
for i in range(self.numBackWheels): for i in range(self.numBackWheels):
wheel = self.backWheels[i] wheel = self.backWheels[i]
ref = self.trolleyCar.attachNewNode('backWheel' + `i` + 'ref') ref = self.trolleyCar.attachNewNode('backWheel' + `i` + 'ref')
ref.iPosHpr(wheel) ref.setPosHpr(wheel, 0, 0, 0, 0, 0, 0)
self.backWheelRef.append(ref) self.backWheelRef.append(ref)
self.backWheelInit.append(wheel.getTransform()) self.backWheelInit.append(wheel.getTransform())

View file

@ -62,7 +62,7 @@ class DistributedTrolley(DistributedObject.DistributedObject):
key = self.keys[i] key = self.keys[i]
key.setTwoSided(1) key.setTwoSided(1)
ref = self.trolleyCar.attachNewNode('key' + `i` + 'ref') ref = self.trolleyCar.attachNewNode('key' + `i` + 'ref')
ref.iPosHpr(key) ref.setPosHpr(key, 0, 0, 0, 0, 0, 0)
self.keyRef.append(ref) self.keyRef.append(ref)
self.keyInit.append(key.getTransform()) self.keyInit.append(key.getTransform())
@ -73,7 +73,7 @@ class DistributedTrolley(DistributedObject.DistributedObject):
for i in range(self.numFrontWheels): for i in range(self.numFrontWheels):
wheel = self.frontWheels[i] wheel = self.frontWheels[i]
ref = self.trolleyCar.attachNewNode('frontWheel' + `i` + 'ref') ref = self.trolleyCar.attachNewNode('frontWheel' + `i` + 'ref')
ref.iPosHpr(wheel) ref.setPosHpr(wheel, 0, 0, 0, 0, 0, 0)
self.frontWheelRef.append(ref) self.frontWheelRef.append(ref)
self.frontWheelInit.append(wheel.getTransform()) self.frontWheelInit.append(wheel.getTransform())
@ -84,7 +84,7 @@ class DistributedTrolley(DistributedObject.DistributedObject):
for i in range(self.numBackWheels): for i in range(self.numBackWheels):
wheel = self.backWheels[i] wheel = self.backWheels[i]
ref = self.trolleyCar.attachNewNode('backWheel' + `i` + 'ref') ref = self.trolleyCar.attachNewNode('backWheel' + `i` + 'ref')
ref.iPosHpr(wheel) ref.setPosHpr(wheel, 0, 0, 0, 0, 0, 0)
self.backWheelRef.append(ref) self.backWheelRef.append(ref)
self.backWheelInit.append(wheel.getTransform()) self.backWheelInit.append(wheel.getTransform())

View file

@ -40,7 +40,7 @@ class SuitAvatarPanel(AvatarPanel.AvatarPanel):
dept = SuitDNA.getSuitDeptFullname(avatar.dna.name) dept = SuitDNA.getSuitDeptFullname(avatar.dna.name)
self.levelLabel = DirectLabel(parent=self.frame, pos=(0, 0, -0.1), relief=None, text=TTLocalizer.AvatarPanelCogLevel % level, text_font=avatar.getFont(), text_align=TextNode.ACenter, text_fg=Vec4(0, 0, 0, 1), text_pos=(0, 0), text_scale=0.05, text_wordwrap=8.0) self.levelLabel = DirectLabel(parent=self.frame, pos=(0, 0, -0.1), relief=None, text=TTLocalizer.AvatarPanelCogLevel % level, text_font=avatar.getFont(), text_align=TextNode.ACenter, text_fg=Vec4(0, 0, 0, 1), text_pos=(0, 0), text_scale=0.05, text_wordwrap=8.0)
corpIcon = avatar.corpMedallion.copyTo(hidden) corpIcon = avatar.corpMedallion.copyTo(hidden)
corpIcon.iPosHprScale() corpIcon.setPosHprScale(0, 0, 0, 0, 0, 0, 0, 0, 0)
self.corpIcon = DirectLabel(parent=self.frame, geom=corpIcon, geom_scale=0.13, pos=(0, 0, -0.175), relief=None) self.corpIcon = DirectLabel(parent=self.frame, geom=corpIcon, geom_scale=0.13, pos=(0, 0, -0.175), relief=None)
corpIcon.removeNode() corpIcon.removeNode()
self.deptLabel = DirectLabel(parent=self.frame, pos=(0, 0, -0.28), relief=None, text=dept, text_font=avatar.getFont(), text_align=TextNode.ACenter, text_fg=Vec4(0, 0, 0, 1), text_pos=(0, 0), text_scale=0.05, text_wordwrap=8.0) self.deptLabel = DirectLabel(parent=self.frame, pos=(0, 0, -0.28), relief=None, text=dept, text_font=avatar.getFont(), text_align=TextNode.ACenter, text_fg=Vec4(0, 0, 0, 1), text_pos=(0, 0), text_scale=0.05, text_wordwrap=8.0)