ClearWorkItemResultByID() статический приватный Метод

static private ClearWorkItemResultByID ( HoudiniEngineUnity.HEU_TOPNodeData topNode, HAPI_PDG_WorkitemId workItemID ) : void
topNode HoudiniEngineUnity.HEU_TOPNodeData
workItemID HAPI_PDG_WorkitemId
Результат void
Пример #1
0
        public void ClearWorkItemResult(HEU_SessionBase session, HAPI_PDG_GraphContextId contextID, HAPI_PDG_EventInfo eventInfo, HEU_TOPNodeData topNode)
        {
            session.LogErrorOverride = false;
            bool bCleared = false;

            HAPI_PDG_WorkitemInfo workItemInfo = new HAPI_PDG_WorkitemInfo();

            if (session.GetWorkItemInfo(contextID, eventInfo.workitemId, ref workItemInfo))
            {
                //Debug.LogFormat("Clear: index={0}, state={1}", workItemInfo.index, (HAPI_PDG_WorkitemState)eventInfo.currentState);

                if (workItemInfo.index >= 0)
                {
                    HEU_PDGAssetLink.ClearWorkItemResultByIndex(topNode, workItemInfo.index);
                    bCleared = true;
                }
            }

            if (!bCleared)
            {
                HEU_PDGAssetLink.ClearWorkItemResultByID(topNode, eventInfo.workitemId);
            }

            session.LogErrorOverride = true;
        }
        /// <summary>
        /// Clear all work items' results of the specified TOP node. This destroys any loaded results (geometry etc).
        /// </summary>
        /// <param name="session"></param>
        /// <param name="contextID"></param>
        /// <param name="eventInfo"></param>
        /// <param name="topNode"></param>
        public void ClearWorkItemResult(HEU_SessionBase session, HAPI_PDG_GraphContextId contextID, HAPI_PDG_EventInfo eventInfo, HEU_TOPNodeData topNode)
        {
#if HOUDINIENGINEUNITY_ENABLED
            session.LogErrorOverride = false;

            HEU_PDGAssetLink.ClearWorkItemResultByID(topNode, eventInfo.workitemId);

            session.LogErrorOverride = true;
#endif
        }