43 using namespace HDK_Sample;
98 return "Source Geometry";
101 static const char *theExtension =
"mydata";
105 const char *path_prefix,
const UT_String &name_override)
116 ts << path_prefix <<
getName() <<
"." << theExtension << std::ends;
127 if (!strcmp(extension, theExtension))
137 SOP_BlindData::loadPrivateData(
UT_IStream &is)
141 return !result ? 0 : 1;
145 SOP_BlindData::savePrivateData(std::ostream &os,
int binary)
148 data =
"This is my private data";
149 data.
save(os, binary);
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
void newSopOperator(OP_OperatorTable *table)
virtual int open(UT_IStream &is, UT_WorkBuffer &pathname)
const char * inputLabel(unsigned idx) const override
const GLuint GLenum const void * binary
GLsizei const GLchar *const * path
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
**But if you need a result
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool load(UT_IStream &is)
Load string from stream. Use is.eof() to check eof status.
static PRM_Template myTemplateList[]
bool load(UT_IStream &is, const char *extension, const char *path=0) override
OP_ERROR cookMySop(OP_Context &context) override
~SOP_BlindData() override
bool load(UT_IStream &is, const char *extension, const char *path) override
GLuint const GLchar * name
GLenum GLenum GLsizei void * table
void setManagesDataIDs(bool onOff)
OP_ERROR save(std::ostream &os, const OP_SaveFlags &flags, const char *path_prefix, const UT_String &name_override=UT_String()) override
void save(std::ostream &os, bool binary) const
Save string to stream. Saves as binary if binary is true.
virtual int close(UT_IStream &is)
SYS_FORCE_INLINE const UT_String & getName() const
SOP_BlindData(OP_Network *net, const char *name, OP_Operator *op)
OP_ERROR save(std::ostream &os, const OP_SaveFlags &flags, const char *pathPrefix, const UT_String &name_override=UT_String()) override
OIIO_UTIL_API std::string extension(string_view filepath, bool include_dot=true) noexcept
OP_ERROR duplicateSource(unsigned index, OP_Context &context, GU_Detail *gdp, bool clean=true)