9 #ifndef __PDG_EVALUATION_CONTEXT_H__
10 #define __PDG_EVALUATION_CONTEXT_H__
115 bool myParameterError;
118 bool myPreviousParent;
134 bool myPreviousParent;
151 {
return myExpressionAttribs; }
177 static
void setWorkItemCaster(
183 static
void setUsePython(
bool use_python);
198 static
void setGlobalSubItemIndex(
int index,
204 static
void setGlobalWorkItem(
209 static
void setGlobalJobWorkItem(
217 static
void setTimeDependentAttribs(
222 static
void dirtyAllAttribs();
226 static
bool saveGlobalWorkItem(std::ostream &os);
231 static
bool loadGlobalWorkItem(
UT_IStream& is);
235 static const
PDG_WorkItem* globalWorkItem(
bool sub_item);
239 static const
PDG_WorkItem* globalJobWorkItem(
bool sub_item);
252 static
bool useTimeDependentAttribs();
255 static
bool isTimeDependent(
264 static
bool activeIsParent(
int thread);
267 static
bool isLocalGenerating(
int thread);
270 static
bool isLocalRuntime(
int thread);
274 static
bool isLocalActive(
int thread);
280 static
bool isLocalCookingPDG(
int thread);
283 static
State localState(
int thread);
286 static
fpreal localEvalTime(
int thread);
289 static const
PDG_Node* localActiveNode(
int thread);
297 static
void setDict(
int thread,
PY_PyObject* locals);
303 static
void updateDict(
int thread,
306 static
void updateDict(
int thread,
309 static
void updateDict(
int thread,
314 static
void updateDict(
int thread,
319 static
void updateDict(
int thread,
324 static
void updateDict(
int thread,
329 static
void resetDict(
int thread);
367 static
bool savePyObjectAttr(
374 static
bool loadPyObjectAttr(
381 static
bool cookWorkItem(
388 static
bool hashPyObjectAttr(
394 static
void updateParameterEvaluation(
404 bool isParent() const;
413 bool hasParameterError() const;
419 bool isGenerating()
const
420 {
return (myState == eStateStatic) ||
421 (myState == eStateDynamic); }
425 {
return (myState == eStateCooking); }
429 {
return (myState == eStateDynamic) ||
430 (myState == eStateCooking) ||
431 (myState == eStateNone); }
436 {
return myState != eStateNone; }
440 {
return myIsLocalize; }
448 bool canDirty(
const PDG_Node* node)
const;
451 bool canDirty()
const;
457 if (myAttributeRecord)
458 myAttributeRecord->record(name);
476 AttribRecordScope* attributeRecord()
const;
483 void setActiveNode(
const PDG_Node* node);
486 void setState(
State state);
495 void setLocalize(
bool localize);
498 void setAttributeRecord(AttribRecordScope* scope);
509 bool include_details,
523 void setLocalDictEntryByScript(
525 const char* py_expression);
527 void setLocalDictEntryByObject(
537 EvaluatorMap myAttributeMap;
538 AttribRecordScope* myAttributeRecord;
543 bool myDictModified : 1;
545 bool myIsLocalize : 1;
546 bool myHasParameterError : 1;
OIIO_API bool has_error()
Is there a pending global error message waiting to be retrieved?
GT_API const UT_StringHolder time
State
Evaluation context state.
std::size_t SYS_HashType
Define the type for hash values.
UT_Function< PY_PyObject *(const PDG_WorkItem *)> WorkItemCaster
Utility function type for converting a PDG_WorkItem* to a PY_PyObject.
**But if you need a result
EvaluationResult
Enumeration of python script evaluation results.
bool isActive() const
Returns true if the context is actively doing PDG work.
Scoped setter of local work item.
The script succeeded without any exceptions.
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
The script encountered an error or exception.
bool isCooking() const
Returns true if the context is in a cooking state.
GLuint const GLchar * name
Scoped block that records PDG attribute evaluations.
std::function< T > UT_Function
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
bool isRuntime() const
Returns true if the context is in a runtime state.
bool isLocalize() const
Returns true if the context should force file paths to be localized.
UT_ErrorManager::Scope UT_AutoErrorManager
Alias UT_AutoErrorManager as UT_ErrorManager::Scope.
Scoped reset of the thread-local context cooking/generation state.
void recordAttribute(const UT_StringHolder &name)