コード例 #1
0
 def fixEffects(self):
     nodes = self.getNodePaths()
     for curNode in nodes:
         mf = curNode.find('**/*mesh_front*')
         sign_joint = curNode.find('**/sign_origin_joint')
         if not sign_joint.isEmpty():
             self.notify.debug('I found sign_origin_joint 1')
         
         if not mf.isEmpty():
             sign = mf.find('**/sign')
             mf.clearEffect(DecalEffect.getClassType())
             if not sign.isEmpty():
                 sign.setDepthWrite(1, 1)
                 sign.setEffect(DecalEffect.make())
                 sign_joint = curNode.find('**/sign_origin_joint')
                 allSignJoints = curNode.findAllMatches('**/sign_origin_joint')
                 num = allSignJoints.getNumPaths()
                 if num:
                     sign_joint = allSignJoints.getPath(num - 1)
                 
                 if not sign_joint.isEmpty():
                     self.notify.debug('I found sign_origin_joint 2')
                     sign.wrtReparentTo(sign_joint)
                 
             
         sign.isEmpty()