2024-08-01 22:38:55 +08:00
|
|
|
#pragma once
|
|
|
|
|
#include "stdafx.hpp"
|
2024-08-03 17:11:34 +08:00
|
|
|
#include <GenericHelper.hpp>
|
2024-08-01 22:38:55 +08:00
|
|
|
|
|
|
|
|
namespace VSW::Materializer::DataTypes {
|
|
|
|
|
|
2024-08-08 17:47:27 +08:00
|
|
|
struct BlobDescriptor {
|
|
|
|
|
const void* ptr;
|
|
|
|
|
int length;
|
|
|
|
|
};
|
|
|
|
|
|
2024-08-01 22:38:55 +08:00
|
|
|
namespace Script {
|
2024-08-02 17:04:37 +08:00
|
|
|
|
2024-08-01 22:38:55 +08:00
|
|
|
struct Table_script {
|
2024-08-08 22:02:02 +08:00
|
|
|
CK_ID beobj;
|
|
|
|
|
YYCC::yycc_u8string beobj_name;
|
|
|
|
|
int behavior_index;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID behavior;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_behavior {
|
|
|
|
|
CK_ID thisobj;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_BEHAVIOR_TYPE type;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string proto_name;
|
2024-08-08 22:02:02 +08:00
|
|
|
int64_t proto_guid;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_BEHAVIOR_FLAGS flags;
|
|
|
|
|
int priority;
|
|
|
|
|
CKDWORD version;
|
2024-08-08 22:02:02 +08:00
|
|
|
int pin_count_ptarget;
|
|
|
|
|
int pin_count_pin;
|
|
|
|
|
int pin_count_pout;
|
|
|
|
|
int pin_count_bin;
|
|
|
|
|
int pin_count_bout;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_bIO {
|
|
|
|
|
CK_ID thisobj;
|
|
|
|
|
int index;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
|
|
|
|
};
|
|
|
|
|
struct Table_bIn : public Table_bIO {};
|
|
|
|
|
struct Table_bOut : public Table_bIO {};
|
|
|
|
|
|
|
|
|
|
struct Table_pTarget {
|
|
|
|
|
CK_ID thisobj;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-08 22:02:02 +08:00
|
|
|
int64_t type;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
|
|
|
|
CK_ID direct_source;
|
|
|
|
|
CK_ID shared_source;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_pIn {
|
|
|
|
|
CK_ID thisobj;
|
|
|
|
|
int index;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-08 22:02:02 +08:00
|
|
|
int64_t type;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
|
|
|
|
CK_ID direct_source;
|
|
|
|
|
CK_ID shared_source;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_pOut {
|
|
|
|
|
CK_ID thisobj;
|
|
|
|
|
int index;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-08 22:02:02 +08:00
|
|
|
int64_t type;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_bLink {
|
|
|
|
|
CK_ID input;
|
|
|
|
|
CK_ID output;
|
|
|
|
|
int delay;
|
|
|
|
|
CK_ID parent;
|
|
|
|
|
|
|
|
|
|
// additional field
|
|
|
|
|
CK_ID input_obj;
|
2024-08-02 17:04:37 +08:00
|
|
|
VSW::DataTypes::BehaviorLinkIOType input_type;
|
2024-08-01 22:38:55 +08:00
|
|
|
int input_index;
|
|
|
|
|
CK_ID output_obj;
|
2024-08-02 17:04:37 +08:00
|
|
|
VSW::DataTypes::BehaviorLinkIOType output_type;
|
2024-08-01 22:38:55 +08:00
|
|
|
int output_index;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_pLocal {
|
|
|
|
|
CK_ID thisobj;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-08 22:02:02 +08:00
|
|
|
int64_t type;
|
|
|
|
|
bool is_setting;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_pAttr {
|
|
|
|
|
CK_ID thisobj;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-08 22:02:02 +08:00
|
|
|
int64_t type;
|
|
|
|
|
CK_ID owner;
|
2024-08-01 22:38:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_pLink {
|
2024-08-09 11:28:44 +08:00
|
|
|
// Basic infos
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
2024-08-09 11:28:44 +08:00
|
|
|
// Input infos
|
|
|
|
|
CK_ID input;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID input_obj;
|
2024-08-02 17:04:37 +08:00
|
|
|
VSW::DataTypes::ParameterLinkIOType input_type;
|
2024-08-08 22:02:02 +08:00
|
|
|
bool input_is_bb;
|
2024-08-01 22:38:55 +08:00
|
|
|
int input_index;
|
2024-08-09 11:28:44 +08:00
|
|
|
// Output infos
|
|
|
|
|
CK_ID output;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID output_obj;
|
2024-08-02 17:04:37 +08:00
|
|
|
VSW::DataTypes::ParameterLinkIOType output_type;
|
2024-08-08 22:02:02 +08:00
|
|
|
bool output_is_bb;
|
2024-08-01 22:38:55 +08:00
|
|
|
int output_index;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_pOper {
|
|
|
|
|
CK_ID thisobj;
|
2024-08-08 22:02:02 +08:00
|
|
|
int64_t op;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_eLink {
|
|
|
|
|
CK_ID export_obj;
|
|
|
|
|
CK_ID internal_obj;
|
2024-08-08 22:02:02 +08:00
|
|
|
bool is_in;
|
2024-08-01 22:38:55 +08:00
|
|
|
int index;
|
|
|
|
|
CK_ID parent;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_data {
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string field;
|
2024-08-08 17:47:27 +08:00
|
|
|
BlobDescriptor data;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ID parent;
|
|
|
|
|
};
|
|
|
|
|
|
2024-08-02 17:04:37 +08:00
|
|
|
class DataCache {
|
|
|
|
|
public:
|
|
|
|
|
DataCache() :
|
|
|
|
|
script(), behavior(),
|
|
|
|
|
bIn(), bOut(), bLink(),
|
|
|
|
|
pOper(),
|
|
|
|
|
pIn(), pOut(), pLocal(), pAttr(), pTarget(), pLink(),
|
|
|
|
|
eLink(),
|
|
|
|
|
data() {}
|
|
|
|
|
~DataCache() {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Table_script script;
|
|
|
|
|
Table_behavior behavior;
|
|
|
|
|
Table_bIn bIn;
|
|
|
|
|
Table_bOut bOut;
|
|
|
|
|
Table_pIn pIn;
|
|
|
|
|
Table_pOut pOut;
|
|
|
|
|
Table_bLink bLink;
|
|
|
|
|
Table_pLocal pLocal;
|
|
|
|
|
Table_pAttr pAttr;
|
|
|
|
|
Table_pLink pLink;
|
|
|
|
|
Table_pOper pOper;
|
|
|
|
|
Table_eLink eLink;
|
|
|
|
|
Table_pTarget pTarget;
|
|
|
|
|
Table_data data;
|
|
|
|
|
};
|
|
|
|
|
|
2024-08-01 22:38:55 +08:00
|
|
|
}
|
|
|
|
|
|
2024-08-02 17:04:37 +08:00
|
|
|
namespace Document {
|
2024-08-01 22:38:55 +08:00
|
|
|
|
|
|
|
|
struct Table_msg {
|
|
|
|
|
CKMessageType index;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-01 22:38:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_obj {
|
|
|
|
|
CK_ID id;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_CLASSID classid;
|
2024-08-07 11:40:18 +08:00
|
|
|
YYCC::yycc_u8string classid_name;
|
2024-08-01 22:38:55 +08:00
|
|
|
};
|
|
|
|
|
|
2024-08-02 17:04:37 +08:00
|
|
|
class DataCache {
|
|
|
|
|
public:
|
|
|
|
|
DataCache() : msg(), obj() {}
|
|
|
|
|
~DataCache() {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Table_msg msg;
|
|
|
|
|
Table_obj obj;
|
|
|
|
|
};
|
|
|
|
|
|
2024-08-01 22:38:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Environment {
|
2024-08-02 17:04:37 +08:00
|
|
|
|
2024-08-01 22:38:55 +08:00
|
|
|
struct Table_op {
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string func_ptr;
|
2024-08-02 17:04:37 +08:00
|
|
|
int64_t in1_guid;
|
|
|
|
|
int64_t in2_guid;
|
|
|
|
|
int64_t out_guid;
|
|
|
|
|
int64_t op_guid;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string op_name;
|
2024-08-01 22:38:55 +08:00
|
|
|
CKOperationType op_code;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_param {
|
2024-08-06 18:06:17 +08:00
|
|
|
// Parameter infos
|
2024-08-01 22:38:55 +08:00
|
|
|
CKParameterType index;
|
2024-08-02 17:04:37 +08:00
|
|
|
int64_t guid;
|
|
|
|
|
int64_t derived_from;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-01 22:38:55 +08:00
|
|
|
int default_size;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string func_CreateDefault;
|
|
|
|
|
YYCC::yycc_u8string func_Delete;
|
|
|
|
|
YYCC::yycc_u8string func_SaveLoad;
|
|
|
|
|
YYCC::yycc_u8string func_Check;
|
|
|
|
|
YYCC::yycc_u8string func_Copy;
|
|
|
|
|
YYCC::yycc_u8string func_String;
|
|
|
|
|
YYCC::yycc_u8string func_UICreator;
|
|
|
|
|
// Dll infos
|
|
|
|
|
YYCC::yycc_u8string dll_name;
|
|
|
|
|
int dll_index;
|
|
|
|
|
int position_in_dll;
|
|
|
|
|
// Misc
|
|
|
|
|
CKDWORD flags;
|
2024-08-01 22:38:55 +08:00
|
|
|
CKDWORD dw_param;
|
|
|
|
|
CKDWORD cid;
|
2024-08-02 17:04:37 +08:00
|
|
|
int64_t saver_manager;
|
2024-08-01 22:38:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_attr {
|
|
|
|
|
CKAttributeType index;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
2024-08-01 22:38:55 +08:00
|
|
|
CKAttributeCategory category_index;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string category_name;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_ATTRIBUT_FLAGS flags;
|
|
|
|
|
CKParameterType param_index;
|
2024-08-06 18:06:17 +08:00
|
|
|
int64_t param_guid;
|
2024-08-01 22:38:55 +08:00
|
|
|
CK_CLASSID compatible_classid;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string default_value;
|
2024-08-01 22:38:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Table_plugin {
|
2024-08-05 14:23:26 +08:00
|
|
|
// Category
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string category_name;
|
|
|
|
|
int category_index;
|
2024-08-05 14:23:26 +08:00
|
|
|
// Dll infos
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string dll_name;
|
|
|
|
|
int dll_index;
|
2024-08-05 14:23:26 +08:00
|
|
|
int position_in_dll;
|
|
|
|
|
// Plugin infos
|
2024-08-06 18:06:17 +08:00
|
|
|
int index;
|
2024-08-02 17:04:37 +08:00
|
|
|
int64_t guid;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string desc;
|
|
|
|
|
YYCC::yycc_u8string author;
|
|
|
|
|
YYCC::yycc_u8string summary;
|
2024-08-01 22:38:55 +08:00
|
|
|
DWORD version;
|
2024-08-05 14:23:26 +08:00
|
|
|
CK_PLUGIN_TYPE type;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string func_init;
|
|
|
|
|
YYCC::yycc_u8string func_exit;
|
2024-08-05 14:23:26 +08:00
|
|
|
// Reader specific
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string reader_fct;
|
2024-08-05 14:23:26 +08:00
|
|
|
int reader_opt_count;
|
|
|
|
|
CK_DATAREADER_FLAGS reader_flags;
|
|
|
|
|
int64_t reader_setting_param_guid;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string reader_file_ext;
|
2024-08-05 14:23:26 +08:00
|
|
|
// Manager and Render Engine specific
|
2024-08-09 16:19:26 +08:00
|
|
|
bool manager_active;
|
2024-08-05 14:23:26 +08:00
|
|
|
// Behavior specific
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string behavior_guids;
|
2024-08-01 22:38:55 +08:00
|
|
|
};
|
|
|
|
|
|
2024-08-02 17:04:37 +08:00
|
|
|
#if defined(VIRTOOLS_21)
|
2024-08-05 14:23:26 +08:00
|
|
|
// Virtools 2.1 doesn't have Variable Manager
|
|
|
|
|
// We use a normal type as a placeholder.
|
2024-08-02 17:04:37 +08:00
|
|
|
using GenericVarType_t = int;
|
|
|
|
|
#else
|
|
|
|
|
using GenericVarType_t = CKVariableManager::Variable::Type;
|
|
|
|
|
#endif
|
2024-08-01 22:38:55 +08:00
|
|
|
struct Table_variable {
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string name;
|
|
|
|
|
YYCC::yycc_u8string desciption;
|
2024-08-01 22:38:55 +08:00
|
|
|
XWORD flags;
|
2024-08-02 17:04:37 +08:00
|
|
|
GenericVarType_t type;
|
2024-08-06 18:06:17 +08:00
|
|
|
YYCC::yycc_u8string representation;
|
|
|
|
|
YYCC::yycc_u8string data;
|
2024-08-01 22:38:55 +08:00
|
|
|
};
|
|
|
|
|
|
2024-08-02 17:04:37 +08:00
|
|
|
class DataCache {
|
|
|
|
|
public:
|
|
|
|
|
DataCache() :
|
|
|
|
|
op(), param(), attr(), plugin(), variable() {}
|
|
|
|
|
~DataCache() {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Table_op op;
|
|
|
|
|
Table_param param;
|
|
|
|
|
Table_attr attr;
|
|
|
|
|
Table_plugin plugin;
|
|
|
|
|
Table_variable variable;
|
|
|
|
|
};
|
|
|
|
|
|
2024-08-01 22:38:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|