ColorMapping *add_color_mapping(void) { ColorMapping *colormap = MEM_callocN(sizeof(ColorMapping), "ColorMapping"); default_color_mapping(colormap); return colormap; }
static void node_shader_init_tex_noise(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexNoise *tex = MEM_callocN(sizeof(NodeTexNoise), "NodeTexNoise"); default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); default_color_mapping(&tex->base.color_mapping); node->storage = tex; }
static void node_shader_init_tex_checker(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexChecker *tex = MEM_callocN(sizeof(NodeTexChecker), "NodeTexChecker"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); node->storage = tex; }
static void node_shader_init_tex_image(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) { NodeTexImage *tex = MEM_callocN(sizeof(NodeTexImage), "NodeTexImage"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); tex->color_space = SHD_COLORSPACE_COLOR; node->storage = tex; }
static void node_shader_init_tex_musgrave(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexMusgrave *tex = MEM_callocN(sizeof(NodeTexMusgrave), "NodeTexMusgrave"); default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); default_color_mapping(&tex->base.color_mapping); tex->musgrave_type = SHD_MUSGRAVE_FBM; node->storage = tex; }
static void node_shader_init_tex_magic(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) { NodeTexMagic *tex = MEM_callocN(sizeof(NodeTexMagic), "NodeTexMagic"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); tex->depth = 2; node->storage = tex; }
static void node_shader_init_tex_voronoi(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexVoronoi *tex = MEM_callocN(sizeof(NodeTexVoronoi), "NodeTexVoronoi"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); tex->coloring = SHD_VORONOI_INTENSITY; node->storage = tex; }
static void node_shader_init_tex_sky(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexSky *tex = MEM_callocN(sizeof(NodeTexSky), "NodeTexSky"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); tex->sun_direction[0] = 0.0f; tex->sun_direction[1] = 0.0f; tex->sun_direction[2] = 1.0f; tex->turbidity = 2.2f; node->storage = tex; }
static void node_shader_init_tex_image(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexImage *tex = MEM_callocN(sizeof(NodeTexImage), "NodeTexImage"); default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); default_color_mapping(&tex->base.color_mapping); tex->color_space = SHD_COLORSPACE_COLOR; tex->iuser.frames = 1; tex->iuser.sfra = 1; tex->iuser.fie_ima = 2; tex->iuser.ok = 1; node->storage = tex; }
static void node_shader_init_tex_brick(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) { NodeTexBrick *tex = MEM_callocN(sizeof(NodeTexBrick), "NodeTexBrick"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); tex->offset = 0.5f; tex->squash = 1.0f; tex->offset_freq = 2; tex->squash_freq = 2; node->storage = tex; }
static void node_shader_init_tex_environment(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) { NodeTexEnvironment *tex = MEM_callocN(sizeof(NodeTexEnvironment), "NodeTexEnvironment"); default_tex_mapping(&tex->base.tex_mapping); default_color_mapping(&tex->base.color_mapping); tex->color_space = SHD_COLORSPACE_COLOR; tex->projection = SHD_PROJ_EQUIRECTANGULAR; tex->iuser.frames= 1; tex->iuser.sfra= 1; tex->iuser.fie_ima= 2; tex->iuser.ok= 1; node->storage = tex; }
static void node_shader_init_tex_sky(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexSky *tex = MEM_callocN(sizeof(NodeTexSky), "NodeTexSky"); default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); default_color_mapping(&tex->base.color_mapping); tex->sun_direction[0] = 0.0f; tex->sun_direction[1] = 0.0f; tex->sun_direction[2] = 1.0f; tex->turbidity = 2.2f; tex->ground_albedo = 0.3f; tex->sky_model = SHD_SKY_NEW; node->storage = tex; }