diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-06-08 13:17:07 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-06-08 13:17:07 +0400 |
commit | de7fe937ff24121ce8c66af902639cd96244a55f (patch) | |
tree | 625821742e2a136e10fe1cd76a81303766b8633f /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 95641388471d178552fea26bb477c13536bd58ef (diff) |
* Added OpenCL kernel for bokeh blur
* Uncomment COM_OPENCL_ENABLED from COM_defines.h to test
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 562684799b4..65d572c6c11 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -71,6 +71,16 @@ EnumPropertyItem node_quality_items[] = { {0, NULL, 0, NULL, NULL} }; +EnumPropertyItem node_chunksize_items[] = { + {NTREE_CHUNCKSIZE_32, "32", 0, "32x32", "Chunksize of 32x32"}, + {NTREE_CHUNCKSIZE_64, "64", 0, "64x64", "Chunksize of 64x64"}, + {NTREE_CHUNCKSIZE_128, "128", 0, "128x128", "Chunksize of 128x128"}, + {NTREE_CHUNCKSIZE_256, "256", 0, "256x256", "Chunksize of 256x256"}, + {NTREE_CHUNCKSIZE_512, "512", 0, "512x512", "Chunksize of 512x512"}, + {NTREE_CHUNCKSIZE_1024, "1024", 0, "1024x1024", "Chunksize of 1024x1024"}, + {0, NULL, 0, NULL, NULL} +}; + EnumPropertyItem node_socket_type_items[] = { {SOCK_FLOAT, "VALUE", 0, "Value", ""}, {SOCK_VECTOR, "VECTOR", 0, "Vector", ""}, @@ -3184,6 +3194,25 @@ static void def_cmp_ellipsemask(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +static void def_cmp_bokehblur(StructRNA *srna) +{ + PropertyRNA *prop; + prop = RNA_def_property(srna, "f_stop", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "custom3"); + RNA_def_property_range(prop, 0.0f, 128.0f); + RNA_def_property_ui_text(prop, "fStop", + "Amount of focal blur, 128=infinity=perfect focus, half the value doubles " + "the blur radius"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "blur_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "custom4"); + RNA_def_property_range(prop, 0.0f, 10000.0f); + RNA_def_property_ui_text(prop, "Max Blur", "Blur limit, maximum CoC radius"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + +} + static void def_cmp_bokehimage(StructRNA *srna) { PropertyRNA *prop; @@ -4029,11 +4058,11 @@ static void rna_def_composite_nodetree(BlenderRNA *brna) RNA_def_property_enum_items(prop, node_quality_items); RNA_def_property_ui_text(prop, "Edit Quality", "Quality when editing"); - prop = RNA_def_property(srna, "chunk_size", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "chunksize"); + prop = RNA_def_property(srna, "chunk_size", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "chunksize"); + RNA_def_property_enum_items(prop, node_chunksize_items); RNA_def_property_ui_text(prop, "Chunksize", "Max size of a tile (smaller values gives better distribution " "of multiple threads, but more overhead)"); - RNA_def_property_range(prop, 32, 1024); prop = RNA_def_property(srna, "use_opencl", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NTREE_COM_OPENCL); |