svn merge ^/trunk/blender -r50023:50036
This commit is contained in:
@@ -133,6 +133,7 @@ option(WITH_GAMEENGINE "Enable Game Engine" ON)
|
||||
option(WITH_PLAYER "Build Player" OFF)
|
||||
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ON)
|
||||
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
|
||||
option(WITH_COMPOSITOR_LEGACY "Enable legacy compositor" ON)
|
||||
|
||||
# GHOST Windowing Library Options
|
||||
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)
|
||||
@@ -1839,6 +1840,7 @@ if(FIRST_RUN)
|
||||
info_cfg_option(WITH_GAMEENGINE)
|
||||
info_cfg_option(WITH_PLAYER)
|
||||
info_cfg_option(WITH_BULLET)
|
||||
info_cfg_option(WITH_IK_SOLVER)
|
||||
info_cfg_option(WITH_IK_ITASC)
|
||||
info_cfg_option(WITH_OPENCOLLADA)
|
||||
info_cfg_option(WITH_FFTW3)
|
||||
|
||||
@@ -290,6 +290,40 @@ def autocomplete(context):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def copy_as_script(context):
|
||||
sc = context.space_data
|
||||
lines = [
|
||||
"import bpy",
|
||||
"import bpy.context as C",
|
||||
"import bpy.data as D",
|
||||
"from mathutils import *",
|
||||
"from math import *",
|
||||
"",
|
||||
]
|
||||
|
||||
for line in sc.scrollback:
|
||||
text = line.body
|
||||
type = line.type
|
||||
|
||||
if type == 'INFO': # ignore autocomp.
|
||||
continue
|
||||
if type == 'INPUT':
|
||||
if text.startswith(PROMPT):
|
||||
text = text[len(PROMPT):]
|
||||
elif text.startswith(PROMPT_MULTI):
|
||||
text = text[len(PROMPT_MULTI):]
|
||||
elif type == 'OUTPUT':
|
||||
text = "#~ " + text
|
||||
elif type == 'ERROR':
|
||||
text = "#! " + text
|
||||
|
||||
lines.append(text)
|
||||
|
||||
context.window_manager.clipboard = "\n".join(lines)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def banner(context):
|
||||
sc = context.space_data
|
||||
version_string = sys.version.strip().replace('\n', ' ')
|
||||
|
||||
@@ -67,6 +67,25 @@ class ConsoleAutocomplete(Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class ConsoleCopyAsScript(Operator):
|
||||
"""Copy the console contents for use in a script"""
|
||||
bl_idname = "console.copy_as_script"
|
||||
bl_label = "Copy to Clipboard (as script)"
|
||||
|
||||
def execute(self, context):
|
||||
sc = context.space_data
|
||||
|
||||
module = _lang_module_get(sc)
|
||||
copy_as_script = getattr(module, "copy_as_script", None)
|
||||
|
||||
if copy_as_script:
|
||||
return copy_as_script(context)
|
||||
else:
|
||||
print("Error: copy_as_script - not found for %r" %
|
||||
sc.language)
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class ConsoleBanner(Operator):
|
||||
"""Print a message when the terminal initializes"""
|
||||
bl_idname = "console.banner"
|
||||
|
||||
@@ -51,6 +51,7 @@ class CONSOLE_MT_console(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("console.copy_as_script")
|
||||
layout.operator("console.copy")
|
||||
layout.operator("console.paste")
|
||||
layout.menu("CONSOLE_MT_language")
|
||||
|
||||
@@ -2042,22 +2042,38 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op)
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
BMEditMesh *em = BMEdit_FromObject(obedit);
|
||||
BMOperator bmop;
|
||||
const float mergedist = RNA_float_get(op->ptr, "mergedist");
|
||||
int use_unselected = RNA_boolean_get(op->ptr, "use_unselected");
|
||||
int totvert_orig = em->bm->totvert;
|
||||
int count;
|
||||
|
||||
EDBM_op_init(em, &bmop, op, "find_doubles verts=%hv dist=%f", BM_ELEM_SELECT, RNA_float_get(op->ptr, "mergedist"));
|
||||
BMO_op_exec(em->bm, &bmop);
|
||||
if (use_unselected) {
|
||||
EDBM_op_init(em, &bmop, op,
|
||||
"automerge verts=%hv dist=%f",
|
||||
BM_ELEM_SELECT, mergedist);
|
||||
BMO_op_exec(em->bm, &bmop);
|
||||
|
||||
count = BMO_slot_map_count(em->bm, &bmop, "targetmapout");
|
||||
|
||||
if (!EDBM_op_callf(em, op, "weld_verts targetmap=%s", &bmop, "targetmapout")) {
|
||||
BMO_op_finish(em->bm, &bmop);
|
||||
return OPERATOR_CANCELLED;
|
||||
if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
else {
|
||||
EDBM_op_init(em, &bmop, op,
|
||||
"find_doubles verts=%hv dist=%f",
|
||||
BM_ELEM_SELECT, mergedist);
|
||||
BMO_op_exec(em->bm, &bmop);
|
||||
|
||||
if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
|
||||
return OPERATOR_CANCELLED;
|
||||
if (!EDBM_op_callf(em, op, "weld_verts targetmap=%s", &bmop, "targetmapout")) {
|
||||
BMO_op_finish(em->bm, &bmop);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
|
||||
count = totvert_orig - em->bm->totvert;
|
||||
BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count == 1) ? "ex" : "ices");
|
||||
|
||||
EDBM_update_generic(C, em, TRUE);
|
||||
@@ -2082,6 +2098,7 @@ void MESH_OT_remove_doubles(wmOperatorType *ot)
|
||||
RNA_def_float(ot->srna, "mergedist", 0.0001f, 0.000001f, 50.0f,
|
||||
"Merge Distance",
|
||||
"Minimum distance between elements to merge", 0.00001, 10.0);
|
||||
RNA_def_boolean(ot->srna, "use_unselected", 1, "Unselected", "Merge selected to other unselected vertices");
|
||||
}
|
||||
|
||||
/************************ Vertex Path Operator *************************/
|
||||
|
||||
@@ -1462,7 +1462,8 @@ static void modifier_skin_customdata_ensure(Object *ob)
|
||||
me->totvert);
|
||||
|
||||
/* Mark an arbitrary vertex as root */
|
||||
vs->flag |= MVERT_SKIN_ROOT;
|
||||
if (vs)
|
||||
vs->flag |= MVERT_SKIN_ROOT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -326,6 +326,7 @@ static void console_keymap(struct wmKeyConfig *keyconf)
|
||||
WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", SPACEKEY, KM_PRESS, KM_CTRL, 0); /* python operator - space_text.py */
|
||||
#endif
|
||||
|
||||
WM_keymap_add_item(keymap, "CONSOLE_OT_copy_as_script", CKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
|
||||
WM_keymap_add_item(keymap, "CONSOLE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "CONSOLE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
|
||||
#ifdef __APPLE__
|
||||
|
||||
@@ -1393,6 +1393,46 @@ static PointerRNA rna_Mesh_tessface_uv_texture_new(struct Mesh *me, struct bCont
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/* only to quiet warnings */
|
||||
static void UNUSED_FUNCTION(rna_mesh_unused)(void)
|
||||
{
|
||||
/* unused functions made by macros */
|
||||
(void)rna_Mesh_skin_vertice_index_range;
|
||||
(void)rna_Mesh_tessface_uv_texture_active_set;
|
||||
(void)rna_Mesh_tessface_uv_texture_clone_get;
|
||||
(void)rna_Mesh_tessface_uv_texture_clone_index_get;
|
||||
(void)rna_Mesh_tessface_uv_texture_clone_index_set;
|
||||
(void)rna_Mesh_tessface_uv_texture_clone_set;
|
||||
(void)rna_Mesh_tessface_uv_texture_index_range;
|
||||
(void)rna_Mesh_tessface_uv_texture_render_get;
|
||||
(void)rna_Mesh_tessface_uv_texture_render_index_get;
|
||||
(void)rna_Mesh_tessface_uv_texture_render_index_set;
|
||||
(void)rna_Mesh_tessface_uv_texture_render_set;
|
||||
(void)rna_Mesh_tessface_uv_texture_stencil_get;
|
||||
(void)rna_Mesh_tessface_uv_texture_stencil_index_get;
|
||||
(void)rna_Mesh_tessface_uv_texture_stencil_index_set;
|
||||
(void)rna_Mesh_tessface_uv_texture_stencil_set;
|
||||
(void)rna_Mesh_tessface_vertex_color_active_set;
|
||||
(void)rna_Mesh_tessface_vertex_color_index_range;
|
||||
(void)rna_Mesh_tessface_vertex_color_render_get;
|
||||
(void)rna_Mesh_tessface_vertex_color_render_index_get;
|
||||
(void)rna_Mesh_tessface_vertex_color_render_index_set;
|
||||
(void)rna_Mesh_tessface_vertex_color_render_set;
|
||||
(void)rna_Mesh_uv_layer_render_get;
|
||||
(void)rna_Mesh_uv_layer_render_index_get;
|
||||
(void)rna_Mesh_uv_layer_render_index_set;
|
||||
(void)rna_Mesh_uv_layer_render_set;
|
||||
(void)rna_Mesh_uv_texture_render_get;
|
||||
(void)rna_Mesh_uv_texture_render_index_get;
|
||||
(void)rna_Mesh_uv_texture_render_index_set;
|
||||
(void)rna_Mesh_uv_texture_render_set;
|
||||
(void)rna_Mesh_vertex_color_render_get;
|
||||
(void)rna_Mesh_vertex_color_render_index_get;
|
||||
(void)rna_Mesh_vertex_color_render_index_set;
|
||||
(void)rna_Mesh_vertex_color_render_set;
|
||||
/* end unused function block */
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static void rna_def_mvert_group(BlenderRNA *brna)
|
||||
@@ -3003,4 +3043,3 @@ void RNA_def_mesh(BlenderRNA *brna)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2667,6 +2667,14 @@ static void rna_def_space_time(BlenderRNA *brna)
|
||||
|
||||
static void rna_def_console_line(BlenderRNA *brna)
|
||||
{
|
||||
static EnumPropertyItem console_line_type_items[] = {
|
||||
{CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""},
|
||||
{CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""},
|
||||
{CONSOLE_LINE_INFO, "INFO", 0, "Info", ""},
|
||||
{CONSOLE_LINE_ERROR, "ERROR", 0, "Error", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
StructRNA *srna;
|
||||
PropertyRNA *prop;
|
||||
|
||||
@@ -2684,6 +2692,11 @@ static void rna_def_console_line(BlenderRNA *brna)
|
||||
RNA_def_property_int_sdna(prop, NULL, "cursor");
|
||||
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range");
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CONSOLE, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type");
|
||||
RNA_def_property_enum_items(prop, console_line_type_items);
|
||||
RNA_def_property_ui_text(prop, "Type", "Console line type when used in scrollback");
|
||||
}
|
||||
|
||||
static void rna_def_space_console(BlenderRNA *brna)
|
||||
|
||||
@@ -251,4 +251,8 @@ if(WITH_COMPOSITOR)
|
||||
add_definitions(-DWITH_COMPOSITOR)
|
||||
endif()
|
||||
|
||||
if(WITH_COMPOSITOR_LEGACY)
|
||||
add_definitions(-DWITH_COMPOSITOR_LEGACY)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_nodes "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
||||
@@ -40,6 +40,9 @@ if env['WITH_BF_COMPOSITOR']:
|
||||
incs += ' ../compositor '
|
||||
defs.append("WITH_COMPOSITOR")
|
||||
|
||||
# TODO, make optional
|
||||
defs.append("WITH_COMPOSITOR_LEGACY")
|
||||
|
||||
env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [190,105] )
|
||||
env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )
|
||||
env.BlenderLib ( libname = 'bf_shdnodes', sources = shdsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )
|
||||
|
||||
@@ -359,6 +359,7 @@ void ntreeCompositEndExecTree(bNodeTreeExec *exec, int use_tree_data)
|
||||
}
|
||||
|
||||
#ifdef WITH_COMPOSITOR
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* ***************************** threaded version for execute composite nodes ************* */
|
||||
/* these are nodes without input, only giving values */
|
||||
@@ -685,20 +686,29 @@ static void ntreeCompositExecTreeOld(bNodeTree *ntree, RenderData *rd, int do_pr
|
||||
/* XXX top-level tree uses the ntree->execdata pointer */
|
||||
ntreeCompositEndExecTree(exec, 1);
|
||||
}
|
||||
#endif
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
#endif /* WITH_COMPOSITOR */
|
||||
|
||||
void *COM_linker_hack = NULL;
|
||||
|
||||
void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int rendering, int do_preview)
|
||||
{
|
||||
#ifdef WITH_COMPOSITOR
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
if (G.debug_value == 200)
|
||||
{
|
||||
ntreeCompositExecTreeOld(ntree, rd, do_preview);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
COM_execute(rd, ntree, rendering);
|
||||
}
|
||||
#else
|
||||
(void)ntree, (void)rd, (void)rendering, (void)do_preview;
|
||||
#endif
|
||||
|
||||
(void)do_preview;
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
* \ingroup cmpnodes
|
||||
*/
|
||||
|
||||
|
||||
#include "node_composite_util.h"
|
||||
|
||||
/* **************** ALPHAOVER ******************** */
|
||||
@@ -44,6 +43,8 @@ static bNodeSocketTemplate cmp_node_alphaover_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_alphaover_premul(bNode *UNUSED(node), float *out, float *src, float *over, float *fac)
|
||||
{
|
||||
|
||||
@@ -109,8 +110,6 @@ static void do_alphaover_mixed(bNode *node, float *out, float *src, float *over,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void node_composit_exec_alphaover(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
/* stack order in: col col */
|
||||
@@ -139,6 +138,8 @@ static void node_composit_exec_alphaover(void *UNUSED(data), bNode *node, bNodeS
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_alphaover_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
|
||||
@@ -153,7 +154,8 @@ void register_node_type_cmp_alphaover(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 80, 40, 120);
|
||||
node_type_init(&ntype, node_alphaover_init);
|
||||
node_type_storage(&ntype, "NodeTwoFloats", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_alphaover);
|
||||
|
||||
#endif
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_bilateralblur_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
#define INIT_C3 \
|
||||
mean0 = 1; \
|
||||
mean1[0] = src[0]; \
|
||||
@@ -254,6 +256,8 @@ static void node_composit_exec_bilateralblur(void *UNUSED(data), bNode *node, bN
|
||||
free_compbuf(new);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_bilateralblur(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeBilateralBlurData *nbbd = MEM_callocN(sizeof(NodeBilateralBlurData), "node bilateral blur data");
|
||||
@@ -271,7 +275,8 @@ void register_node_type_cmp_bilateralblur(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 150, 120, 200);
|
||||
node_type_init(&ntype, node_composit_init_bilateralblur);
|
||||
node_type_storage(&ntype, "NodeBilateralBlurData", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_bilateralblur);
|
||||
|
||||
#endif
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_blur_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static float *make_gausstab(int filtertype, int rad)
|
||||
{
|
||||
float *gausstab, sum, val;
|
||||
@@ -720,6 +722,8 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
|
||||
generate_preview(data, node, out[0]->data);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_blur(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
node->storage = MEM_callocN(sizeof(NodeBlurData), "node blur data");
|
||||
@@ -734,7 +738,8 @@ void register_node_type_cmp_blur(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 120, 80, 200);
|
||||
node_type_init(&ntype, node_composit_init_blur);
|
||||
node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_blur);
|
||||
|
||||
#endif
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ static bNodeSocketTemplate cmp_node_brightcontrast_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_brightnesscontrast(bNode *UNUSED(node), float *out, float *in, float *in_brightness, float *in_contrast)
|
||||
{
|
||||
float i;
|
||||
@@ -92,6 +94,8 @@ static void node_composit_exec_brightcontrast(void *UNUSED(data), bNode *node, b
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_brightcontrast(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -99,7 +103,9 @@ void register_node_type_cmp_brightcontrast(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_brightcontrast_in, cmp_node_brightcontrast_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_brightcontrast);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_channel_matte_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_normalized_rgba_to_ycca2(bNode *UNUSED(node), float *out, float *in)
|
||||
{
|
||||
/*normalize to the range 0.0 to 1.0) */
|
||||
@@ -179,12 +181,14 @@ static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack
|
||||
out[0]->data=outbuf;
|
||||
if (out[1]->hasoutput)
|
||||
out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A);
|
||||
|
||||
|
||||
if (cbuf!=in[0]->data)
|
||||
free_compbuf(cbuf);
|
||||
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_channel_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
|
||||
@@ -209,7 +213,9 @@ void register_node_type_cmp_channel_matte(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 200, 80, 250);
|
||||
node_type_init(&ntype, node_composit_init_channel_matte);
|
||||
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_channel_matte);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_chroma_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_rgba_to_ycca_normalized(bNode *UNUSED(node), float *out, float *in)
|
||||
{
|
||||
rgb_to_ycc(in[0], in[1], in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601);
|
||||
@@ -171,6 +173,7 @@ static void node_composit_exec_chroma_matte(void *data, bNode *node, bNodeStack
|
||||
free_compbuf(cbuf);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_chroma_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
@@ -192,7 +195,9 @@ void register_node_type_cmp_chroma_matte(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 200, 80, 300);
|
||||
node_type_init(&ntype, node_composit_init_chroma_matte);
|
||||
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_chroma_matte);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_color_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_color_key(bNode *node, float *out, float *in)
|
||||
{
|
||||
float h_wrap;
|
||||
@@ -112,6 +114,8 @@ static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack *
|
||||
free_compbuf(cbuf);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_color_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node color");
|
||||
@@ -132,7 +136,9 @@ void register_node_type_cmp_color_matte(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 200, 80, 300);
|
||||
node_type_init(&ntype, node_composit_init_color_matte);
|
||||
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_color_matte);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ static bNodeSocketTemplate cmp_node_color_spill_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_simple_spillmap_red(bNode *node, float* out, float *in)
|
||||
{
|
||||
NodeColorspill *ncs;
|
||||
@@ -315,6 +317,8 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
|
||||
free_compbuf(spillmap);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_color_spill(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeColorspill *ncs= MEM_callocN(sizeof(NodeColorspill), "node colorspill");
|
||||
@@ -335,7 +339,9 @@ void register_node_type_cmp_color_spill(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 140, 80, 200);
|
||||
node_type_init(&ntype, node_composit_init_color_spill);
|
||||
node_type_storage(&ntype, "NodeColorspill", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_color_spill);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ static bNodeSocketTemplate cmp_node_colorbalance_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* this function implements ASC-CDL according to the spec at http://www.asctech.org/
|
||||
Slope
|
||||
S = in * slope
|
||||
@@ -174,6 +176,8 @@ static void node_composit_exec_colorbalance(void *UNUSED(data), bNode *node, bNo
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_colorbalance(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeColorBalance *n= node->storage= MEM_callocN(sizeof(NodeColorBalance), "node colorbalance");
|
||||
@@ -192,7 +196,9 @@ void register_node_type_cmp_colorbalance(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 400, 200, 400);
|
||||
node_type_init(&ntype, node_composit_init_colorbalance);
|
||||
node_type_storage(&ntype, "NodeColorBalance", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_colorbalance);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -29,11 +29,8 @@
|
||||
* \ingroup cmpnodes
|
||||
*/
|
||||
|
||||
|
||||
#include "node_composite_util.h"
|
||||
|
||||
|
||||
|
||||
/* **************** COMPOSITE ******************** */
|
||||
static bNodeSocketTemplate cmp_node_composite_in[]= {
|
||||
{ SOCK_RGBA, 1, N_("Image"), 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
@@ -42,6 +39,8 @@ static bNodeSocketTemplate cmp_node_composite_in[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* applies to render pipeline */
|
||||
static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out))
|
||||
{
|
||||
@@ -97,6 +96,8 @@ static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **i
|
||||
generate_preview(data, node, in[0]->data);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_composite(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -104,7 +105,9 @@ void register_node_type_cmp_composite(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW);
|
||||
node_type_socket_templates(&ntype, cmp_node_composite_in, NULL);
|
||||
node_type_size(&ntype, 80, 60, 200);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_composite);
|
||||
#endif
|
||||
/* Do not allow muting for this node. */
|
||||
node_type_internal_connect(&ntype, NULL);
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_crop_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_crop(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
if (in[0]->data) {
|
||||
@@ -101,6 +103,8 @@ static void node_composit_exec_crop(void *UNUSED(data), bNode *node, bNodeStack
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_crop(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeTwoXYs *nxy= MEM_callocN(sizeof(NodeTwoXYs), "node xy data");
|
||||
@@ -120,7 +124,9 @@ void register_node_type_cmp_crop(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
node_type_init(&ntype, node_composit_init_crop);
|
||||
node_type_storage(&ntype, "NodeTwoXYs", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_crop);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ static bNodeSocketTemplate cmp_node_time_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
|
||||
{
|
||||
RenderData *rd= data;
|
||||
@@ -54,6 +56,7 @@ static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack *
|
||||
out[0]->vec[0]= CLAMPIS(fac, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_curves_time(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
@@ -71,7 +74,9 @@ void register_node_type_cmp_curve_time(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
node_type_init(&ntype, node_composit_init_curves_time);
|
||||
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_curves_time);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
@@ -89,6 +94,8 @@ static bNodeSocketTemplate cmp_node_curve_vec_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
/* stack order input: vec */
|
||||
@@ -97,6 +104,8 @@ static void node_composit_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeS
|
||||
curvemapping_evaluate_premulRGBF(node->storage, out[0]->vec, in[0]->vec);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_curve_vec(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f);
|
||||
@@ -111,7 +120,9 @@ void register_node_type_cmp_curve_vec(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 200, 140, 320);
|
||||
node_type_init(&ntype, node_composit_init_curve_vec);
|
||||
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_curve_vec);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
@@ -131,6 +142,8 @@ static bNodeSocketTemplate cmp_node_curve_rgb_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_curves(bNode *node, float *out, float *in)
|
||||
{
|
||||
curvemapping_evaluate_premulRGBF(node->storage, out, in);
|
||||
@@ -184,6 +197,8 @@ static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeS
|
||||
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
|
||||
@@ -198,7 +213,9 @@ void register_node_type_cmp_curve_rgb(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 200, 140, 320);
|
||||
node_type_init(&ntype, node_composit_init_curve_rgb);
|
||||
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_curve_rgb);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ static bNodeSocketTemplate cmp_node_defocus_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
// line coefs for point sampling & scancon. data.
|
||||
typedef struct BokehCoeffs {
|
||||
@@ -865,6 +866,8 @@ static void node_composit_exec_defocus(void *UNUSED(data), bNode *node, bNodeSta
|
||||
if (zbuf_use && (zbuf_use != zbuf)) free_compbuf(zbuf_use);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
/* qdn: defocus node */
|
||||
@@ -891,7 +894,9 @@ void register_node_type_cmp_defocus(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 150, 120, 200);
|
||||
node_type_init(&ntype, node_composit_init_defocus);
|
||||
node_type_storage(&ntype, "NodeDefocus", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_defocus);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_diff_matte_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float *inColor2)
|
||||
{
|
||||
NodeChroma *c= (NodeChroma *)node->storage;
|
||||
@@ -126,6 +128,8 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **
|
||||
free_compbuf(imbuf2);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_diff_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
|
||||
@@ -143,7 +147,9 @@ void register_node_type_cmp_diff_matte(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 200, 80, 250);
|
||||
node_type_init(&ntype, node_composit_init_diff_matte);
|
||||
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_diff_matte);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_dilateerode_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void morpho_dilate(CompBuf *cbuf)
|
||||
{
|
||||
int x, y;
|
||||
@@ -146,6 +148,8 @@ static void node_composit_exec_dilateerode(void *UNUSED(data), bNode *node, bNod
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_dilateerode(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeDilateErode *data = MEM_callocN(sizeof(NodeDilateErode), "NodeDilateErode");
|
||||
@@ -161,7 +165,9 @@ void register_node_type_cmp_dilateerode(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, cmp_node_dilateerode_in, cmp_node_dilateerode_out);
|
||||
node_type_size(&ntype, 130, 100, 320);
|
||||
node_type_init(&ntype, node_composit_init_dilateerode);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_dilateerode);
|
||||
#endif
|
||||
|
||||
node_type_storage(&ntype, "NodeDilateErode", node_free_standard_storage, node_copy_standard_storage);
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ static bNodeSocketTemplate cmp_node_dblur_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static CompBuf *dblur(bNode *node, CompBuf *img, int iterations, int wrap,
|
||||
float center_x, float center_y, float dist, float angle, float spin, float zoom)
|
||||
{
|
||||
@@ -122,6 +124,8 @@ static void node_composit_exec_dblur(void *UNUSED(data), bNode *node, bNodeStack
|
||||
out[0]->data = dblur(node, new, ndbd->iter, ndbd->wrap, ndbd->center_x, ndbd->center_y, ndbd->distance, ndbd->angle, ndbd->spin, ndbd->zoom);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_dblur(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeDBlurData *ndbd = MEM_callocN(sizeof(NodeDBlurData), "node dblur data");
|
||||
@@ -139,7 +143,9 @@ void register_node_type_cmp_dblur(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 150, 120, 200);
|
||||
node_type_init(&ntype, node_composit_init_dblur);
|
||||
node_type_storage(&ntype, "NodeDBlurData", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_dblur);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ static bNodeSocketTemplate cmp_node_displace_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* minimum distance (in pixels) a pixel has to be displaced
|
||||
* in order to take effect */
|
||||
#define DISPLACE_EPSILON 0.01f
|
||||
@@ -182,6 +184,8 @@ static void node_composit_exec_displace(void *UNUSED(data), bNode *node, bNodeSt
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_displace(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -189,7 +193,9 @@ void register_node_type_cmp_displace(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_displace_in, cmp_node_displace_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_displace);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_distance_matte_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* note, keyvals is passed on from caller as stack array */
|
||||
/* might have been nicer as temp struct though... */
|
||||
static void do_distance_matte(bNode *node, float *out, float *in)
|
||||
@@ -182,6 +184,8 @@ static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStac
|
||||
free_compbuf(inbuf);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_distance_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
|
||||
@@ -200,7 +204,9 @@ void register_node_type_cmp_distance_matte(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 200, 80, 250);
|
||||
node_type_init(&ntype, node_composit_init_distance_matte);
|
||||
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_distance_matte);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ static bNodeSocketTemplate cmp_node_doubleedgemask_out[]= {
|
||||
{ -1, 0, "" } // output socket array terminator
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_adjacentKeepBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize)
|
||||
{
|
||||
int x;
|
||||
@@ -1271,6 +1273,8 @@ static void node_composit_exec_doubleedgemask(void *UNUSED(data), bNode *node, b
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_doubleedgemask(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype; // allocate a node type data structure
|
||||
@@ -1278,7 +1282,9 @@ void register_node_type_cmp_doubleedgemask(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_DOUBLEEDGEMASK, "Double Edge Mask", NODE_CLASS_MATTE, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_doubleedgemask_in, cmp_node_doubleedgemask_out);
|
||||
node_type_size(&ntype, 210, 210, 210);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_doubleedgemask);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_filter_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_filter_edge(CompBuf *out, CompBuf *in, float *filter, float fac)
|
||||
{
|
||||
float *row1, *row2, *row3;
|
||||
@@ -219,6 +221,7 @@ static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_filter(bNodeTreeType *ttype)
|
||||
{
|
||||
@@ -228,7 +231,9 @@ void register_node_type_cmp_filter(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, cmp_node_filter_in, cmp_node_filter_out);
|
||||
node_type_size(&ntype, 80, 40, 120);
|
||||
node_type_label(&ntype, node_filter_label);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_filter);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_flip_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_flip(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
if (in[0]->data) {
|
||||
@@ -88,6 +90,8 @@ static void node_composit_exec_flip(void *UNUSED(data), bNode *node, bNodeStack
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_flip(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -95,7 +99,9 @@ void register_node_type_cmp_flip(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_flip_in, cmp_node_flip_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_flip);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_gamma_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_gamma(bNode *UNUSED(node), float *out, float *in, float *fac)
|
||||
{
|
||||
int i=0;
|
||||
@@ -75,6 +77,8 @@ static void node_composit_exec_gamma(void *UNUSED(data), bNode *node, bNodeStack
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_gamma(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -82,7 +86,9 @@ void register_node_type_cmp_gamma(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_gamma_in, cmp_node_gamma_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_gamma);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ static bNodeSocketTemplate cmp_node_glare_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
// mix two images, src buffer does not have to be same size,
|
||||
static void mixImages(CompBuf *dst, CompBuf *src, float mix)
|
||||
@@ -474,6 +475,8 @@ static void node_composit_exec_glare(void *UNUSED(data), bNode *node, bNodeStack
|
||||
out[0]->data = new;
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_glare(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeGlare *ndg = MEM_callocN(sizeof(NodeGlare), "node glare data");
|
||||
@@ -499,7 +502,9 @@ void register_node_type_cmp_glare(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 150, 120, 200);
|
||||
node_type_init(&ntype, node_composit_init_glare);
|
||||
node_type_storage(&ntype, "NodeGlare", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_glare);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_hue_sat_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_hue_sat_fac(bNode *node, float *out, float *in, float *fac)
|
||||
{
|
||||
NodeHueSat *nhs= node->storage;
|
||||
@@ -93,6 +95,8 @@ static void node_composit_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeSta
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_hue_sat(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeHueSat *nhs= MEM_callocN(sizeof(NodeHueSat), "node hue sat");
|
||||
@@ -111,7 +115,9 @@ void register_node_type_cmp_hue_sat(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 150, 80, 250);
|
||||
node_type_init(&ntype, node_composit_init_hue_sat);
|
||||
node_type_storage(&ntype, "NodeHueSat", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_hue_sat);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_huecorrect_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_huecorrect(bNode *node, float *out, float *in)
|
||||
{
|
||||
float hsv[3], f;
|
||||
@@ -135,6 +137,8 @@ static void node_composit_exec_huecorrect(void *UNUSED(data), bNode *node, bNode
|
||||
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_huecorrect(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
CurveMapping *cumapping = node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
|
||||
@@ -160,7 +164,9 @@ void register_node_type_cmp_huecorrect(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 320, 140, 400);
|
||||
node_type_init(&ntype, node_composit_init_huecorrect);
|
||||
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_huecorrect);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_idmask_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* stackbuf should be zeroed */
|
||||
static void do_idmask(CompBuf *stackbuf, CompBuf *cbuf, float idnr)
|
||||
{
|
||||
@@ -106,6 +108,7 @@ static void node_composit_exec_idmask(void *data, bNode *node, bNodeStack **in,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_idmask(bNodeTreeType *ttype)
|
||||
{
|
||||
@@ -114,7 +117,9 @@ void register_node_type_cmp_idmask(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_idmask_in, cmp_node_idmask_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_idmask);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -322,6 +322,8 @@ float *node_composit_get_float_buffer(RenderData *rd, ImBuf *ibuf, int *alloc)
|
||||
return rect;
|
||||
}
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* note: this function is used for multilayer too, to ensure uniform
|
||||
* handling with BKE_image_get_ibuf() */
|
||||
static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *iuser)
|
||||
@@ -519,6 +521,8 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_image(bNodeTree *ntree, bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
|
||||
@@ -563,7 +567,9 @@ void register_node_type_cmp_image(bNodeTreeType *ttype)
|
||||
node_type_init(&ntype, node_composit_init_image);
|
||||
node_type_storage(&ntype, "ImageUser", node_composit_free_image, node_composit_copy_image);
|
||||
node_type_update(&ntype, cmp_node_image_update, NULL);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_image);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
@@ -571,6 +577,8 @@ void register_node_type_cmp_image(bNodeTreeType *ttype)
|
||||
|
||||
/* **************** RENDER RESULT ******************** */
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, int recty, int passcode)
|
||||
{
|
||||
float *fp= RE_RenderLayerGetPass(rl, passcode);
|
||||
@@ -653,8 +661,6 @@ static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStac
|
||||
out[RRES_OUT_TRANSM_COLOR]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_TRANSM_COLOR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
|
||||
{
|
||||
Scene *sce= (Scene *)node->id;
|
||||
@@ -704,6 +710,8 @@ static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNU
|
||||
RE_ReleaseResult(re);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_rlayers(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -711,7 +719,9 @@ void register_node_type_cmp_rlayers(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, NULL, cmp_node_rlayers_out);
|
||||
node_type_size(&ntype, 150, 100, 300);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_rlayers);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,10 +44,15 @@ static bNodeSocketTemplate cmp_node_inpaint_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_inpaint(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
|
||||
{
|
||||
/* pass */
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_inpaint(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -55,7 +60,9 @@ void register_node_type_cmp_inpaint(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_INPAINT, "Inpaint", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_inpaint_in, cmp_node_inpaint_out);
|
||||
node_type_size(&ntype, 130, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_inpaint);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_invert_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_invert(bNode *node, float *out, float *in)
|
||||
{
|
||||
if (node->custom1 & CMP_CHAN_RGB) {
|
||||
@@ -115,6 +117,8 @@ static void node_composit_exec_invert(void *UNUSED(data), bNode *node, bNodeStac
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_invert(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
node->custom1 |= CMP_CHAN_RGB;
|
||||
@@ -129,7 +133,9 @@ void register_node_type_cmp_invert(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, cmp_node_invert_in, cmp_node_invert_out);
|
||||
node_type_size(&ntype, 120, 120, 140);
|
||||
node_type_init(&ntype, node_composit_init_invert);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_invert);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_lensdist_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* assumes *dst is type RGBA */
|
||||
static void lensDistort(CompBuf *dst, CompBuf *src, float kr, float kg, float kb, int jit, int proj, int fit)
|
||||
{
|
||||
@@ -182,6 +184,7 @@ static void node_composit_exec_lensdist(void *UNUSED(data), bNode *node, bNodeSt
|
||||
out[0]->data = new;
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_lensdist(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
@@ -200,7 +203,9 @@ void register_node_type_cmp_lensdist(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 150, 120, 200);
|
||||
node_type_init(&ntype, node_composit_init_lensdist);
|
||||
node_type_storage(&ntype, "NodeLensDist", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_lensdist);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_view_levels_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void fill_bins(bNode* node, CompBuf* in, int* bins)
|
||||
{
|
||||
float value[4];
|
||||
@@ -309,6 +311,8 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack *
|
||||
free_compbuf(histogram);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_view_levels(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
node->custom1=1; /*All channels*/
|
||||
@@ -323,7 +327,9 @@ void register_node_type_cmp_view_levels(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
node_type_init(&ntype, node_composit_init_view_levels);
|
||||
node_type_storage(&ntype, "ImageUser", NULL, NULL);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_view_levels);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_luma_matte_out[]={
|
||||
{-1, 0, ""}
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_luma_matte(bNode *node, float *out, float *in)
|
||||
{
|
||||
NodeChroma *c=(NodeChroma *)node->storage;
|
||||
@@ -96,6 +98,8 @@ static void node_composit_exec_luma_matte(void *data, bNode *node, bNodeStack **
|
||||
free_compbuf(cbuf);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_luma_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
|
||||
@@ -113,7 +117,9 @@ void register_node_type_cmp_luma_matte(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 200, 80, 250);
|
||||
node_type_init(&ntype, node_composit_init_luma_matte);
|
||||
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_luma_matte);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_mapuv_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* foreach UV, use these values to read in cbuf and write to stackbuf */
|
||||
/* stackbuf should be zeroed */
|
||||
static void do_mapuv(CompBuf *stackbuf, CompBuf *cbuf, CompBuf *uvbuf, float threshold)
|
||||
@@ -162,6 +164,8 @@ static void node_composit_exec_mapuv(void *UNUSED(data), bNode *node, bNodeStack
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_mapuv(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -169,7 +173,9 @@ void register_node_type_cmp_mapuv(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_mapuv_in, cmp_node_mapuv_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_mapuv);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ static bNodeSocketTemplate cmp_node_map_value_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_map_value(bNode *node, float *out, float *src)
|
||||
{
|
||||
TexMapping *texmap= node->storage;
|
||||
@@ -76,6 +78,7 @@ static void node_composit_exec_map_value(void *UNUSED(data), bNode *node, bNodeS
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_map_value(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
@@ -91,7 +94,9 @@ void register_node_type_cmp_map_value(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 100, 60, 150);
|
||||
node_type_init(&ntype, node_composit_init_map_value);
|
||||
node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_map_value);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_math_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_math(bNode *node, float *out, float *in, float *in2)
|
||||
{
|
||||
switch (node->custom1) {
|
||||
@@ -195,6 +197,8 @@ static void node_composit_exec_math(void *UNUSED(data), bNode *node, bNodeStack
|
||||
out[0]->data= stackbuf;
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_math(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -203,7 +207,9 @@ void register_node_type_cmp_math(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, cmp_node_math_in, cmp_node_math_out);
|
||||
node_type_size(&ntype, 120, 110, 160);
|
||||
node_type_label(&ntype, node_math_label);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_math);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_mix_rgb_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_mix_rgb(bNode *node, float *out, float *in1, float *in2, float *fac)
|
||||
{
|
||||
float col[3];
|
||||
@@ -81,6 +83,8 @@ static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
/* custom1 = mix type */
|
||||
void register_node_type_cmp_mix_rgb(bNodeTreeType *ttype)
|
||||
{
|
||||
@@ -90,7 +94,9 @@ void register_node_type_cmp_mix_rgb(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, cmp_node_mix_rgb_in, cmp_node_mix_rgb_out);
|
||||
node_type_size(&ntype, 110, 60, 120);
|
||||
node_type_label(&ntype, node_blend_label);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_mix_rgb);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ static bNodeSocketTemplate cmp_node_movieclip_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static CompBuf *node_composit_get_movieclip(RenderData *rd, MovieClip *clip, MovieClipUser *user)
|
||||
{
|
||||
ImBuf *orig_ibuf, *ibuf;
|
||||
@@ -138,6 +140,8 @@ static void node_composit_exec_movieclip(void *data, bNode *node, bNodeStack **U
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
MovieClipUser *user = MEM_callocN(sizeof(MovieClipUser), "node movie clip user");
|
||||
@@ -155,7 +159,9 @@ void register_node_type_cmp_movieclip(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 120, 80, 300);
|
||||
node_type_init(&ntype, init);
|
||||
node_type_storage(&ntype, "MovieClipUser", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_movieclip);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_normal_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_normal(bNode *node, float *out, float *in)
|
||||
{
|
||||
bNodeSocket *sock= node->outputs.first;
|
||||
@@ -77,10 +79,10 @@ static void node_composit_exec_normal(void *UNUSED(data), bNode *node, bNodeStac
|
||||
|
||||
out[1]->data= stackbuf;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
bNodeSocket *sock= node->outputs.first;
|
||||
@@ -99,7 +101,9 @@ void register_node_type_cmp_normal(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, cmp_node_normal_in, cmp_node_normal_out);
|
||||
node_type_init(&ntype, init);
|
||||
node_type_size(&ntype, 100, 60, 200);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_normal);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_normalize_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_normalize(bNode *UNUSED(node), float *out, float *src, float *min, float *mult)
|
||||
{
|
||||
float res;
|
||||
@@ -102,6 +104,8 @@ static void node_composit_exec_normalize(void *UNUSED(data), bNode *node, bNodeS
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_normalize(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -109,7 +113,9 @@ void register_node_type_cmp_normalize(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_normalize_in, cmp_node_normalize_out);
|
||||
node_type_size(&ntype, 100, 60, 150);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_normalize);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_premulkey_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_premulkey(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
if (out[0]->hasoutput==0)
|
||||
@@ -61,6 +63,8 @@ static void node_composit_exec_premulkey(void *UNUSED(data), bNode *node, bNodeS
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_premulkey(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -68,7 +72,9 @@ void register_node_type_cmp_premulkey(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_premulkey_in, cmp_node_premulkey_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_premulkey);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,18 @@ static bNodeSocketTemplate cmp_node_rgb_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
|
||||
{
|
||||
bNodeSocket *sock= node->outputs.first;
|
||||
float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
|
||||
|
||||
copy_v4_v4(out[0]->vec, col);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_rgb(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
bNodeSocket *sock= node->outputs.first;
|
||||
@@ -50,14 +62,6 @@ static void node_composit_init_rgb(bNodeTree *UNUSED(ntree), bNode *node, bNodeT
|
||||
col[3] = 1.0f;
|
||||
}
|
||||
|
||||
static void node_composit_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
|
||||
{
|
||||
bNodeSocket *sock= node->outputs.first;
|
||||
float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
|
||||
|
||||
copy_v4_v4(out[0]->vec, col);
|
||||
}
|
||||
|
||||
void register_node_type_cmp_rgb(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -66,7 +70,9 @@ void register_node_type_cmp_rgb(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, NULL, cmp_node_rgb_out);
|
||||
node_type_init(&ntype, node_composit_init_rgb);
|
||||
node_type_size(&ntype, 140, 80, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_rgb);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_rotate_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* only supports RGBA nodes now */
|
||||
static void node_composit_exec_rotate(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
@@ -121,6 +123,8 @@ static void node_composit_exec_rotate(void *UNUSED(data), bNode *node, bNodeStac
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_rotate(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
node->custom1= 1; /* Bilinear Filter*/
|
||||
@@ -134,7 +138,9 @@ void register_node_type_cmp_rotate(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, cmp_node_rotate_in, cmp_node_rotate_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
node_type_init(&ntype, node_composit_init_rotate);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_rotate);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_scale_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* only supports RGBA nodes now */
|
||||
/* node->custom1 stores if input values are absolute or relative scale */
|
||||
static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
@@ -182,6 +184,8 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_scale(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -189,7 +193,9 @@ void register_node_type_cmp_scale(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_scale_in, cmp_node_scale_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_scale);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ static bNodeSocketTemplate cmp_node_sephsva_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_sephsva(bNode *UNUSED(node), float *out, float *in)
|
||||
{
|
||||
float h, s, v;
|
||||
@@ -99,6 +101,8 @@ static void node_composit_exec_sephsva(void *UNUSED(data), bNode *node, bNodeSta
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_sephsva(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -106,7 +110,9 @@ void register_node_type_cmp_sephsva(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0);
|
||||
node_type_socket_templates(&ntype, cmp_node_sephsva_in, cmp_node_sephsva_out);
|
||||
node_type_size(&ntype, 80, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_sephsva);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
@@ -125,6 +131,8 @@ static bNodeSocketTemplate cmp_node_combhsva_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_comb_hsva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
|
||||
{
|
||||
float r, g, b;
|
||||
@@ -168,6 +176,8 @@ static void node_composit_exec_combhsva(void *UNUSED(data), bNode *node, bNodeSt
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_combhsva(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -175,7 +185,9 @@ void register_node_type_cmp_combhsva(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_combhsva_in, cmp_node_combhsva_out);
|
||||
node_type_size(&ntype, 80, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_combhsva);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_seprgba_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_seprgba(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
/* stack order out: bw channels */
|
||||
@@ -77,6 +79,8 @@ static void node_composit_exec_seprgba(void *UNUSED(data), bNode *UNUSED(node),
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_seprgba(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -84,7 +88,9 @@ void register_node_type_cmp_seprgba(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTOR, 0);
|
||||
node_type_socket_templates(&ntype, cmp_node_seprgba_in, cmp_node_seprgba_out);
|
||||
node_type_size(&ntype, 80, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_seprgba);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
@@ -104,6 +110,8 @@ static bNodeSocketTemplate cmp_node_combrgba_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_combrgba(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
|
||||
{
|
||||
out[0] = in1[0];
|
||||
@@ -145,6 +153,8 @@ static void node_composit_exec_combrgba(void *UNUSED(data), bNode *node, bNodeSt
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_combrgba(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -152,7 +162,9 @@ void register_node_type_cmp_combrgba(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_combrgba_in, cmp_node_combrgba_out);
|
||||
node_type_size(&ntype, 80, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_combrgba);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ static bNodeSocketTemplate cmp_node_sepycca_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_sepycca_601(bNode *UNUSED(node), float *out, float *in)
|
||||
{
|
||||
float y, cb, cr;
|
||||
@@ -146,6 +148,8 @@ static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeSta
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_sepycca(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -153,7 +157,9 @@ void register_node_type_cmp_sepycca(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_sepycca_in, cmp_node_sepycca_out);
|
||||
node_type_size(&ntype, 80, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_sepycca);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
@@ -173,6 +179,8 @@ static bNodeSocketTemplate cmp_node_combycca_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_comb_ycca_601(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
|
||||
{
|
||||
float r, g, b;
|
||||
@@ -291,6 +299,8 @@ static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeSt
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_combycca(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -298,7 +308,9 @@ void register_node_type_cmp_combycca(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_combycca_in, cmp_node_combycca_out);
|
||||
node_type_size(&ntype, 80, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_combycca);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ static bNodeSocketTemplate cmp_node_sepyuva_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_sepyuva(bNode *UNUSED(node), float *out, float *in)
|
||||
{
|
||||
float y, u, v;
|
||||
@@ -99,6 +101,9 @@ static void node_composit_exec_sepyuva(void *UNUSED(data), bNode *node, bNodeSta
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
|
||||
void register_node_type_cmp_sepyuva(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -106,7 +111,9 @@ void register_node_type_cmp_sepyuva(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTOR, 0);
|
||||
node_type_socket_templates(&ntype, cmp_node_sepyuva_in, cmp_node_sepyuva_out);
|
||||
node_type_size(&ntype, 80, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_sepyuva);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
@@ -126,6 +133,8 @@ static bNodeSocketTemplate cmp_node_combyuva_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_comb_yuva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
|
||||
{
|
||||
float r, g, b;
|
||||
@@ -167,9 +176,11 @@ static void node_composit_exec_combyuva(void *UNUSED(data), bNode *node, bNodeSt
|
||||
do_comb_yuva, CB_VAL, CB_VAL, CB_VAL, CB_VAL);
|
||||
|
||||
out[0]->data= stackbuf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_combyuva(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -177,7 +188,9 @@ void register_node_type_cmp_combyuva(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_combyuva_in, cmp_node_combyuva_out);
|
||||
node_type_size(&ntype, 80, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_combyuva);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ static bNodeSocketTemplate cmp_node_setalpha_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_setalpha(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
/* stack order out: RGBA image */
|
||||
@@ -73,6 +75,9 @@ static void node_composit_exec_setalpha(void *UNUSED(data), bNode *node, bNodeSt
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
|
||||
void register_node_type_cmp_setalpha(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -80,7 +85,9 @@ void register_node_type_cmp_setalpha(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_setalpha_in, cmp_node_setalpha_out);
|
||||
node_type_size(&ntype, 120, 40, 140);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_setalpha);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ static bNodeSocketTemplate cmp_node_splitviewer_in[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_copy_split_rgba(bNode *UNUSED(node), float *out, float *in1, float *in2, float *fac)
|
||||
{
|
||||
if (*fac==0.0f) {
|
||||
@@ -139,6 +141,8 @@ static void node_composit_exec_splitviewer(void *data, bNode *node, bNodeStack *
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_splitviewer(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
|
||||
@@ -158,7 +162,9 @@ void register_node_type_cmp_splitviewer(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
node_type_init(&ntype, node_composit_init_splitviewer);
|
||||
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_splitviewer);
|
||||
#endif
|
||||
/* Do not allow muting for this node. */
|
||||
node_type_internal_connect(&ntype, NULL);
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ static bNodeSocketTemplate cmp_node_stabilize2d_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_stabilize2d(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
if (in[0]->data && node->id) {
|
||||
@@ -67,6 +69,8 @@ static void node_composit_exec_stabilize2d(void *data, bNode *node, bNodeStack *
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_stabilize2d(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -74,7 +78,9 @@ void register_node_type_cmp_stabilize2d(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_STABILIZE2D, "Stabilize 2D", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_stabilize2d_in, cmp_node_stabilize2d_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_stabilize2d);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_texture_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
/* called without rect allocated */
|
||||
static void texture_procedural(CompBuf *cbuf, float *out, float xco, float yco)
|
||||
{
|
||||
@@ -142,6 +144,8 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_texture(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -149,7 +153,9 @@ void register_node_type_cmp_texture(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
|
||||
node_type_socket_templates(&ntype, cmp_node_texture_in, cmp_node_texture_out);
|
||||
node_type_size(&ntype, 120, 80, 240);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_texture);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ static bNodeSocketTemplate cmp_node_tonemap_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static float avgLogLum(CompBuf *src, float* auto_key, float* Lav, float* Cav)
|
||||
{
|
||||
@@ -146,6 +147,8 @@ static void node_composit_exec_tonemap(void *UNUSED(data), bNode *node, bNodeSta
|
||||
free_compbuf(img);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeTonemap *ntm = MEM_callocN(sizeof(NodeTonemap), "node tonemap data");
|
||||
@@ -171,7 +174,9 @@ void register_node_type_cmp_tonemap(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 150, 120, 200);
|
||||
node_type_init(&ntype, node_composit_init_tonemap);
|
||||
node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_tonemap);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -39,10 +39,15 @@ static bNodeSocketTemplate cmp_node_trackpos_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_trackpos(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
|
||||
{
|
||||
/* pass */
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeTrackPosData *data = MEM_callocN(sizeof(NodeTrackPosData), "node track position data");
|
||||
@@ -59,7 +64,9 @@ void register_node_type_cmp_trackpos(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 120, 80, 300);
|
||||
node_type_init(&ntype, init);
|
||||
node_type_storage(&ntype, "NodeTrackPosData", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_trackpos);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ static bNodeSocketTemplate cmp_node_transform_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
CompBuf* node_composit_transform(CompBuf *cbuf, float x, float y, float angle, float scale, int filter_type)
|
||||
{
|
||||
CompBuf *stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, TRUE);
|
||||
@@ -127,6 +129,8 @@ static void node_composit_exec_transform(void *UNUSED(data), bNode *node, bNodeS
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_transform(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -134,7 +138,9 @@ void register_node_type_cmp_transform(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_TRANSFORM, "Transform", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_transform_in, cmp_node_transform_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_transform);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ static bNodeSocketTemplate cmp_node_translate_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_translate(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
if (in[0]->data) {
|
||||
@@ -59,6 +61,8 @@ static void node_composit_exec_translate(void *UNUSED(data), bNode *UNUSED(node)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_translate(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -66,7 +70,9 @@ void register_node_type_cmp_translate(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_translate_in, cmp_node_translate_out);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_translate);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ static bNodeSocketTemplate cmp_node_valtorgb_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_colorband_composit(bNode *node, float *out, float *in)
|
||||
{
|
||||
do_colorband(node->storage, in[0], out);
|
||||
@@ -78,6 +80,8 @@ static void node_composit_exec_valtorgb(void *UNUSED(data), bNode *node, bNodeSt
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_valtorgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
node->storage= add_colorband(1);
|
||||
@@ -92,7 +96,9 @@ void register_node_type_cmp_valtorgb(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 240, 200, 300);
|
||||
node_type_init(&ntype, node_composit_init_valtorgb);
|
||||
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_valtorgb);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
@@ -109,6 +115,8 @@ static bNodeSocketTemplate cmp_node_rgbtobw_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_rgbtobw(bNode *UNUSED(node), float *out, float *in)
|
||||
{
|
||||
out[0] = rgb_to_bw(in);
|
||||
@@ -137,6 +145,8 @@ static void node_composit_exec_rgbtobw(void *UNUSED(data), bNode *node, bNodeSta
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_rgbtobw(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -144,7 +154,9 @@ void register_node_type_cmp_rgbtobw(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
|
||||
node_type_socket_templates(&ntype, cmp_node_rgbtobw_in, cmp_node_rgbtobw_out);
|
||||
node_type_size(&ntype, 80, 40, 120);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_rgbtobw);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ static void node_composit_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNod
|
||||
dval->max = FLT_MAX;
|
||||
}
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
|
||||
{
|
||||
bNodeSocket *sock= node->outputs.first;
|
||||
@@ -57,6 +59,8 @@ static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack
|
||||
out[0]->vec[0]= val;
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_value(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -65,7 +69,9 @@ void register_node_type_cmp_value(bNodeTreeType *ttype)
|
||||
node_type_socket_templates(&ntype, NULL, cmp_node_value_out);
|
||||
node_type_init(&ntype, node_composit_init_value);
|
||||
node_type_size(&ntype, 80, 40, 120);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_value);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ static bNodeSocketTemplate cmp_node_vecblur_out[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_vecblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
@@ -85,6 +85,8 @@ static void node_composit_exec_vecblur(void *UNUSED(data), bNode *node, bNodeSta
|
||||
free_compbuf(img);
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_vecblur(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
NodeBlurData *nbd = MEM_callocN(sizeof(NodeBlurData), "node blur data");
|
||||
@@ -103,7 +105,9 @@ void register_node_type_cmp_vecblur(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 120, 80, 200);
|
||||
node_type_init(&ntype, node_composit_init_vecblur);
|
||||
node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_vecblur);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ static bNodeSocketTemplate cmp_node_viewer_in[] = {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out))
|
||||
{
|
||||
@@ -122,6 +123,8 @@ static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
static void node_composit_init_viewer(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
|
||||
{
|
||||
ImageUser *iuser = MEM_callocN(sizeof(ImageUser), "node image user");
|
||||
@@ -142,7 +145,9 @@ void register_node_type_cmp_viewer(bNodeTreeType *ttype)
|
||||
node_type_size(&ntype, 80, 60, 200);
|
||||
node_type_init(&ntype, node_composit_init_viewer);
|
||||
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_viewer);
|
||||
#endif
|
||||
node_type_internal_connect(&ntype, NULL);
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
|
||||
@@ -48,6 +48,8 @@ static bNodeSocketTemplate cmp_node_zcombine_out[]= {
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
|
||||
static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *src2, float *z2)
|
||||
{
|
||||
float alpha;
|
||||
@@ -219,9 +221,10 @@ static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in
|
||||
|
||||
out[0]->data= stackbuf;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif /* WITH_COMPOSITOR_LEGACY */
|
||||
|
||||
void register_node_type_cmp_zcombine(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
@@ -229,7 +232,9 @@ void register_node_type_cmp_zcombine(bNodeTreeType *ttype)
|
||||
node_type_base(ttype, &ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, cmp_node_zcombine_in, cmp_node_zcombine_out);
|
||||
node_type_size(&ntype, 80, 40, 120);
|
||||
#ifdef WITH_COMPOSITOR_LEGACY
|
||||
node_type_exec(&ntype, node_composit_exec_zcombine);
|
||||
#endif
|
||||
|
||||
nodeRegisterType(ttype, &ntype);
|
||||
}
|
||||
|
||||
@@ -115,12 +115,12 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
|
||||
PyObject *list;
|
||||
|
||||
int absolute = FALSE;
|
||||
int packed = FALSE;
|
||||
int local = FALSE;
|
||||
int packed = FALSE;
|
||||
int local = FALSE;
|
||||
static const char *kwlist[] = {"absolute", "packed", "local", NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kw, "|ii:blend_paths",
|
||||
(char **)kwlist, &absolute, &packed))
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kw, "|iii:blend_paths",
|
||||
(char **)kwlist, &absolute, &packed, &local))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1688,7 +1688,8 @@ PyObject* KX_GameObject::PyReplaceMesh(PyObject* args)
|
||||
|
||||
PyObject* KX_GameObject::PyEndObject()
|
||||
{
|
||||
KX_Scene *scene = KX_GetActiveScene();
|
||||
SG_Node* node = this->GetSGNode();
|
||||
KX_Scene* scene = static_cast<KX_Scene*>(node->GetSGClientInfo());
|
||||
|
||||
scene->DelayedRemoveObject(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user