Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_linestyle.c
| Show First 20 Lines • Show All 1,441 Lines • ▼ Show 20 Lines | static void rna_def_freestyle_color_modifiers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| srna = RNA_def_struct(brna, "LineStyleColorModifiers", NULL); | srna = RNA_def_struct(brna, "LineStyleColorModifiers", NULL); | ||||
| RNA_def_struct_sdna(srna, "FreestyleLineStyle"); | RNA_def_struct_sdna(srna, "FreestyleLineStyle"); | ||||
| RNA_def_struct_ui_text(srna, "Color Modifiers", "Color modifiers for changing line colors"); | RNA_def_struct_ui_text(srna, "Color Modifiers", "Color modifiers for changing line colors"); | ||||
| func = RNA_def_function(srna, "new", "rna_LineStyle_color_modifier_add"); | func = RNA_def_function(srna, "new", "rna_LineStyle_color_modifier_add"); | ||||
| RNA_def_function_ui_description(func, "Add a color modifier to line style"); | RNA_def_function_ui_description(func, "Add a color modifier to line style"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_string(func, "name", "ColorModifier", 0, "", "New name for the color modifier (not unique)"); | parm = RNA_def_string(func, "name", "ColorModifier", 0, "", "New name for the color modifier (not unique)"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "type", rna_enum_linestyle_color_modifier_type_items, 0, "", "Color modifier type to add"); | parm = RNA_def_enum(func, "type", rna_enum_linestyle_color_modifier_type_items, 0, "", "Color modifier type to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "modifier", "LineStyleColorModifier", "", "Newly added color modifier"); | parm = RNA_def_pointer(func, "modifier", "LineStyleColorModifier", "", "Newly added color modifier"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_LineStyle_color_modifier_remove"); | func = RNA_def_function(srna, "remove", "rna_LineStyle_color_modifier_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a color modifier from line style"); | RNA_def_function_ui_description(func, "Remove a color modifier from line style"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "modifier", "LineStyleColorModifier", "", "Color modifier to remove"); | parm = RNA_def_pointer(func, "modifier", "LineStyleColorModifier", "", "Color modifier to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| } | } | ||||
| static void rna_def_freestyle_alpha_modifiers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_freestyle_alpha_modifiers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "LineStyleAlphaModifiers"); | RNA_def_property_srna(cprop, "LineStyleAlphaModifiers"); | ||||
| srna = RNA_def_struct(brna, "LineStyleAlphaModifiers", NULL); | srna = RNA_def_struct(brna, "LineStyleAlphaModifiers", NULL); | ||||
| RNA_def_struct_sdna(srna, "FreestyleLineStyle"); | RNA_def_struct_sdna(srna, "FreestyleLineStyle"); | ||||
| RNA_def_struct_ui_text(srna, "Alpha Modifiers", "Alpha modifiers for changing line alphas"); | RNA_def_struct_ui_text(srna, "Alpha Modifiers", "Alpha modifiers for changing line alphas"); | ||||
| func = RNA_def_function(srna, "new", "rna_LineStyle_alpha_modifier_add"); | func = RNA_def_function(srna, "new", "rna_LineStyle_alpha_modifier_add"); | ||||
| RNA_def_function_ui_description(func, "Add a alpha modifier to line style"); | RNA_def_function_ui_description(func, "Add a alpha modifier to line style"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_string(func, "name", "AlphaModifier", 0, "", "New name for the alpha modifier (not unique)"); | parm = RNA_def_string(func, "name", "AlphaModifier", 0, "", "New name for the alpha modifier (not unique)"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "type", rna_enum_linestyle_alpha_modifier_type_items, 0, "", "Alpha modifier type to add"); | parm = RNA_def_enum(func, "type", rna_enum_linestyle_alpha_modifier_type_items, 0, "", "Alpha modifier type to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "modifier", "LineStyleAlphaModifier", "", "Newly added alpha modifier"); | parm = RNA_def_pointer(func, "modifier", "LineStyleAlphaModifier", "", "Newly added alpha modifier"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_LineStyle_alpha_modifier_remove"); | func = RNA_def_function(srna, "remove", "rna_LineStyle_alpha_modifier_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a alpha modifier from line style"); | RNA_def_function_ui_description(func, "Remove a alpha modifier from line style"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "modifier", "LineStyleAlphaModifier", "", "Alpha modifier to remove"); | parm = RNA_def_pointer(func, "modifier", "LineStyleAlphaModifier", "", "Alpha modifier to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| } | } | ||||
| static void rna_def_freestyle_thickness_modifiers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_freestyle_thickness_modifiers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "LineStyleThicknessModifiers"); | RNA_def_property_srna(cprop, "LineStyleThicknessModifiers"); | ||||
| srna = RNA_def_struct(brna, "LineStyleThicknessModifiers", NULL); | srna = RNA_def_struct(brna, "LineStyleThicknessModifiers", NULL); | ||||
| RNA_def_struct_sdna(srna, "FreestyleLineStyle"); | RNA_def_struct_sdna(srna, "FreestyleLineStyle"); | ||||
| RNA_def_struct_ui_text(srna, "Thickness Modifiers", "Thickness modifiers for changing line thickness"); | RNA_def_struct_ui_text(srna, "Thickness Modifiers", "Thickness modifiers for changing line thickness"); | ||||
| func = RNA_def_function(srna, "new", "rna_LineStyle_thickness_modifier_add"); | func = RNA_def_function(srna, "new", "rna_LineStyle_thickness_modifier_add"); | ||||
| RNA_def_function_ui_description(func, "Add a thickness modifier to line style"); | RNA_def_function_ui_description(func, "Add a thickness modifier to line style"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_string(func, "name", "ThicknessModifier", 0, "", "New name for the thickness modifier (not unique)"); | parm = RNA_def_string(func, "name", "ThicknessModifier", 0, "", "New name for the thickness modifier (not unique)"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "type", rna_enum_linestyle_thickness_modifier_type_items, 0, | parm = RNA_def_enum(func, "type", rna_enum_linestyle_thickness_modifier_type_items, 0, | ||||
| "", "Thickness modifier type to add"); | "", "Thickness modifier type to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "modifier", "LineStyleThicknessModifier", "", "Newly added thickness modifier"); | parm = RNA_def_pointer(func, "modifier", "LineStyleThicknessModifier", "", "Newly added thickness modifier"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_LineStyle_thickness_modifier_remove"); | func = RNA_def_function(srna, "remove", "rna_LineStyle_thickness_modifier_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a thickness modifier from line style"); | RNA_def_function_ui_description(func, "Remove a thickness modifier from line style"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "modifier", "LineStyleThicknessModifier", "", "Thickness modifier to remove"); | parm = RNA_def_pointer(func, "modifier", "LineStyleThicknessModifier", "", "Thickness modifier to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| } | } | ||||
| static void rna_def_freestyle_geometry_modifiers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_freestyle_geometry_modifiers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "LineStyleGeometryModifiers"); | RNA_def_property_srna(cprop, "LineStyleGeometryModifiers"); | ||||
| srna = RNA_def_struct(brna, "LineStyleGeometryModifiers", NULL); | srna = RNA_def_struct(brna, "LineStyleGeometryModifiers", NULL); | ||||
| RNA_def_struct_sdna(srna, "FreestyleLineStyle"); | RNA_def_struct_sdna(srna, "FreestyleLineStyle"); | ||||
| RNA_def_struct_ui_text(srna, "Geometry Modifiers", "Geometry modifiers for changing line geometries"); | RNA_def_struct_ui_text(srna, "Geometry Modifiers", "Geometry modifiers for changing line geometries"); | ||||
| func = RNA_def_function(srna, "new", "rna_LineStyle_geometry_modifier_add"); | func = RNA_def_function(srna, "new", "rna_LineStyle_geometry_modifier_add"); | ||||
| RNA_def_function_ui_description(func, "Add a geometry modifier to line style"); | RNA_def_function_ui_description(func, "Add a geometry modifier to line style"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_string(func, "name", "GeometryModifier", 0, "", "New name for the geometry modifier (not unique)"); | parm = RNA_def_string(func, "name", "GeometryModifier", 0, "", "New name for the geometry modifier (not unique)"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "type", rna_enum_linestyle_geometry_modifier_type_items, 0, | parm = RNA_def_enum(func, "type", rna_enum_linestyle_geometry_modifier_type_items, 0, | ||||
| "", "Geometry modifier type to add"); | "", "Geometry modifier type to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "modifier", "LineStyleGeometryModifier", "", "Newly added geometry modifier"); | parm = RNA_def_pointer(func, "modifier", "LineStyleGeometryModifier", "", "Newly added geometry modifier"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_LineStyle_geometry_modifier_remove"); | func = RNA_def_function(srna, "remove", "rna_LineStyle_geometry_modifier_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a geometry modifier from line style"); | RNA_def_function_ui_description(func, "Remove a geometry modifier from line style"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "modifier", "LineStyleGeometryModifier", "", "Geometry modifier to remove"); | parm = RNA_def_pointer(func, "modifier", "LineStyleGeometryModifier", "", "Geometry modifier to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| } | } | ||||
| static void rna_def_linestyle(BlenderRNA *brna) | static void rna_def_linestyle(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static EnumPropertyItem panel_items[] = { | static EnumPropertyItem panel_items[] = { | ||||
| ▲ Show 20 Lines • Show All 361 Lines • Show Last 20 Lines | |||||