Panda3D

Loading...
Searching...
No Matches
Classes | Functions | Variables
direct.showbase.Loader Namespace Reference

## Classes
class | Loader

## Functions
| asyncFlattenStrong (self, model, inPlace=True, callback=None, extraArgs=[])
| loadShader (self, shaderPath, okMissing=False)
| def makeNodeNamesUnique(self, nodePath, nodeCount): if nodeCount == 0: Loader.modelCount += 1 nodePath.setName(nodePath.getName() + ('dd' % (Loader.modelCount, nodeCount))) for i in range(nodePath.getNumChildren()): nodeCount += 1 self.makeNodeNamesUnique(nodePath.getChild(i), nodeCount)
| unloadShader (self, shaderPath)

## Variables
| _requests
| async_flatten_strong = asyncFlattenStrong
| hook
| load_3d_texture = load3DTexture
| load_cube_map = loadCubeMap
| load_font = loadFont
| load_model = loadModel
| load_music = loadMusic
| load_sfx = loadSfx
| load_shader = loadShader
| load_sound = loadSound
| load_texture = loadTexture
| phaseChecker = None
| save_model = saveModel
| unload_model = unloadModel
| unload_sfx = unloadSfx
| unload_shader = unloadShader
| unload_texture = unloadTexture

## Detailed Description

    This module contains a high-level interface for loading models, textures,
    sound, music, shaders and fonts from disk.

## Function Documentation

## ◆ asyncFlattenStrong()

asyncFlattenStrong | ( |  | self,
|  |  | model,
|  |  | inPlace = True,
|  |  | callback = None,
|  |  | extraArgs = [] )

     Performs a model.flattenStrong() operation in a sub-thread
    (if threading is compiled into Panda).  The model may be a
    single `.NodePath`, or it may be a list of NodePaths.

    Each model is duplicated and flattened in the sub-thread.

    If inPlace is True, then when the flatten operation completes,
    the newly flattened copies are automatically dropped into the
    scene graph, in place the original models.

    If a callback is specified, then it is called after the
    operation is finished, receiving the flattened model (or a
    list of flattened models).

## ◆ loadShader()

loadShader | ( |  | self,
|  |  | shaderPath,
|  |  | okMissing = False )

def makeNodeNamesUnique(self, nodePath, nodeCount): if nodeCount == 0: Loader.modelCount += 1 nodePath.setName(nodePath.getName() + ('dd' % (Loader.modelCount, nodeCount))) for i in range(nodePath.getNumChildren()): nodeCount += 1 self.makeNodeNamesUnique(nodePath.getChild(i), nodeCount)

## ◆ unloadShader()

unloadShader | ( |  | self,
|  |  | shaderPath )

## Variable Documentation

## ◆ _requests

_requests
| protected

## ◆ async_flatten_strong

async_flatten_strong = asyncFlattenStrong

## ◆ hook

hook

## ◆ load_3d_texture

load_3d_texture = load3DTexture

## ◆ load_cube_map

load_cube_map = loadCubeMap

## ◆ load_font

load_font = loadFont

## ◆ load_model

load_model = loadModel

## ◆ load_music

load_music = loadMusic

## ◆ load_sfx

load_sfx = loadSfx

## ◆ load_shader

load_shader = loadShader

## ◆ load_sound

load_sound = loadSound

## ◆ load_texture

load_texture = loadTexture

## ◆ phaseChecker

phaseChecker = None

## ◆ save_model

save_model = saveModel

## ◆ unload_model

unload_model = unloadModel

## ◆ unload_sfx

unload_sfx = unloadSfx

## ◆ unload_shader

unload_shader = unloadShader

## ◆ unload_texture

unload_texture = unloadTexture