#include <stdio.h>
using namespace HDK_Sample;
};
};
{
}
{
mySopFlags.setManagesDataIDs(true);
}
SOP_CopRaster::~SOP_CopRaster() {}
bool
{
int state;
state = (USEDISK()) ? 0 : 1;
return changed;
}
void
{
UT_String relpath, fullpath, netpath, nodepath;
int i, useflag = 0;
me->
COPPATH(relpath, 0.0F);
for (i = 0; i < items.
entries() && i < theMaxSize; i++)
{
free ( items(i) );
}
}
void
{
if (!node_ptr)
{
net = "";
node = "";
return;
}
if (!parent_ptr)
net = "";
else
{
}
else
}
int
int &flagdependent)
{
fullpath = "";
flagdependent = 0;
if (!node)
return -1;
{
{
flagdependent = 1;
}
}
node = (
OP_Node *) CAST_COP2NODE(node);
if (!node)
return -1;
return 0;
}
int
SOP_CopRaster::updateRaster(
fpreal t)
{
int rcode;
rcode = -1;
if (USEDISK())
{
FNAME(fname, t);
if (myCurrentName == fname)
{
rcode = 0;
}
else
{
if (!myRaster.
load(fname))
{
rcode = -1;
}
else
{
rcode = 1;
}
}
}
else
{
COPPATH(relpath, t);
if (id >= 0)
if (node)
{
float frame;
if (useflag)
frame = COPFRAME(t);
CPLANE(cplane, t);
if (r)
{
rcode = 1;
}
else
rcode = -1;
}
else rcode = -1;
}
return rcode;
}
{
int rstate = updateRaster(t);
if (rstate < 0)
{
}
{
int xres = myRaster.
Xres();
int yres = myRaster.
Yres();
bool sameres = samenum && (myPrevXRes == xres) && (myPrevYRes == yres);
myPrevXRes = xres;
myPrevYRes = yres;
if (samenum)
{
}
else
{
}
if (!colorh.isValid())
for (
int x = 0;
x < xres; ++
x)
{
for (
int y = 0;
y < yres; ++
y, ++rgba, ++ptoff)
{
if (!sameres)
gdp->
setPos3(ptoff, (
float)
x/(
float)xres, (
float)
y/(
float)yres, 0);
clr *= 1.0/255.0;
colorh.set(ptoff, clr);
}
}
colorh.bumpDataId();
if (!sameres)
}
}
void
{
"hdk_copraster",
"COP Raster",
0,
0,
0,
}