Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_group.c
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | /* PropertyRNA *prop; */ | ||||
| RNA_def_struct_ui_text(srna, "Group Objects", "Collection of group objects"); | RNA_def_struct_ui_text(srna, "Group Objects", "Collection of group objects"); | ||||
| /* add object */ | /* add object */ | ||||
| func = RNA_def_function(srna, "link", "rna_Group_objects_link"); | func = RNA_def_function(srna, "link", "rna_Group_objects_link"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Add this object to a group"); | RNA_def_function_ui_description(func, "Add this object to a group"); | ||||
| /* object to add */ | /* object to add */ | ||||
| parm = RNA_def_pointer(func, "object", "Object", "", "Object to add"); | parm = RNA_def_pointer(func, "object", "Object", "", "Object to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| /* remove object */ | /* remove object */ | ||||
| func = RNA_def_function(srna, "unlink", "rna_Group_objects_unlink"); | func = RNA_def_function(srna, "unlink", "rna_Group_objects_unlink"); | ||||
| RNA_def_function_ui_description(func, "Remove this object to a group"); | RNA_def_function_ui_description(func, "Remove this object to a group"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | ||||
| /* object to remove */ | /* object to remove */ | ||||
| parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove"); | parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| } | } | ||||
| void RNA_def_group(BlenderRNA *brna) | void RNA_def_group(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| Show All 29 Lines | |||||