Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_material.c
| Show First 20 Lines • Show All 2,157 Lines • ▼ Show 20 Lines | static void rna_def_texture_slots(BlenderRNA *brna, PropertyRNA *cprop, const char *structname, | ||||
| func = RNA_def_function(srna, "add", "rna_mtex_texture_slots_add"); | func = RNA_def_function(srna, "add", "rna_mtex_texture_slots_add"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex"); | parm = RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "create", "rna_mtex_texture_slots_create"); | func = RNA_def_function(srna, "create", "rna_mtex_texture_slots_create"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | ||||
| parm = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to initialize", 0, INT_MAX); | parm = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to initialize", 0, INT_MAX); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex"); | parm = RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "clear", "rna_mtex_texture_slots_clear"); | func = RNA_def_function(srna, "clear", "rna_mtex_texture_slots_clear"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | ||||
| parm = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear", 0, INT_MAX); | parm = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear", 0, INT_MAX); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| } | } | ||||
| void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin, | void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin, | ||||
| const char *activeget, const char *activeset, const char *activeeditable, | const char *activeget, const char *activeset, const char *activeeditable, | ||||
| const char *structname, const char *structname_slots, const char *update, const char *update_index) | const char *structname, const char *structname_slots, const char *update, const char *update_index) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines | |||||