Skip to content

Commit

Permalink
feat: support using same value of input and output
Browse files Browse the repository at this point in the history
  • Loading branch information
DarcJC committed Aug 9, 2023
1 parent bf8a7ed commit 7a01f91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions projects/Roads/nodes/src/cost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,11 @@ namespace {
std::string OutputChannel;
DECLARE_INPUT_FIELD(OutputChannel, "output_channel");

std::string OutputTest;
DECLARE_OUTPUT_FIELD(OutputTest, "test");
DECLARE_OUTPUT_FIELD(Primitive, "prim");

void apply() override;
};

void CalcPathCost_Simple::apply() {
zeno::log_info("aaaaaaaaaaa: {}", AutoParameter->OutputChannel);
AutoParameter->OutputTest = "abcdef";
}
}
2 changes: 1 addition & 1 deletion zeno/include/zeno/utils/PropertyVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ namespace zeno {
// This don't take into account the nul char
#define COMPILE_TIME_CRC32_STR(x) (zeno::reflect::MM<sizeof(x) - 1>::crc32(x))

#define DECLARE_FIELD(Type, FieldName, ...) zeno::reflect::Type<ThisType, decltype(FieldName), COMPILE_TIME_CRC32_STR(#FieldName)> FieldName##Field_Do_not_use{*this, FieldName, __VA_ARGS__};
#define DECLARE_FIELD(Type, FieldName, ...) zeno::reflect::Type<ThisType, decltype(FieldName), COMPILE_TIME_CRC32_STR(#FieldName)> FieldName##Type##_Do_not_use{*this, FieldName, __VA_ARGS__};
#define DECLARE_INPUT_FIELD(FieldName, KeyName, ...) DECLARE_FIELD(InputField, FieldName, KeyName, __VA_ARGS__)
#define DECLARE_OUTPUT_FIELD(FieldName, KeyName, ...) DECLARE_FIELD(OutputField, FieldName, KeyName, __VA_ARGS__)

Expand Down

0 comments on commit 7a01f91

Please sign in to comment.