From 32478997ec1fac6b155ffc1442312c4c33fd53df Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Jun 2012 18:29:47 +0000 Subject: style cleanup --- source/blender/makesrna/intern/rna_nodetree.c | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 33eb755a96d..d7970bf3d40 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2049,10 +2049,10 @@ static void def_cmp_dilate_erode(StructRNA *srna) PropertyRNA *prop; static EnumPropertyItem type_items[] = { - {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""}, - {CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""}, - {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""}, - {CMP_NODE_DILATEERODE_DISTANCE_FEATHER,"FEATHER", 0, "Feather", ""}, + {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""}, + {CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""}, + {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""}, + {CMP_NODE_DILATEERODE_DISTANCE_FEATHER, "FEATHER", 0, "Feather", ""}, {0, NULL, 0, NULL, NULL} }; @@ -3551,14 +3551,14 @@ static void def_cmp_keyingscreen(StructRNA *srna) RNA_def_property_struct_type(prop, "MovieClip"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Movie Clip", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); RNA_def_struct_sdna_from(srna, "NodeKeyingScreenData", "storage"); prop = RNA_def_property(srna, "tracking_object", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "tracking_object"); RNA_def_property_ui_text(prop, "Tracking Object", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void def_cmp_keying(StructRNA *srna) @@ -3571,19 +3571,19 @@ static void def_cmp_keying(StructRNA *srna) RNA_def_property_float_sdna(prop, NULL, "screen_balance"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Screen Balance", "Balance between two non-primary channels primary channel is comparing against"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "despill_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "despill_factor"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Despill", "Factor of despilling screen color from image"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "clip_black", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "clip_black"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Clip Black", "Value of non-scaled matte pixel which considers as fully background pixel"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "clip_white", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "clip_white"); @@ -3595,31 +3595,31 @@ static void def_cmp_keying(StructRNA *srna) RNA_def_property_int_sdna(prop, NULL, "blur_pre"); RNA_def_property_range(prop, 0, 2048); RNA_def_property_ui_text(prop, "Pre Blur", "Chroma pre-blur size which applies before running keyer"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "blur_post", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "blur_post"); RNA_def_property_range(prop, 0, 2048); RNA_def_property_ui_text(prop, "Post Blur", "Matte blur size which applies after clipping and dilate/eroding"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "dilate_distance", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "dilate_distance"); RNA_def_property_range(prop, -100, 100); RNA_def_property_ui_text(prop, "Dilate/Erode", "Matte dilate/erode side"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "edge_kernel_radius", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "edge_kernel_radius"); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "Edge Kernel Radius", "Radius of kernel used to detect whether pixel belongs to edge"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "edge_kernel_tolerance", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "edge_kernel_tolerance"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Edge Kernel Tolerance", "Tolerance to pixels inside kernel which are treating as belonging to the same plane"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "feather_falloff", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "feather_falloff"); -- cgit v1.2.3 From 57b69abe0d3263c4f03d453d896ee9527c75d673 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Thu, 28 Jun 2012 10:59:40 +0000 Subject: Fix for image node: The button draw function was using the image user pointer for displaying properties, which does not work correctly. The image node has to redefine image user RNA properties in order to make correct update calls and to have meaningful image layer names. For these properties the node pointer itself has to be used then. --- source/blender/makesrna/intern/rna_nodetree.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index d7970bf3d40..cb1a45ed971 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1944,6 +1944,10 @@ static void def_cmp_image(StructRNA *srna) RNA_def_property_ui_text(prop, "Image", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + /* NB: image user properties used in the UI are redefined in def_node_image_user, + * to trigger correct updates of the node editor. RNA design problem that prevents + * updates from nested structs ... + */ RNA_def_struct_sdna_from(srna, "ImageUser", "storage"); def_node_image_user(srna); } -- cgit v1.2.3 From 778999cbbf6d6430f6c8d75d8d9e2ea49fa8ace6 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Wed, 4 Jul 2012 11:39:28 +0000 Subject: Two pass execution: 1. first pass only fast nodes are calculated and only to the active viewer node 2. second pass all nodes to all outputs Temp disabled highlights because of random crashes. --- source/blender/makesrna/intern/rna_nodetree.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index cb1a45ed971..1a70745b92a 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4267,6 +4267,10 @@ static void rna_def_composite_nodetree(BlenderRNA *brna) prop = RNA_def_property(srna, "use_opencl", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NTREE_COM_OPENCL); RNA_def_property_ui_text(prop, "OpenCL", "Enable GPU calculations"); + + prop = RNA_def_property(srna, "two_pass", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", NTREE_TWO_PASS); + RNA_def_property_ui_text(prop, "Two Pass", "Use two pass execution during editing; First calculate fast nodes, second pass calculate all nodes."); } static void rna_def_shader_nodetree(BlenderRNA *brna) -- cgit v1.2.3 From 558721ab59bd4e6186005f5e9aca50e094c9e72c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 4 Jul 2012 15:04:38 +0000 Subject: More spell checking. --- source/blender/makesrna/intern/rna_nodetree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 1a70745b92a..a39c168c594 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3259,7 +3259,7 @@ static void def_cmp_ellipsemask(StructRNA *srna) RNA_def_property_float_sdna(prop, NULL, "rotation"); RNA_def_property_float_default(prop, 0.0f); RNA_def_property_range(prop, -1000.0f, 1000.0f); - RNA_def_property_ui_text(prop, "Rotation", "Rotationangle of the box"); + RNA_def_property_ui_text(prop, "Rotation", "Rotation angle of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } @@ -4270,7 +4270,8 @@ static void rna_def_composite_nodetree(BlenderRNA *brna) prop = RNA_def_property(srna, "two_pass", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NTREE_TWO_PASS); - RNA_def_property_ui_text(prop, "Two Pass", "Use two pass execution during editing; First calculate fast nodes, second pass calculate all nodes."); + RNA_def_property_ui_text(prop, "Two Pass", "Use two pass execution during editing: first calculate fast nodes, " + "second pass calculate all nodes"); } static void rna_def_shader_nodetree(BlenderRNA *brna) -- cgit v1.2.3