Skip to content

Commit

Permalink
objtimeshift
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed Jul 18, 2022
1 parent 1d7a2a3 commit c4b8196
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ sudo strip --remove-section=.note.ABI-tag /usr/lib64/libQt5Core.so.5

Reference: https://askubuntu.com/questions/1034313/ubuntu-18-4-libqt5core-so-5-cannot-open-shared-object-file-no-such-file-or-dir

### Q

Any error around TBB.

### A

Consider uninstall OneAPI (`/opt/intel/oneapi`), OpenVDB requires the old version of TBB, not the stupid OneTBB.

## CUDA problem

### Q
Expand Down
51 changes: 51 additions & 0 deletions zeno/src/nodes/neo/ObjTimeShift.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#include <zeno/zeno.h>
#include <zeno/types/ListObject.h>

namespace zeno {
namespace {

struct ObjTimeShift : INode {
std::vector<std::shared_ptr<IObject>> m_objseq;

virtual void apply() override {
auto obj = get_input<IObject>("obj");
auto offset = get_input2<int>("offset");
std::shared_ptr<IObject> prevObj;
auto &objseq = has_input("customList") ?
get_input<ListObject>("customList")->arr : m_objseq;
if (offset < 0) {
objseq.resize(1);
prevObj = std::move(objseq[0]);
objseq[0] = obj->clone();
} else {
objseq.push_back(obj->clone());
if (offset < objseq.size())
prevObj = objseq[objseq.size() - 1 - offset];
else
prevObj = objseq[0];
}
set_output("obj", std::move(obj));
set_output("prevObj", std::move(prevObj));
}
};

ZENDEFNODE(ObjTimeShift, {
{
{"IObject", "obj"},
{"int", "offset", "1"},
{"ListObject", "customList"},
},
{
{"IObject", "obj"},
{"IObject", "prevObj"},
},
{
},
{"primitive"},
});

//struct ObjCacheToDisk : INode {
//};

}
}

0 comments on commit c4b8196

Please sign in to comment.