五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊

nukeDLL插件開發(fā)

2019-11-12 11:41 作者:堅(jiān)韌的小牛  | 我要投稿

1.新建項(xiàng)目


?

2.配置管理器


3.配置項(xiàng)目屬性


4.代碼示例

//Tec_maskcorrect.cpp

static const char* const HELP = "Tec_maskcorrect: make red + blue + green = alpha or 1";

?

#include <DDImage/NukeWrapper.h>

#include <DDImage/PixelIop.h>

#include <DDImage/Row.h>

#include <DDImage/Knobs.h>

?

using namespace DD::Image;

?

static const char* const dnames[] = {

? "1", "alpha", 0

};

?

class Tec_maskcorrect : public PixelIop {

??? int combineType;

??? public:

??????? void in_channels(int input, ChannelSet& mask) const;

??????? Tec_maskcorrect(Node *node) : PixelIop(node) {

??????? }

?

??????? void pixel_engine(const Row& in, int y, int x, int r, ChannelMask, Row& out);

??????? virtual void knobs(Knob_Callback);

??????? static const Iop::Description d;

??????? const char* Class() const {return d.name;}

??????? const char* node_help() const {return HELP;}

??????? void _validate(bool);

};

?

void Tec_maskcorrect::_validate(bool for_real) {

??? combineType = 0;

??? copy_info();

??? set_out_channels(Mask_All);

}

?

void Tec_maskcorrect::in_channels(int input, ChannelSet& mask) const {

//mask is unchanged

}

?

void Tec_maskcorrect::knobs(Knob_Callback f)

{

??? Enumeration_knob(f, &combineType, dnames, "combineType");

}

?

void Tec_maskcorrect::pixel_engine(const Row& in, int y, int x, int r, ChannelMask channels, Row& out){

??? foreach (z, channels) {

??????? const float* inptr = in[z]+x;

??????? const float* END = inptr+(r-x);

??????? float* outptr = out.writable(z)+x;

??????? while (inptr < END)

??????????? *outptr++ = *inptr++;

??? }

?

??? const float* inredptr = in[Channel::Chan_Red] + x;

??? const float* inblueptr = in[Channel::Chan_Blue] + x;

??? const float* ingreenptr = in[Channel::Chan_Green] + x;

??? const float* inalphaptr = in[Channel::Chan_Alpha] + x;

??? float* outredptr = out.writable(Channel::Chan_Red)+x;

??? float* outblueptr = out.writable(Channel::Chan_Blue)+x;

??? float* outgreenptr = out.writable(Channel::Chan_Green)+x;

??? int index = 0;

??? while(index < r)

??? {

??????? float combine = 0;

??????? if(combineType == 0)

??????????? combine = 1;

??????? else if(combineType == 1)

??????????? combine = *inalphaptr;

??????? if((*inredptr + *inblueptr + *ingreenptr) != combine)

??????? {

??????????? float scale = combine/(*inredptr + *inblueptr + *ingreenptr);

??????????? *outredptr = scale*(*inredptr);

??????????? *outblueptr = scale*(*inblueptr);

??????????? *outgreenptr = scale*(*ingreenptr);

??????? }

??????? inredptr++;

??????? inblueptr++;

??????? ingreenptr++;

??????? inalphaptr++;

??????? outredptr++;

??????? outblueptr++;

??????? outgreenptr++;

??????? index++;

??? }

}

?

static Iop* build(Node *node) {return new NukeWrapper(new Tec_maskcorrect(node));}

const Iop::Description Tec_maskcorrect::d("Tec_maskcorrect", "Tec_maskcorrect", build);

?


nukeDLL插件開發(fā)的評論 (共 條)

分享到微博請遵守國家法律
北碚区| 康平县| 邓州市| 武冈市| 安龙县| 乐昌市| 三穗县| 百色市| 祁阳县| 双城市| 申扎县| 漠河县| 甘洛县| 故城县| 朝阳市| 丰县| 黔江区| 新蔡县| 沂南县| 石棉县| 九江县| 施甸县| 交城县| 安远县| 兰考县| 平果县| 靖州| 盐津县| 雅江县| 九龙县| 行唐县| 澄城县| 五家渠市| 灌南县| 泰安市| 互助| 汽车| 纳雍县| 道孚县| 临江市| 陆丰市|