general: loadModelNode() -> loadModel().node()

loadModelNode is deprecated
This commit is contained in:
John Cote 2019-11-23 17:16:07 -05:00
parent 2ae2175b8a
commit fee18165d1
3 changed files with 17 additions and 17 deletions

View file

@ -170,7 +170,7 @@ HeadModelDict = {'a': ('/models/char/suitA-', 4),
'c': ('/models/char/suitC-', 3.5)} 'c': ('/models/char/suitC-', 3.5)}
def loadTutorialSuit(): def loadTutorialSuit():
loader.loadModelNode('phase_3.5/models/char/suitC-mod') loader.loadModel('phase_3.5/models/char/suitC-mod').node()
loadDialog(1) loadDialog(1)
@ -195,10 +195,10 @@ def loadSuitModelsAndAnims(level, flag = 0):
if base.config.GetBool('want-new-cogs', 0): if base.config.GetBool('want-new-cogs', 0):
filepath = 'phase_3.5' + model + 'zero' filepath = 'phase_3.5' + model + 'zero'
if cogExists(model + 'zero.bam'): if cogExists(model + 'zero.bam'):
loader.loadModelNode(filepath) loader.loadModel(filepath).node()
else: else:
loader.loadModelNode('phase_3.5' + model + 'mod') loader.loadModel('phase_3.5' + model + 'mod').node()
loader.loadModelNode('phase_' + str(headPhase) + headModel + 'heads') loader.loadModel('phase_' + str(headPhase) + headModel + 'heads').node()
else: else:
if base.config.GetBool('want-new-cogs', 0): if base.config.GetBool('want-new-cogs', 0):
filepath = 'phase_3.5' + model + 'zero' filepath = 'phase_3.5' + model + 'zero'
@ -239,7 +239,7 @@ def loadSuitAnims(suit, flag = 1):
filePrefix = ModelDict[bodyType][0] filePrefix = ModelDict[bodyType][0]
animName = filePrefix + anim[1] animName = filePrefix + anim[1]
if flag: if flag:
loader.loadModelNode(animName) loader.loadModel(animName).node()
else: else:
loader.unloadModel(animName) loader.unloadModel(animName)

View file

@ -215,30 +215,30 @@ def loadModels():
for key in LegDict.keys(): for key in LegDict.keys():
fileRoot = LegDict[key] fileRoot = LegDict[key]
model = loader.loadModelNode('phase_3' + fileRoot + '1000') model = loader.loadModel('phase_3' + fileRoot + '1000').node()
Preloaded.append(model) Preloaded.append(model)
model = loader.loadModelNode('phase_3' + fileRoot + '500') model = loader.loadModel('phase_3' + fileRoot + '500').node()
Preloaded.append(model) Preloaded.append(model)
model = loader.loadModelNode('phase_3' + fileRoot + '250') model = loader.loadModel('phase_3' + fileRoot + '250').node()
Preloaded.append(model) Preloaded.append(model)
for key in TorsoDict.keys(): for key in TorsoDict.keys():
fileRoot = TorsoDict[key] fileRoot = TorsoDict[key]
model = loader.loadModelNode('phase_3' + fileRoot + '1000') model = loader.loadModel('phase_3' + fileRoot + '1000').node()
Preloaded.append(model) Preloaded.append(model)
if len(key) > 1: if len(key) > 1:
model = loader.loadModelNode('phase_3' + fileRoot + '500') model = loader.loadModel('phase_3' + fileRoot + '500').node()
Preloaded.append(model) Preloaded.append(model)
model = loader.loadModelNode('phase_3' + fileRoot + '250') model = loader.loadModel('phase_3' + fileRoot + '250').node()
Preloaded.append(model) Preloaded.append(model)
for key in HeadDict.keys(): for key in HeadDict.keys():
fileRoot = HeadDict[key] fileRoot = HeadDict[key]
model = loader.loadModelNode('phase_3' + fileRoot + '1000') model = loader.loadModel('phase_3' + fileRoot + '1000').node()
Preloaded.append(model) Preloaded.append(model)
model = loader.loadModelNode('phase_3' + fileRoot + '500') model = loader.loadModel('phase_3' + fileRoot + '500').node()
Preloaded.append(model) Preloaded.append(model)
model = loader.loadModelNode('phase_3' + fileRoot + '250') model = loader.loadModel('phase_3' + fileRoot + '250').node()
Preloaded.append(model) Preloaded.append(model)

View file

@ -249,9 +249,9 @@ class ToonBase(OTPBase.OTPBase):
def initNametagGlobals(self): def initNametagGlobals(self):
arrow = loader.loadModel('phase_3/models/props/arrow') arrow = loader.loadModel('phase_3/models/props/arrow')
card = loader.loadModel('phase_3/models/props/panel') card = loader.loadModel('phase_3/models/props/panel')
speech3d = ChatBalloon(loader.loadModelNode('phase_3/models/props/chatbox')) speech3d = ChatBalloon(loader.loadModel('phase_3/models/props/chatbox').node())
thought3d = ChatBalloon(loader.loadModelNode('phase_3/models/props/chatbox_thought_cutout')) thought3d = ChatBalloon(loader.loadModel('phase_3/models/props/chatbox_thought_cutout').node())
speech2d = ChatBalloon(loader.loadModelNode('phase_3/models/props/chatbox_noarrow')) speech2d = ChatBalloon(loader.loadModel('phase_3/models/props/chatbox_noarrow').node())
chatButtonGui = loader.loadModel('phase_3/models/gui/chat_button_gui') chatButtonGui = loader.loadModel('phase_3/models/gui/chat_button_gui')
NametagGlobals.setCamera(self.cam) NametagGlobals.setCamera(self.cam)
NametagGlobals.setArrowModel(arrow) NametagGlobals.setArrowModel(arrow)