diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-06-05 19:56:04 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-06-06 04:58:43 +0400 |
commit | 269b14f184bc93af0267f472f03c4b9852a45adb (patch) | |
tree | 265c326cc170800aeaec480008a66bc4940d43c3 | |
parent | 70e98a21e0db11c14e9f32f1428d8f0c2abf377f (diff) |
Freestyle: Fix for viewport render not updating with changes of Freestyle settings.
-rw-r--r-- | source/blender/editors/render/render_shading.c | 33 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_linestyle.c | 206 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 109 |
3 files changed, 184 insertions, 164 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index f0d418b9980..9cc672fe8ae 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -652,6 +652,7 @@ static int freestyle_module_remove_exec(bContext *C, wmOperator *UNUSED(op)) BKE_freestyle_module_delete(&srl->freestyleConfig, module); + DAG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -686,6 +687,7 @@ static int freestyle_module_move_exec(bContext *C, wmOperator *op) else { BKE_freestyle_module_move_down(&srl->freestyleConfig, module); } + DAG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -722,6 +724,7 @@ static int freestyle_lineset_add_exec(bContext *C, wmOperator *UNUSED(op)) BKE_freestyle_lineset_add(&srl->freestyleConfig, NULL); + DAG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -760,8 +763,6 @@ static int freestyle_lineset_copy_exec(bContext *C, wmOperator *UNUSED(op)) FRS_copy_active_lineset(&srl->freestyleConfig); - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); - return OPERATOR_FINISHED; } @@ -787,6 +788,7 @@ static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op)) FRS_paste_active_lineset(&srl->freestyleConfig); + DAG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -814,6 +816,7 @@ static int freestyle_lineset_remove_exec(bContext *C, wmOperator *UNUSED(op)) FRS_delete_active_lineset(&srl->freestyleConfig); + DAG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -846,6 +849,7 @@ static int freestyle_lineset_move_exec(bContext *C, wmOperator *op) else { FRS_move_active_lineset_down(&srl->freestyleConfig); } + DAG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -892,8 +896,8 @@ static int freestyle_linestyle_new_exec(bContext *C, wmOperator *op) else { lineset->linestyle = BKE_new_linestyle("LineStyle", NULL); } - - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); + DAG_id_tag_update(&lineset->linestyle->id, 0); + WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; } @@ -928,7 +932,8 @@ static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Unknown line color modifier type"); return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); + DAG_id_tag_update(&lineset->linestyle->id, 0); + WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; } @@ -967,7 +972,8 @@ static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Unknown alpha transparency modifier type"); return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); + DAG_id_tag_update(&lineset->linestyle->id, 0); + WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; } @@ -1006,7 +1012,8 @@ static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Unknown line thickness modifier type"); return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); + DAG_id_tag_update(&lineset->linestyle->id, 0); + WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; } @@ -1045,7 +1052,8 @@ static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Unknown stroke geometry modifier type"); return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); + DAG_id_tag_update(&lineset->linestyle->id, 0); + WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; } @@ -1111,7 +1119,8 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); + DAG_id_tag_update(&lineset->linestyle->id, 0); + WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; } @@ -1160,7 +1169,8 @@ static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); + DAG_id_tag_update(&lineset->linestyle->id, 0); + WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; } @@ -1210,7 +1220,8 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); + DAG_id_tag_update(&lineset->linestyle->id, 0); + WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; } diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index 31f5f531f1b..ef3ed4084f2 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -559,13 +559,13 @@ static void rna_def_modifier_type_common(StructRNA *srna, EnumPropertyItem *modi RNA_def_property_enum_sdna(prop, NULL, "modifier.blend"); RNA_def_property_enum_items(prop, (color) ? ramp_blend_items : value_blend_items); RNA_def_property_ui_text(prop, "Blend", "Specify how the modifier value is blended into the base value"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "modifier.influence"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Influence", "Influence factor by which the modifier changes the property"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); } prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); @@ -609,18 +609,18 @@ static void rna_def_modifier_color_ramp_common(StructRNA *srna, int range) RNA_def_property_pointer_sdna(prop, NULL, "color_ramp"); RNA_def_property_struct_type(prop, "ColorRamp"); RNA_def_property_ui_text(prop, "Color Ramp", "Color ramp used to change line color"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); if (range) { prop = RNA_def_property(srna, "range_min", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "range_min"); RNA_def_property_ui_text(prop, "Range Min", "Lower bound of the input range the mapping is applied"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "range_max", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "range_max"); RNA_def_property_ui_text(prop, "Range Max", "Upper bound of the input range the mapping is applied"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); } } @@ -638,41 +638,41 @@ static void rna_def_modifier_curve_common(StructRNA *srna, bool range, bool valu RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); RNA_def_property_enum_items(prop, mapping_items); RNA_def_property_ui_text(prop, "Mapping", "Select the mapping type"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_MODIFIER_INVERT); RNA_def_property_ui_text(prop, "Invert", "Invert the fade-out direction of the linear mapping"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "curve"); RNA_def_property_struct_type(prop, "CurveMapping"); RNA_def_property_ui_text(prop, "Curve", "Curve used for the curve mapping"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); if (range) { prop = RNA_def_property(srna, "range_min", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "range_min"); RNA_def_property_ui_text(prop, "Range Min", "Lower bound of the input range the mapping is applied"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "range_max", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "range_max"); RNA_def_property_ui_text(prop, "Range Max", "Upper bound of the input range the mapping is applied"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); } if (value) { prop = RNA_def_property(srna, "value_min", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "value_min"); RNA_def_property_ui_text(prop, "Value Min", "Minimum output value of the mapping"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "value_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "value_max"); RNA_def_property_ui_text(prop, "Value Max", "Maximum output value of the mapping"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); } } @@ -698,7 +698,7 @@ static void rna_def_modifier_material_common(StructRNA *srna) RNA_def_property_enum_sdna(prop, NULL, "mat_attr"); RNA_def_property_enum_items(prop, mat_attr_items); RNA_def_property_ui_text(prop, "Material Attribute", "Specify which material attribute is used"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); } @@ -754,7 +754,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Object"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Target", "Target object from which the distance is measured"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleColorModifier_Material", "LineStyleColorModifier"); RNA_def_struct_ui_text(srna, "Material", "Change line color based on a material attribute"); @@ -765,7 +765,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "use_ramp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_MODIFIER_USE_RAMP); RNA_def_property_ui_text(prop, "Ramp", "Use color ramp to map the BW average into an RGB color"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); /* alpha transparency modifiers */ @@ -797,7 +797,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Object"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Target", "Target object from which the distance is measured"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleAlphaModifier_Material", "LineStyleAlphaModifier"); RNA_def_struct_ui_text(srna, "Material", "Change alpha transparency based on a material attribute"); @@ -833,7 +833,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Object"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Target", "Target object from which the distance is measured"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleThicknessModifier_Material", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Material", "Change line thickness based on a material attribute"); @@ -849,20 +849,20 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "orientation", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "orientation"); RNA_def_property_ui_text(prop, "Orientation", "Angle of the main direction"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "thickness_min", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "min_thickness"); RNA_def_property_range(prop, 0.0f, 10000.0f); RNA_def_property_ui_text(prop, "Min Thickness", "Minimum thickness in the direction perpendicular to the main direction"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "thickness_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "max_thickness"); RNA_def_property_range(prop, 0.0f, 10000.0f); RNA_def_property_ui_text(prop, "Max Thickness", "Maximum thickness in the main direction"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); /* geometry modifiers */ @@ -881,7 +881,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "sampling"); RNA_def_property_range(prop, 0.0f, 10000.0f); RNA_def_property_ui_text(prop, "Sampling", "New sampling value to be used for subsequent modifiers"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_BezierCurve", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Bezier Curve", @@ -894,7 +894,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Error", "Maximum distance allowed between the new Bezier curve and the " "original backbone geometry"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_SinusDisplacement", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Sinus Displacement", "Add sinus displacement to stroke backbone geometry"); @@ -903,17 +903,17 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "wavelength", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "wavelength"); RNA_def_property_ui_text(prop, "Wavelength", "Wavelength of the sinus displacement"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "amplitude"); RNA_def_property_ui_text(prop, "Amplitude", "Amplitude of the sinus displacement"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "phase", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "phase"); RNA_def_property_ui_text(prop, "Phase", "Phase of the sinus displacement"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_SpatialNoise", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Spatial Noise", "Add spatial noise to stroke backbone geometry"); @@ -922,27 +922,27 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "amplitude"); RNA_def_property_ui_text(prop, "Amplitude", "Amplitude of the spatial noise"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "scale"); RNA_def_property_ui_text(prop, "Scale", "Scale of the spatial noise"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "octaves", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "octaves"); RNA_def_property_ui_text(prop, "Octaves", "Number of octaves (i.e., the amount of detail of the spatial noise)"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_MODIFIER_SPATIAL_NOISE_SMOOTH); RNA_def_property_ui_text(prop, "Smooth", "If true, the spatial noise is smooth"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_pure_random", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_MODIFIER_SPATIAL_NOISE_PURERANDOM); RNA_def_property_ui_text(prop, "Pure Random", "If true, the spatial noise does not show any coherence"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_PerlinNoise1D", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Perlin Noise 1D", "Add one-dimensional Perlin noise to stroke backbone geometry"); @@ -951,28 +951,28 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "frequency", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "frequency"); RNA_def_property_ui_text(prop, "Frequency", "Frequency of the Perlin noise"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "amplitude"); RNA_def_property_ui_text(prop, "Amplitude", "Amplitude of the Perlin noise"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "octaves", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "octaves"); RNA_def_property_ui_text(prop, "Octaves", "Number of octaves (i.e., the amount of detail of the Perlin noise)"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "angle"); RNA_def_property_ui_text(prop, "Angle", "Displacement direction"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "seed"); RNA_def_property_ui_text(prop, "Seed", "Seed for random number generation (if negative, time is used as a seed instead)"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_PerlinNoise2D", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Perlin Noise 2D", "Add two-dimensional Perlin noise to stroke backbone geometry"); @@ -981,28 +981,28 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "frequency", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "frequency"); RNA_def_property_ui_text(prop, "Frequency", "Frequency of the Perlin noise"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "amplitude"); RNA_def_property_ui_text(prop, "Amplitude", "Amplitude of the Perlin noise"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "octaves", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "octaves"); RNA_def_property_ui_text(prop, "Octaves", "Number of octaves (i.e., the amount of detail of the Perlin noise)"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "angle"); RNA_def_property_ui_text(prop, "Angle", "Displacement direction"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "seed"); RNA_def_property_ui_text(prop, "Seed", "Seed for random number generation (if negative, time is used as a seed instead)"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_BackboneStretcher", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Backbone Stretcher", "Stretch the beginning and the end of stroke backbone"); @@ -1011,7 +1011,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "backbone_length", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "backbone_length"); RNA_def_property_ui_text(prop, "Backbone Length", "Amount of backbone stretching"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_TipRemover", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Tip Remover", @@ -1021,7 +1021,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "tip_length", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "tip_length"); RNA_def_property_ui_text(prop, "Tip Length", "Length of tips to be removed"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_Polygonalization", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Polygonalization", "Modify the stroke geometry so that it looks more 'polygonal'"); @@ -1031,7 +1031,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "error"); RNA_def_property_ui_text(prop, "Error", "Maximum distance between the original stroke and its polygonal approximation"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_GuidingLines", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Guiding Lines", @@ -1042,7 +1042,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "offset"); RNA_def_property_ui_text(prop, "Offset", "Displacement that is applied to the main direction line along its normal"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_Blueprint", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "Blueprint", @@ -1053,33 +1053,33 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); RNA_def_property_enum_items(prop, blueprint_shape_items); RNA_def_property_ui_text(prop, "Shape", "Select the shape of blueprint contour strokes"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "rounds", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "rounds"); RNA_def_property_range(prop, 1, 1000); RNA_def_property_ui_text(prop, "Rounds", "Number of rounds in contour strokes"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "backbone_length", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "backbone_length"); RNA_def_property_ui_text(prop, "Backbone Length", "Amount of backbone stretching"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "random_radius", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "random_radius"); RNA_def_property_ui_text(prop, "Random Radius", "Randomness of the radius"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "random_center", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "random_center"); RNA_def_property_ui_text(prop, "Random Center", "Randomness of the center"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "random_backbone", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "random_backbone"); RNA_def_property_ui_text(prop, "Random Backbone", "Randomness of the backbone stretching"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_2DOffset", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "2D Offset", "Add two-dimensional offsets to stroke backbone geometry"); @@ -1088,22 +1088,22 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) prop = RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "start"); RNA_def_property_ui_text(prop, "Start", "Displacement that is applied from the beginning of the stroke"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "end", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "end"); RNA_def_property_ui_text(prop, "End", "Displacement that is applied from the end of the stroke"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "x"); RNA_def_property_ui_text(prop, "X", "Displacement that is applied to the X coordinates of stroke vertices"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "y"); RNA_def_property_ui_text(prop, "Y", "Displacement that is applied to the Y coordinates of stroke vertices"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); srna = RNA_def_struct(brna, "LineStyleGeometryModifier_2DTransform", "LineStyleGeometryModifier"); RNA_def_struct_ui_text(srna, "2D Transform", @@ -1114,41 +1114,41 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "pivot"); RNA_def_property_enum_items(prop, transform_pivot_items); RNA_def_property_ui_text(prop, "Pivot", "Pivot of scaling and rotation operations"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "scale_x"); RNA_def_property_flag(prop, PROP_PROPORTIONAL); RNA_def_property_ui_text(prop, "Scale X", "Scaling factor that is applied along the X axis"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "scale_y"); RNA_def_property_flag(prop, PROP_PROPORTIONAL); RNA_def_property_ui_text(prop, "Scale Y", "Scaling factor that is applied along the Y axis"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "angle"); RNA_def_property_ui_text(prop, "Rotation Angle", "Rotation angle"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "pivot_u", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "pivot_u"); RNA_def_property_range(prop, 0.f, 1.f); RNA_def_property_ui_text(prop, "Stroke Point Parameter", "Pivot in terms of the stroke point parameter u (0 <= u <= 1)"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "pivot_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "pivot_x"); RNA_def_property_ui_text(prop, "Pivot X", "2D X coordinate of the absolute pivot"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "pivot_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "pivot_y"); RNA_def_property_ui_text(prop, "Pivot Y", "2D Y coordinate of the absolute pivot"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); } static void rna_def_freestyle_color_modifiers(BlenderRNA *brna, PropertyRNA *cprop) @@ -1339,27 +1339,27 @@ static void rna_def_linestyle(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Color", "Base line color, possibly modified by line color modifiers"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "alpha"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Alpha Transparency", "Base alpha transparency, possibly modified by alpha transparency modifiers"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "thickness", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "thickness"); RNA_def_property_range(prop, 0.0f, 10000.0f); RNA_def_property_ui_text(prop, "Thickness", "Base line thickness, possibly modified by line thickness modifiers"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "thickness_position", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "thickness_position"); RNA_def_property_enum_items(prop, thickness_position_items); RNA_def_property_ui_text(prop, "Thickness Position", "Thickness position of silhouettes and border edges (applicable when plain chaining is used with the Same Object option)"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "thickness_ratio", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "thickness_ratio"); @@ -1367,7 +1367,7 @@ static void rna_def_linestyle(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Thickness Ratio", "A number between 0 (inside) and 1 (outside) specifying the relative position of " "stroke thickness"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "color_modifiers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "color_modifiers", NULL); @@ -1396,208 +1396,208 @@ static void rna_def_linestyle(BlenderRNA *brna) prop = RNA_def_property(srna, "use_chaining", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", LS_NO_CHAINING); RNA_def_property_ui_text(prop, "Chaining", "Enable chaining of feature edges"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "chaining", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "chaining"); RNA_def_property_enum_items(prop, chaining_items); RNA_def_property_ui_text(prop, "Chaining Method", "Select the way how feature edges are jointed to form chains"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "rounds", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "rounds"); RNA_def_property_range(prop, 1, 1000); RNA_def_property_ui_text(prop, "Rounds", "Number of rounds in a sketchy multiple touch"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_same_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_SAME_OBJECT); RNA_def_property_ui_text(prop, "Same Object", "If true, only feature edges of the same object are joined"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_split_length", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_SPLIT_LENGTH); RNA_def_property_ui_text(prop, "Use Split Length", "Enable chain splitting by curvilinear 2D length"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "split_length", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "split_length"); RNA_def_property_range(prop, 0.0f, 10000.0f); RNA_def_property_ui_text(prop, "Split Length", "Curvilinear 2D length for chain splitting"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_angle_min", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_MIN_2D_ANGLE); RNA_def_property_ui_text(prop, "Use Min 2D Angle", "Split chains at points with angles smaller than the minimum 2D angle"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "min_angle"); RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f)); RNA_def_property_ui_text(prop, "Min 2D Angle", "Minimum 2D angle for splitting chains"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_angle_max", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_MAX_2D_ANGLE); RNA_def_property_ui_text(prop, "Use Max 2D Angle", "Split chains at points with angles larger than the maximum 2D angle"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "max_angle"); RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f)); RNA_def_property_ui_text(prop, "Max 2D Angle", "Maximum 2D angle for splitting chains"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_length_min", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_MIN_2D_LENGTH); RNA_def_property_ui_text(prop, "Use Min 2D Length", "Enable the selection of chains by a minimum 2D length"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "length_min", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "min_length"); RNA_def_property_range(prop, 0.0f, 10000.0f); RNA_def_property_ui_text(prop, "Min 2D Length", "Minimum curvilinear 2D length for the selection of chains"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_length_max", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_MAX_2D_LENGTH); RNA_def_property_ui_text(prop, "Use Max 2D Length", "Enable the selection of chains by a maximum 2D length"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "length_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "max_length"); RNA_def_property_range(prop, 0.0f, 10000.0f); RNA_def_property_ui_text(prop, "Max 2D Length", "Maximum curvilinear 2D length for the selection of chains"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_split_pattern", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_SPLIT_PATTERN); RNA_def_property_ui_text(prop, "Use Split Pattern", "Enable chain splitting by dashed line patterns"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "split_dash1", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "split_dash1"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Split Dash 1", "Length of the 1st dash for splitting"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "split_gap1", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "split_gap1"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Split Gap 1", "Length of the 1st gap for splitting"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "split_dash2", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "split_dash2"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Split Dash 2", "Length of the 2nd dash for splitting"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "split_gap2", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "split_gap2"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Split Gap 2", "Length of the 2nd gap for splitting"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "split_dash3", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "split_dash3"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Split Dash 3", "Length of the 3rd dash for splitting"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "split_gap3", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "split_gap3"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Split Gap 3", "Length of the 3rd gap for splitting"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "material_boundary", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_MATERIAL_BOUNDARY); RNA_def_property_ui_text(prop, "Material Boundary", "If true, chains of feature edges are split at material boundaries"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_sorting", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", LS_NO_SORTING); RNA_def_property_ui_text(prop, "Sorting", "Arrange the stacking order of strokes"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "sort_key", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sort_key"); RNA_def_property_enum_items(prop, sort_key_items); RNA_def_property_ui_text(prop, "Sort Key", "Select the sort key to determine the stacking order of chains"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "sort_order", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, sort_order_items); RNA_def_property_ui_text(prop, "Sort Order", "Select the sort order"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "integration_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "integration_type"); RNA_def_property_enum_items(prop, integration_type_items); RNA_def_property_ui_text(prop, "Integration Type", "Select the way how the sort key is computed for each chain"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_dashed_line", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_DASHED_LINE); RNA_def_property_ui_text(prop, "Dashed Line", "Enable or disable dashed line"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "caps", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "caps"); RNA_def_property_enum_items(prop, cap_items); RNA_def_property_ui_text(prop, "Caps", "Select the shape of both ends of strokes"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "dash1", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "dash1"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Dash 1", "Length of the 1st dash for dashed lines"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "gap1", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "gap1"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Gap 1", "Length of the 1st gap for dashed lines"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "dash2", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "dash2"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Dash 2", "Length of the 2nd dash for dashed lines"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "gap2", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "gap2"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Gap 2", "Length of the 2nd gap for dashed lines"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "dash3", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "dash3"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Dash 3", "Length of the 3rd dash for dashed lines"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "gap3", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "gap3"); RNA_def_property_range(prop, 0, USHRT_MAX); RNA_def_property_ui_text(prop, "Gap 3", "Length of the 3rd gap for dashed lines"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LS_TEXTURE); RNA_def_property_ui_text(prop, "Use Textures", "Enable or disable textured strokes"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); prop = RNA_def_property(srna, "texture_spacing", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "texstep"); RNA_def_property_range(prop, 0.01f, 100.0f); RNA_def_property_ui_text(prop, "Texture spacing", "Spacing for textures along stroke length"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); /* nodes */ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); @@ -1609,7 +1609,7 @@ static void rna_def_linestyle(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_ui_text(prop, "Use Nodes", "Use texture nodes for the line style"); - RNA_def_property_update(prop, NC_LINESTYLE, NULL); + RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update"); } void RNA_def_linestyle(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 8283490226d..82cea3d20e3 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1172,6 +1172,13 @@ static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi DAG_id_tag_update(&scene->id, 0); } +static void rna_Scene_freestyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ + Scene *scene = (Scene *)ptr->id.data; + + DAG_id_tag_update(&scene->id, 0); +} + static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value) { Scene *scene = (Scene *)ptr->id.data; @@ -2444,7 +2451,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_FRS); RNA_def_property_ui_text(prop, "Freestyle", "Render stylized strokes in this Layer"); - if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* passes */ @@ -2726,14 +2733,14 @@ static void rna_def_freestyle_linesets(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_struct_type(prop, "FreestyleLineSet"); RNA_def_property_pointer_funcs(prop, "rna_FreestyleSettings_active_lineset_get", NULL, NULL, NULL); RNA_def_property_ui_text(prop, "Active Line Set", "Active line set being displayed"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_funcs(prop, "rna_FreestyleSettings_active_lineset_index_get", "rna_FreestyleSettings_active_lineset_index_set", "rna_FreestyleSettings_active_lineset_index_range"); RNA_def_property_ui_text(prop, "Active Line Set Index", "Index of active line set slot"); - RNA_def_property_update(prop, NC_SCENE, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); func = RNA_def_function(srna, "new", "rna_FreestyleSettings_lineset_add"); RNA_def_function_ui_description(func, "Add a line set to scene render layer Freestyle settings"); @@ -2821,7 +2828,7 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get", "rna_FreestyleLineSet_linestyle_set", NULL, NULL); RNA_def_property_ui_text(prop, "Line Style", "Line style settings"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "name"); @@ -2832,191 +2839,191 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_LINESET_ENABLED); RNA_def_property_ui_text(prop, "Render", "Enable or disable this line set during stroke rendering"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_VISIBILITY); RNA_def_property_ui_text(prop, "Selection by Visibility", "Select feature edges based on visibility"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_by_edge_types", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_EDGE_TYPES); RNA_def_property_ui_text(prop, "Selection by Edge Types", "Select feature edges based on edge types"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_by_group", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_GROUP); RNA_def_property_ui_text(prop, "Selection by Group", "Select feature edges based on a group of objects"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_by_image_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_IMAGE_BORDER); RNA_def_property_ui_text(prop, "Selection by Image Border", "Select feature edges by image border (less memory consumption)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_by_face_marks", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_FACE_MARK); RNA_def_property_ui_text(prop, "Selection by Face Marks", "Select feature edges by face marks"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "edge_type_negation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); RNA_def_property_enum_items(prop, edge_type_negation_items); RNA_def_property_ui_text(prop, "Edge Type Negation", "Specify either inclusion or exclusion of feature edges selected by edge types"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "edge_type_combination", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); RNA_def_property_enum_items(prop, edge_type_combination_items); RNA_def_property_ui_text(prop, "Edge Type Combination", "Specify a logical combination of selection conditions on feature edge types"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "group"); RNA_def_property_struct_type(prop, "Group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Group", "A group of objects based on which feature edges are selected"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "group_negation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); RNA_def_property_enum_items(prop, group_negation_items); RNA_def_property_ui_text(prop, "Group Negation", "Specify either inclusion or exclusion of feature edges belonging to a group of objects"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "face_mark_negation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); RNA_def_property_enum_items(prop, face_mark_negation_items); RNA_def_property_ui_text(prop, "Face Mark Negation", "Specify either inclusion or exclusion of feature edges selected by face marks"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "face_mark_condition", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); RNA_def_property_enum_items(prop, face_mark_condition_items); RNA_def_property_ui_text(prop, "Face Mark Condition", "Specify a feature edge selection condition based on face marks"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_silhouette", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SILHOUETTE); RNA_def_property_ui_text(prop, "Silhouette", "Select silhouettes (edges at the boundary of visible and hidden faces)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_BORDER); RNA_def_property_ui_text(prop, "Border", "Select border edges (open mesh edges)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_crease", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CREASE); RNA_def_property_ui_text(prop, "Crease", "Select crease edges (those between two faces making an angle smaller than the Crease Angle)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_ridge_valley", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_RIDGE_VALLEY); RNA_def_property_ui_text(prop, "Ridge & Valley", "Select ridges and valleys (boundary lines between convex and concave areas of surface)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR); RNA_def_property_ui_text(prop, "Suggestive Contour", "Select suggestive contours (almost silhouette/contour edges)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_material_boundary", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY); RNA_def_property_ui_text(prop, "Material Boundary", "Select edges at material boundaries"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_contour", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CONTOUR); RNA_def_property_ui_text(prop, "Contour", "Select contours (outer silhouettes of each object)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_external_contour", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR); RNA_def_property_ui_text(prop, "External Contour", "Select external contours (outer silhouettes of occluding and occluded objects)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_edge_mark", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EDGE_MARK); RNA_def_property_ui_text(prop, "Edge Mark", "Select edge marks (edges annotated by Freestyle edge marks)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_silhouette", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SILHOUETTE); RNA_def_property_ui_text(prop, "Silhouette", "Exclude silhouette edges"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_BORDER); RNA_def_property_ui_text(prop, "Border", "Exclude border edges"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_crease", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CREASE); RNA_def_property_ui_text(prop, "Crease", "Exclude crease edges"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_ridge_valley", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_RIDGE_VALLEY); RNA_def_property_ui_text(prop, "Ridge & Valley", "Exclude ridges and valleys"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_suggestive_contour", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR); RNA_def_property_ui_text(prop, "Suggestive Contour", "Exclude suggestive contours"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_material_boundary", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY); RNA_def_property_ui_text(prop, "Material Boundary", "Exclude edges at material boundaries"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_contour", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CONTOUR); RNA_def_property_ui_text(prop, "Contour", "Exclude contours"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_external_contour", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR); RNA_def_property_ui_text(prop, "External Contour", "Exclude external contours"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "exclude_edge_mark", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EDGE_MARK); RNA_def_property_ui_text(prop, "Edge Mark", "Exclude edge marks"); RNA_def_property_ui_icon(prop, ICON_X, 0); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "visibility", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "qi"); RNA_def_property_enum_items(prop, visibility_items); RNA_def_property_ui_text(prop, "Visibility", "Determine how to use visibility for feature edge selection"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "qi_start", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "qi_start"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_text(prop, "Start", "First QI value of the QI range"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "qi_end", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "qi_end"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_text(prop, "End", "Last QI value of the QI range"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); /* FreestyleModuleSettings */ @@ -3028,12 +3035,12 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Text"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Style Module", "Python script to define a style module"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1); RNA_def_property_ui_text(prop, "Use", "Enable or disable this style module during stroke rendering"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); /* FreestyleSettings */ @@ -3052,56 +3059,56 @@ static void rna_def_freestyle_settings(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, freestyle_ui_mode_items); RNA_def_property_ui_text(prop, "Control Mode", "Select the Freestyle control mode"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "use_culling", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_CULLING); RNA_def_property_ui_text(prop, "Culling", "If enabled, out-of-view edges are ignored"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "use_suggestive_contours", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_SUGGESTIVE_CONTOURS_FLAG); RNA_def_property_ui_text(prop, "Suggestive Contours", "Enable suggestive contours"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "use_ridges_and_valleys", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_RIDGES_AND_VALLEYS_FLAG); RNA_def_property_ui_text(prop, "Ridges and Valleys", "Enable ridges and valleys"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "use_material_boundaries", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_MATERIAL_BOUNDARIES_FLAG); RNA_def_property_ui_text(prop, "Material Boundaries", "Enable material boundaries"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "use_smoothness", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_FACE_SMOOTHNESS_FLAG); RNA_def_property_ui_text(prop, "Face Smoothness", "Take face smoothness into account in view map calculation"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "use_advanced_options", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_ADVANCED_OPTIONS_FLAG); RNA_def_property_ui_text(prop, "Advanced Options", "Enable advanced edge detection options (sphere radius and Kr derivative epsilon)"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sphere_radius"); RNA_def_property_range(prop, 0.0, 1000.0); RNA_def_property_ui_text(prop, "Sphere Radius", "Sphere radius for computing curvatures"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "kr_derivative_epsilon", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dkr_epsilon"); RNA_def_property_range(prop, -1000.0, 1000.0); RNA_def_property_ui_text(prop, "Kr Derivative Epsilon", "Kr derivative epsilon for computing suggestive contours"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "crease_angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "crease_angle"); RNA_def_property_range(prop, 0.0, DEG2RAD(180.0)); RNA_def_property_ui_text(prop, "Crease Angle", "Angular threshold for detecting crease edges"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "linesets", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "linesets", NULL); @@ -4612,7 +4619,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS); RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); /* threads */ prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE); @@ -5098,11 +5105,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "line_thickness_mode"); RNA_def_property_enum_items(prop, freestyle_thickness_items); RNA_def_property_ui_text(prop, "Line Thickness Mode", "Line thickness mode for Freestyle line drawing"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "line_thickness", PROP_FLOAT, PROP_PIXEL); RNA_def_property_float_sdna(prop, NULL, "unit_line_thickness"); RNA_def_property_range(prop, 0.f, 10000.f); RNA_def_property_ui_text(prop, "Line Thickness", "Line thickness in pixels"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); /* Bake Settings */ prop = RNA_def_property(srna, "bake", PROP_POINTER, PROP_NONE); |