mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 12:43:44 -04:00
remove superFlattenShip, it doesn't belong here
This commit is contained in:
parent
8e68eb1dcd
commit
9831c3b93f
@ -25,7 +25,7 @@ __all__ = ['enumerate', 'unique', 'indent', 'nonRepeatingRandomList',
|
||||
'getNumberedTypedSortedStringWithReferrersGen',
|
||||
'printNumberedTyped', 'DelayedCall', 'DelayedFunctor',
|
||||
'FrameDelayedCall', 'SubframeCall', 'ArgumentEater', 'ClassTree', 'getBase',
|
||||
'superFlattenShip','HotkeyBreaker','logMethodCalls','GoldenRatio',
|
||||
'HotkeyBreaker','logMethodCalls','GoldenRatio',
|
||||
'GoldenRectangle', 'pivotScalar', 'rad90', 'rad180', 'rad270', 'rad360',
|
||||
'nullGen', 'loopGen', 'makeFlywheelGen', 'flywheel', 'choice',
|
||||
'printStack', 'printReverseStack', 'listToIndex2item', 'listToItem2index',
|
||||
@ -3194,34 +3194,6 @@ def getRepository():
|
||||
except:
|
||||
return simbase.air
|
||||
|
||||
def superFlattenShip(ship):
|
||||
|
||||
#PHASE 1: remove characters
|
||||
characterNodes=ship.findAllMatches("**/+Character")
|
||||
for i in range(characterNodes.getNumPaths()):
|
||||
character=characterNodes.getPath(i)
|
||||
children=character.getChildrenAsList()
|
||||
for child in children:
|
||||
child.copyTo(character.getParent())
|
||||
character.reparentTo(hidden)
|
||||
|
||||
#PHASE 2: remove textures
|
||||
tex=ship.findAllTextures().getTexture(0)
|
||||
ship.setTexture(tex,1000)
|
||||
|
||||
#PHASE 3: stop rocking task
|
||||
taskMgr.remove("shipRocking-%d"%(ship.getDoId()))
|
||||
|
||||
#PHASE 4: kill lamp effects
|
||||
from pirates.shipparts.DistributedShipDecor import DistributedShipDecor
|
||||
for DO in base.cr.doId2do.values():
|
||||
if(type(DO) == DistributedShipDecor):
|
||||
if (hasattr(DO.prop, 'lanternGlowEffect')):
|
||||
DO.prop.lanternGlowEffect.destroy()
|
||||
|
||||
#PHASE 5: flatten strong!
|
||||
return ship.flattenStrong()
|
||||
|
||||
exceptionLoggedNotify = None
|
||||
|
||||
def exceptionLogged(append=True):
|
||||
|
Loading…
x
Reference in New Issue
Block a user