HDK
|
#include <PDG_ApplicationShim.h>
Classes | |
class | DeferredTask |
class | Geometry |
class | Graph |
class | Node |
Public Types | |
using | TaskPtr = UT_SharedPtr< DeferredTask > |
Managed pointer to a deferred task. More... | |
using | DeferredQueue = UT_ConcurrentQueue< TaskPtr > |
Public Member Functions | |
PDG_ApplicationShim () | |
Constructs a new application shim and caches configuration vars. More... | |
virtual | ~PDG_ApplicationShim () |
Static Public Member Functions | |
static void | addPythonPath (const UT_StringHolder &path) |
Adds a new Python search path to the PDG type system. More... | |
static bool | canUseFarm () |
Returns true if the integration is allowed to use farm schedulers. More... | |
static bool | areDependenciesDirty (fpreal t) |
static void | dirtyDependencies (fpreal t, const UT_StringHolder &name) |
Notifies the application that the global PDG work item has been changed. More... | |
static void | addDependency (int thread, const UT_StringHolder &name) |
Adds a dependency on the global PDG work item for the specified thread. More... | |
static bool | evaluatingChannel (UT_WorkBuffer &buffer, bool full_path, int thread) |
Queries the name of the evaluating channel for the specified thread. More... | |
static bool | getVariable (const char *name, UT_StringHolder &value) |
Queries the value of a global variable. More... | |
static void | setVariable (const char *name, const UT_StringHolder &value) |
Sets the value of a global variable. More... | |
static bool | checkCached (const PDG_FileUtils &file_utils, const UT_StringHolder &path, const UT_StringHolder &tag) |
Returns true if the file in the specified path is cached. More... | |
template<typename Task , typename... Args> | |
static TaskPtr | pushDeferred (Args &&...args) |
template<typename Func > | |
static void | unlockedExecute (const Func &func) |
Runs a functor with the application unlocked. More... | |
static bool | tickMainThread () |
static bool | isExperimental () |
Enable experimental features. More... | |
static bool | trySaveScene () |
static void | setShim (PDG_ApplicationShim *shim) |
Protected Member Functions | |
virtual void | addAppPythonPath (const UT_StringHolder &path) const =0 |
virtual bool | canAppUseFarm () const =0 |
virtual bool | areAppDependenciesDirty (fpreal t) const =0 |
virtual void | dirtyAppDependencies (fpreal t, const UT_StringHolder &name)=0 |
virtual void | addAppDependency (int thread, const UT_StringHolder &name)=0 |
virtual bool | evaluatingAppChannel (UT_WorkBuffer &buffer, bool full_path, int thread)=0 |
virtual bool | getAppVariable (const char *name, UT_StringHolder &value) const =0 |
virtual void | setAppVariable (const char *name, const UT_StringHolder &value)=0 |
virtual bool | checkAppCached (const PDG_FileUtils &file_utils, const UT_StringHolder &path, const UT_StringHolder &tag) const =0 |
virtual bool | tickAppMainThread () |
virtual bool | unlockApp () const =0 |
virtual bool | lockApp () const =0 |
virtual bool | trySaveAppScene () const =0 |
Shim class for integrating PDG with another application, e.g. Houdini. A single subclass of this should be installed statically with PDG using PDG_ApplicationShim::setShim.
Definition at line 38 of file PDG_ApplicationShim.h.
Definition at line 186 of file PDG_ApplicationShim.h.
Managed pointer to a deferred task.
Definition at line 185 of file PDG_ApplicationShim.h.
PDG_ApplicationShim::PDG_ApplicationShim | ( | ) |
Constructs a new application shim and caches configuration vars.
|
inlinevirtual |
Definition at line 265 of file PDG_ApplicationShim.h.
|
protectedpure virtual |
|
protectedpure virtual |
|
static |
Adds a dependency on the global PDG work item for the specified thread.
|
static |
Adds a new Python search path to the PDG type system.
|
protectedpure virtual |
|
static |
Returns true if the application-specific work item dependency is dirty
|
protectedpure virtual |
|
static |
Returns true if the integration is allowed to use farm schedulers.
|
protectedpure virtual |
|
static |
Returns true if the file in the specified path is cached.
|
protectedpure virtual |
|
static |
Notifies the application that the global PDG work item has been changed.
|
protectedpure virtual |
|
static |
Queries the name of the evaluating channel for the specified thread.
|
protectedpure virtual |
|
static |
Queries the value of a global variable.
|
static |
Enable experimental features.
|
protectedpure virtual |
|
inlinestatic |
Queue a task with the deferred processing queue, to be run on the main thread.
Definition at line 224 of file PDG_ApplicationShim.h.
|
protectedpure virtual |
|
static |
Sets the shared static shim instance. This can only be called once during the lifetime of the program.
|
static |
Sets the value of a global variable.
|
protectedvirtual |
|
static |
Runs the application shims logic for a main thread event tick. The base application instance will drain pending deferred events from the queue and run some of them.
|
protectedpure virtual |
|
static |
Saves the current application scene. Returns false if the application wants to abort the current operationi because of save conflict or a request to cancel, otherwise returns true.
|
protectedpure virtual |
|
inlinestatic |
Runs a functor with the application unlocked.
Definition at line 234 of file PDG_ApplicationShim.h.