diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 59 |
1 files changed, 52 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index fa8d2669161..8d2a44136e8 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3038,6 +3038,13 @@ static void def_frame(StructRNA *srna) { PropertyRNA *prop; + prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "id"); + RNA_def_property_struct_type(prop, "Text"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Text", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + RNA_def_struct_sdna_from(srna, "NodeFrame", "storage"); prop = RNA_def_property(srna, "shrink", PROP_BOOLEAN, PROP_NONE); @@ -3431,10 +3438,14 @@ static void def_sh_tex_image(StructRNA *srna) }; static const EnumPropertyItem prop_projection_items[] = { - {SHD_PROJ_FLAT, "FLAT", 0, "Flat", - "Image is projected flat using the X and Y coordinates of the texture vector"}, - {SHD_PROJ_BOX, "BOX", 0, "Box", - "Image is projected using different components for each side of the object space bounding box"}, + {SHD_PROJ_FLAT, "FLAT", 0, "Flat", + "Image is projected flat using the X and Y coordinates of the texture vector"}, + {SHD_PROJ_BOX, "BOX", 0, "Box", + "Image is projected using different components for each side of the object space bounding box"}, + {SHD_PROJ_SPHERE, "SPHERE", 0, "Sphere", + "Image is projected spherically using the Z axis as central"}, + {SHD_PROJ_TUBE, "TUBE", 0, "Tube", + "Image is projected from the tube using the Z axis as central"}, {0, NULL, 0, NULL, NULL} }; @@ -3444,7 +3455,7 @@ static void def_sh_tex_image(StructRNA *srna) {SHD_INTERP_CLOSEST, "Closest", 0, "Closest", "No interpolation (sample closest texel)"}, {SHD_INTERP_CUBIC, "Cubic", 0, "Cubic", - "Cubic interpolation (OSL only)"}, + "Cubic interpolation (CPU only)"}, {SHD_INTERP_SMART, "Smart", 0, "Smart", "Bicubic when magnifying, else bilinear (OSL only)"}, {0, NULL, 0, NULL, NULL} @@ -3643,7 +3654,14 @@ static void def_sh_tex_wave(StructRNA *srna) static void def_sh_tex_coord(StructRNA *srna) { PropertyRNA *prop; - + + prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "id"); + RNA_def_property_struct_type(prop, "Object"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Object", "Use coordinates from this object (for object texture coordinates output)"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + prop = RNA_def_property(srna, "from_dupli", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1); RNA_def_property_ui_text(prop, "From Dupli", "Use the parent of the dupli object if possible"); @@ -6213,6 +6231,21 @@ static void def_cmp_planetrackdeform(StructRNA *srna) RNA_def_property_string_sdna(prop, NULL, "plane_track_name"); RNA_def_property_ui_text(prop, "Plane Track", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CMP_NODEFLAG_PLANETRACKDEFORM_MOTION_BLUR); + RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled motion blur of the mask"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE); + RNA_def_property_range(prop, 1, CMP_NODE_PLANETRACKDEFORM_MBLUR_SAMPLES_MAX); + RNA_def_property_ui_text(prop, "Samples", "Number of motion blur samples"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0, 1.0f); + RNA_def_property_ui_text(prop, "Shutter", "Exposure for motion blur as a factor of FPS"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void def_cmp_sunbeams(StructRNA *srna) @@ -7105,7 +7138,13 @@ static void rna_def_node(BlenderRNA *brna) static EnumPropertyItem dummy_static_type_items[] = { {NODE_CUSTOM, "CUSTOM", 0, "Custom", "Custom Node"}, {0, NULL, 0, NULL, NULL}}; - + + static EnumPropertyItem node_shading_compatibilities[] = { + {NODE_OLD_SHADING, "OLD_SHADING", 0, "Old Shading", "Old shading system compatibility"}, + {NODE_NEW_SHADING, "NEW_SHADING", 0, "New Shading", "New shading system compatibility"}, + {0, NULL, 0, NULL, NULL} + }; + srna = RNA_def_struct(brna, "Node", NULL); RNA_def_struct_ui_text(srna, "Node", "Node in a node tree"); RNA_def_struct_sdna(srna, "bNode"); @@ -7245,6 +7284,12 @@ static void rna_def_node(BlenderRNA *brna) parm = RNA_def_boolean(func, "result", false, "Result", ""); RNA_def_function_return(func, parm); + prop = RNA_def_property(srna, "shading_compatibility", PROP_ENUM, PROP_NONE); + RNA_def_property_flag(prop, PROP_ENUM_FLAG); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_enum_sdna(prop, NULL, "typeinfo->compatibility"); + RNA_def_property_enum_items(prop, node_shading_compatibilities); + /* registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname"); |