ModelLoadRequest

class ModelLoadRequest

Bases: AsyncTask

A class object that manages a single asynchronous model load request. Create a new ModelLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.

Inheritance diagram

Inheritance diagram of ModelLoadRequest

explicit ModelLoadRequest(std::string const &name, Filename const &filename, LoaderOptions const &options, Loader *loader)
ModelLoadRequest(ModelLoadRequest const&) = default

Create a new ModelLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.

static TypeHandle get_class_type(void)
Filename const &get_filename(void) const

Returns the filename associated with this asynchronous ModelLoadRequest.

Loader *get_loader(void) const

Returns the Loader object associated with this asynchronous ModelLoadRequest.

PandaNode *get_model(void) const

Returns the model that was loaded asynchronously, if any, or null if there was an error. It is an error to call this unless done() returns true.

Deprecated: Use result() instead.

LoaderOptions const &get_options(void) const

Returns the LoaderOptions associated with this asynchronous ModelLoadRequest.

bool is_ready(void) const

Returns true if this request has completed, false if it is still pending or if it has been cancelled. When this returns true, you may retrieve the model loaded by calling get_model(). Equivalent to req.done() and not req.cancelled().

See AsyncFuture::done().