Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_main_api.c
| Show First 20 Lines • Show All 547 Lines • ▼ Show 20 Lines | #if 0 | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| /* maybe we want to add functions in 'bpy.data' still? | /* maybe we want to add functions in 'bpy.data' still? | ||||
| * for now they are all in collections bpy.data.images.new(...) */ | * for now they are all in collections bpy.data.images.new(...) */ | ||||
| func = RNA_def_function(srna, "add_image", "rna_Main_add_image"); | func = RNA_def_function(srna, "add_image", "rna_Main_add_image"); | ||||
| RNA_def_function_ui_description(func, "Add a new image"); | RNA_def_function_ui_description(func, "Add a new image"); | ||||
| parm = RNA_def_string_file_path(func, "filepath", NULL, 0, "", "File path to load image from"); | parm = RNA_def_string_file_path(func, "filepath", NULL, 0, "", "File path to load image from"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "image", "Image", "", "New image"); | parm = RNA_def_pointer(func, "image", "Image", "", "New image"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| #endif | #endif | ||||
| } | } | ||||
| void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataCameras"); | RNA_def_property_srna(cprop, "BlendDataCameras"); | ||||
| srna = RNA_def_struct(brna, "BlendDataCameras", NULL); | srna = RNA_def_struct(brna, "BlendDataCameras", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Cameras", "Collection of cameras"); | RNA_def_struct_ui_text(srna, "Main Cameras", "Collection of cameras"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_cameras_new"); | func = RNA_def_function(srna, "new", "rna_Main_cameras_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new camera to the main database"); | RNA_def_function_ui_description(func, "Add a new camera to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Camera", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Camera", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "camera", "Camera", "", "New camera data-block"); | parm = RNA_def_pointer(func, "camera", "Camera", "", "New camera data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a camera from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a camera from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "camera", "Camera", "", "Camera to remove"); | parm = RNA_def_pointer(func, "camera", "Camera", "", "Camera 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", | RNA_def_boolean(func, "do_unlink", true, "", | ||||
| "Unlink all usages of this camera before deleting it " | "Unlink all usages of this camera before deleting it " | ||||
| "(WARNING: will also delete objects instancing that camera data)"); | "(WARNING: will also delete objects instancing that camera data)"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_cameras_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_cameras_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_cameras_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_cameras_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataScenes"); | RNA_def_property_srna(cprop, "BlendDataScenes"); | ||||
| srna = RNA_def_struct(brna, "BlendDataScenes", NULL); | srna = RNA_def_struct(brna, "BlendDataScenes", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Scenes", "Collection of scenes"); | RNA_def_struct_ui_text(srna, "Main Scenes", "Collection of scenes"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_scenes_new"); | func = RNA_def_function(srna, "new", "rna_Main_scenes_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new scene to the main database"); | RNA_def_function_ui_description(func, "Add a new scene to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Scene", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Scene", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "scene", "Scene", "", "New scene data-block"); | parm = RNA_def_pointer(func, "scene", "Scene", "", "New scene data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_scenes_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_scenes_remove"); | ||||
| 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, "Remove a scene from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a scene from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to remove"); | parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this scene before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this scene before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_scenes_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_scenes_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_scenes_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_scenes_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataObjects"); | RNA_def_property_srna(cprop, "BlendDataObjects"); | ||||
| srna = RNA_def_struct(brna, "BlendDataObjects", NULL); | srna = RNA_def_struct(brna, "BlendDataObjects", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Objects", "Collection of objects"); | RNA_def_struct_ui_text(srna, "Main Objects", "Collection of objects"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_objects_new"); | func = RNA_def_function(srna, "new", "rna_Main_objects_new"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Add a new object to the main database"); | RNA_def_function_ui_description(func, "Add a new object to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Object", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Object", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "object_data", "ID", "", "Object data or None for an empty object"); | parm = RNA_def_pointer(func, "object_data", "ID", "", "Object data or None for an empty object"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "object", "Object", "", "New object data-block"); | parm = RNA_def_pointer(func, "object", "Object", "", "New object data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a object from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a object from the current blendfile"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| 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 | 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this object before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this object before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_objects_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_objects_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_objects_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_objects_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataMaterials"); | RNA_def_property_srna(cprop, "BlendDataMaterials"); | ||||
| srna = RNA_def_struct(brna, "BlendDataMaterials", NULL); | srna = RNA_def_struct(brna, "BlendDataMaterials", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Materials", "Collection of materials"); | RNA_def_struct_ui_text(srna, "Main Materials", "Collection of materials"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_materials_new"); | func = RNA_def_function(srna, "new", "rna_Main_materials_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new material to the main database"); | RNA_def_function_ui_description(func, "Add a new material to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Material", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Material", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "material", "Material", "", "New material data-block"); | parm = RNA_def_pointer(func, "material", "Material", "", "New material data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a material from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a material from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "material", "Material", "", "Material to remove"); | parm = RNA_def_pointer(func, "material", "Material", "", "Material 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this material before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this material before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_materials_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_materials_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_materials_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_materials_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| Show All 9 Lines | void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_property_srna(cprop, "BlendDataNodeTrees"); | RNA_def_property_srna(cprop, "BlendDataNodeTrees"); | ||||
| srna = RNA_def_struct(brna, "BlendDataNodeTrees", NULL); | srna = RNA_def_struct(brna, "BlendDataNodeTrees", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Node Trees", "Collection of node trees"); | RNA_def_struct_ui_text(srna, "Main Node Trees", "Collection of node trees"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_nodetree_new"); | func = RNA_def_function(srna, "new", "rna_Main_nodetree_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new node tree to the main database"); | RNA_def_function_ui_description(func, "Add a new node tree to the main database"); | ||||
| parm = RNA_def_string(func, "name", "NodeGroup", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "NodeGroup", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "type", dummy_items, 0, "Type", "The type of node_group to add"); | parm = RNA_def_enum(func, "type", dummy_items, 0, "Type", "The type of node_group to add"); | ||||
| RNA_def_property_enum_funcs(parm, NULL, NULL, "rna_Main_nodetree_type_itemf"); | RNA_def_property_enum_funcs(parm, NULL, NULL, "rna_Main_nodetree_type_itemf"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "tree", "NodeTree", "", "New node tree data-block"); | parm = RNA_def_pointer(func, "tree", "NodeTree", "", "New node tree data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a node tree from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a node tree from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "tree", "NodeTree", "", "Node tree to remove"); | parm = RNA_def_pointer(func, "tree", "NodeTree", "", "Node tree 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this node tree before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this node tree before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_node_groups_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_node_groups_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_node_groups_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_node_groups_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| Show All 10 Lines | void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_property_srna(cprop, "BlendDataMeshes"); | RNA_def_property_srna(cprop, "BlendDataMeshes"); | ||||
| srna = RNA_def_struct(brna, "BlendDataMeshes", NULL); | srna = RNA_def_struct(brna, "BlendDataMeshes", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Meshes", "Collection of meshes"); | RNA_def_struct_ui_text(srna, "Main Meshes", "Collection of meshes"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_meshes_new"); | func = RNA_def_function(srna, "new", "rna_Main_meshes_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new mesh to the main database"); | RNA_def_function_ui_description(func, "Add a new mesh to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Mesh", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Mesh", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "mesh", "Mesh", "", "New mesh data-block"); | parm = RNA_def_pointer(func, "mesh", "Mesh", "", "New mesh data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "new_from_object", "rna_Main_meshes_new_from_object"); | func = RNA_def_function(srna, "new_from_object", "rna_Main_meshes_new_from_object"); | ||||
| RNA_def_function_ui_description(func, "Add a new mesh created from object with modifiers applied"); | RNA_def_function_ui_description(func, "Add a new mesh created from object with modifiers applied"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers"); | parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "object", "Object", "", "Object to create mesh from"); | parm = RNA_def_pointer(func, "object", "Object", "", "Object to create mesh from"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| parm = RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers"); | parm = RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply"); | parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_boolean(func, "calc_tessface", true, "Calculate Tessellation", "Calculate tessellation faces"); | RNA_def_boolean(func, "calc_tessface", true, "Calculate Tessellation", "Calculate tessellation faces"); | ||||
| RNA_def_boolean(func, "calc_undeformed", false, "Calculate Undeformed", "Calculate undeformed vertex coordinates"); | RNA_def_boolean(func, "calc_undeformed", false, "Calculate Undeformed", "Calculate undeformed vertex coordinates"); | ||||
| parm = RNA_def_pointer(func, "mesh", "Mesh", "", | parm = RNA_def_pointer(func, "mesh", "Mesh", "", | ||||
| "Mesh created from object, remove it if it is only used for export"); | "Mesh created from object, remove it if it is only used for export"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a mesh from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a mesh from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to remove"); | parm = RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", | RNA_def_boolean(func, "do_unlink", true, "", | ||||
| "Unlink all usages of this mesh before deleting it " | "Unlink all usages of this mesh before deleting it " | ||||
| "(WARNING: will also delete objects instancing that mesh data)"); | "(WARNING: will also delete objects instancing that mesh data)"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_meshes_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_meshes_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_meshes_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_meshes_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataLamps"); | RNA_def_property_srna(cprop, "BlendDataLamps"); | ||||
| srna = RNA_def_struct(brna, "BlendDataLamps", NULL); | srna = RNA_def_struct(brna, "BlendDataLamps", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Lamps", "Collection of lamps"); | RNA_def_struct_ui_text(srna, "Main Lamps", "Collection of lamps"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_lamps_new"); | func = RNA_def_function(srna, "new", "rna_Main_lamps_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new lamp to the main database"); | RNA_def_function_ui_description(func, "Add a new lamp to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Lamp", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Lamp", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "type", rna_enum_lamp_type_items, 0, "Type", "The type of texture to add"); | parm = RNA_def_enum(func, "type", rna_enum_lamp_type_items, 0, "Type", "The type of texture to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp data-block"); | parm = RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove"); | parm = RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", | RNA_def_boolean(func, "do_unlink", true, "", | ||||
| "Unlink all usages of this lamp before deleting it " | "Unlink all usages of this lamp before deleting it " | ||||
| "(WARNING: will also delete objects instancing that lamp data)"); | "(WARNING: will also delete objects instancing that lamp data)"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_lamps_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_lamps_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_lamps_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_lamps_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataLibraries"); | RNA_def_property_srna(cprop, "BlendDataLibraries"); | ||||
| srna = RNA_def_struct(brna, "BlendDataLibraries", NULL); | srna = RNA_def_struct(brna, "BlendDataLibraries", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Libraries", "Collection of libraries"); | RNA_def_struct_ui_text(srna, "Main Libraries", "Collection of libraries"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_libraries_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_libraries_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_libraries_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_libraries_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_screens(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_screens(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataScreens"); | RNA_def_property_srna(cprop, "BlendDataScreens"); | ||||
| srna = RNA_def_struct(brna, "BlendDataScreens", NULL); | srna = RNA_def_struct(brna, "BlendDataScreens", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Screens", "Collection of screens"); | RNA_def_struct_ui_text(srna, "Main Screens", "Collection of screens"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_screens_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_screens_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_screens_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_screens_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_window_managers(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_window_managers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataWindowManagers"); | RNA_def_property_srna(cprop, "BlendDataWindowManagers"); | ||||
| srna = RNA_def_struct(brna, "BlendDataWindowManagers", NULL); | srna = RNA_def_struct(brna, "BlendDataWindowManagers", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Window Managers", "Collection of window managers"); | RNA_def_struct_ui_text(srna, "Main Window Managers", "Collection of window managers"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_window_managers_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_window_managers_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_window_managers_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_window_managers_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataImages"); | RNA_def_property_srna(cprop, "BlendDataImages"); | ||||
| srna = RNA_def_struct(brna, "BlendDataImages", NULL); | srna = RNA_def_struct(brna, "BlendDataImages", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Images", "Collection of images"); | RNA_def_struct_ui_text(srna, "Main Images", "Collection of images"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_images_new"); | func = RNA_def_function(srna, "new", "rna_Main_images_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new image to the main database"); | RNA_def_function_ui_description(func, "Add a new image to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Image", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Image", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_int(func, "width", 1024, 1, INT_MAX, "", "Width of the image", 1, INT_MAX); | parm = RNA_def_int(func, "width", 1024, 1, INT_MAX, "", "Width of the image", 1, INT_MAX); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_int(func, "height", 1024, 1, INT_MAX, "", "Height of the image", 1, INT_MAX); | parm = RNA_def_int(func, "height", 1024, 1, INT_MAX, "", "Height of the image", 1, INT_MAX); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_boolean(func, "alpha", 0, "Alpha", "Use alpha channel"); | RNA_def_boolean(func, "alpha", 0, "Alpha", "Use alpha channel"); | ||||
| RNA_def_boolean(func, "float_buffer", 0, "Float Buffer", "Create an image with floating point color"); | RNA_def_boolean(func, "float_buffer", 0, "Float Buffer", "Create an image with floating point color"); | ||||
| RNA_def_boolean(func, "stereo3d", 0, "Stereo 3D", "Create left and right views"); | RNA_def_boolean(func, "stereo3d", 0, "Stereo 3D", "Create left and right views"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "image", "Image", "", "New image data-block"); | parm = RNA_def_pointer(func, "image", "Image", "", "New image data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "load", "rna_Main_images_load"); | func = RNA_def_function(srna, "load", "rna_Main_images_load"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Load a new image into the main database"); | RNA_def_function_ui_description(func, "Load a new image into the main database"); | ||||
| parm = RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the file to load"); | parm = RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the file to load"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_boolean(func, "check_existing", false, "", "Using existing data-block if this file is already loaded"); | RNA_def_boolean(func, "check_existing", false, "", "Using existing data-block if this file is already loaded"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "image", "Image", "", "New image data-block"); | parm = RNA_def_pointer(func, "image", "Image", "", "New image data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove an image from the current blendfile"); | RNA_def_function_ui_description(func, "Remove an image from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "image", "Image", "", "Image to remove"); | parm = RNA_def_pointer(func, "image", "Image", "", "Image 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this image before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this image before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_images_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_images_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_images_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_images_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_lattices(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_lattices(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataLattices"); | RNA_def_property_srna(cprop, "BlendDataLattices"); | ||||
| srna = RNA_def_struct(brna, "BlendDataLattices", NULL); | srna = RNA_def_struct(brna, "BlendDataLattices", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Lattices", "Collection of lattices"); | RNA_def_struct_ui_text(srna, "Main Lattices", "Collection of lattices"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_lattices_new"); | func = RNA_def_function(srna, "new", "rna_Main_lattices_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new lattice to the main database"); | RNA_def_function_ui_description(func, "Add a new lattice to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Lattice", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Lattice", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "lattice", "Lattice", "", "New lattices data-block"); | parm = RNA_def_pointer(func, "lattice", "Lattice", "", "New lattices data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a lattice from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a lattice from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "lattice", "Lattice", "", "Lattice to remove"); | parm = RNA_def_pointer(func, "lattice", "Lattice", "", "Lattice 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", | RNA_def_boolean(func, "do_unlink", true, "", | ||||
| "Unlink all usages of this lattice before deleting it " | "Unlink all usages of this lattice before deleting it " | ||||
| "(WARNING: will also delete objects instancing that lattice data)"); | "(WARNING: will also delete objects instancing that lattice data)"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_lattices_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_lattices_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_lattices_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_lattices_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataCurves"); | RNA_def_property_srna(cprop, "BlendDataCurves"); | ||||
| srna = RNA_def_struct(brna, "BlendDataCurves", NULL); | srna = RNA_def_struct(brna, "BlendDataCurves", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Curves", "Collection of curves"); | RNA_def_struct_ui_text(srna, "Main Curves", "Collection of curves"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_curves_new"); | func = RNA_def_function(srna, "new", "rna_Main_curves_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new curve to the main database"); | RNA_def_function_ui_description(func, "Add a new curve to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Curve", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Curve", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "type", rna_enum_object_type_curve_items, 0, "Type", "The type of curve to add"); | parm = RNA_def_enum(func, "type", rna_enum_object_type_curve_items, 0, "Type", "The type of curve to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "curve", "Curve", "", "New curve data-block"); | parm = RNA_def_pointer(func, "curve", "Curve", "", "New curve data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a curve from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a curve from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "curve", "Curve", "", "Curve to remove"); | parm = RNA_def_pointer(func, "curve", "Curve", "", "Curve 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", | RNA_def_boolean(func, "do_unlink", true, "", | ||||
| "Unlink all usages of this curve before deleting it " | "Unlink all usages of this curve before deleting it " | ||||
| "(WARNING: will also delete objects instancing that curve data)"); | "(WARNING: will also delete objects instancing that curve data)"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_curves_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_curves_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_curves_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_curves_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_metaballs(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_metaballs(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataMetaBalls"); | RNA_def_property_srna(cprop, "BlendDataMetaBalls"); | ||||
| srna = RNA_def_struct(brna, "BlendDataMetaBalls", NULL); | srna = RNA_def_struct(brna, "BlendDataMetaBalls", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Metaballs", "Collection of metaballs"); | RNA_def_struct_ui_text(srna, "Main Metaballs", "Collection of metaballs"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_metaballs_new"); | func = RNA_def_function(srna, "new", "rna_Main_metaballs_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new metaball to the main database"); | RNA_def_function_ui_description(func, "Add a new metaball to the main database"); | ||||
| parm = RNA_def_string(func, "name", "MetaBall", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "MetaBall", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "metaball", "MetaBall", "", "New metaball data-block"); | parm = RNA_def_pointer(func, "metaball", "MetaBall", "", "New metaball data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a metaball from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a metaball from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "metaball", "MetaBall", "", "Metaball to remove"); | parm = RNA_def_pointer(func, "metaball", "MetaBall", "", "Metaball 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", | RNA_def_boolean(func, "do_unlink", true, "", | ||||
| "Unlink all usages of this metaball before deleting it " | "Unlink all usages of this metaball before deleting it " | ||||
| "(WARNING: will also delete objects instancing that metaball data)"); | "(WARNING: will also delete objects instancing that metaball data)"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_metaballs_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_metaballs_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_metaballs_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_metaballs_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataFonts"); | RNA_def_property_srna(cprop, "BlendDataFonts"); | ||||
| srna = RNA_def_struct(brna, "BlendDataFonts", NULL); | srna = RNA_def_struct(brna, "BlendDataFonts", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Fonts", "Collection of fonts"); | RNA_def_struct_ui_text(srna, "Main Fonts", "Collection of fonts"); | ||||
| func = RNA_def_function(srna, "load", "rna_Main_fonts_load"); | func = RNA_def_function(srna, "load", "rna_Main_fonts_load"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Load a new font into the main database"); | RNA_def_function_ui_description(func, "Load a new font into the main database"); | ||||
| parm = RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the font to load"); | parm = RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the font to load"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_boolean(func, "check_existing", false, "", "Using existing data-block if this file is already loaded"); | RNA_def_boolean(func, "check_existing", false, "", "Using existing data-block if this file is already loaded"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "vfont", "VectorFont", "", "New font data-block"); | parm = RNA_def_pointer(func, "vfont", "VectorFont", "", "New font data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a font from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a font from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "vfont", "VectorFont", "", "Font to remove"); | parm = RNA_def_pointer(func, "vfont", "VectorFont", "", "Font 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this font before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this font before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_fonts_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_fonts_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_fonts_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_fonts_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataTextures"); | RNA_def_property_srna(cprop, "BlendDataTextures"); | ||||
| srna = RNA_def_struct(brna, "BlendDataTextures", NULL); | srna = RNA_def_struct(brna, "BlendDataTextures", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Textures", "Collection of groups"); | RNA_def_struct_ui_text(srna, "Main Textures", "Collection of groups"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_textures_new"); | func = RNA_def_function(srna, "new", "rna_Main_textures_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new texture to the main database"); | RNA_def_function_ui_description(func, "Add a new texture to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Texture", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Texture", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "type", rna_enum_texture_type_items, 0, "Type", "The type of texture to add"); | parm = RNA_def_enum(func, "type", rna_enum_texture_type_items, 0, "Type", "The type of texture to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "texture", "Texture", "", "New texture data-block"); | parm = RNA_def_pointer(func, "texture", "Texture", "", "New texture data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a texture from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a texture from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "texture", "Texture", "", "Texture to remove"); | parm = RNA_def_pointer(func, "texture", "Texture", "", "Texture 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this texture before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this texture before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_textures_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_textures_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_textures_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_textures_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataBrushes"); | RNA_def_property_srna(cprop, "BlendDataBrushes"); | ||||
| srna = RNA_def_struct(brna, "BlendDataBrushes", NULL); | srna = RNA_def_struct(brna, "BlendDataBrushes", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Brushes", "Collection of brushes"); | RNA_def_struct_ui_text(srna, "Main Brushes", "Collection of brushes"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_brushes_new"); | func = RNA_def_function(srna, "new", "rna_Main_brushes_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new brush to the main database"); | RNA_def_function_ui_description(func, "Add a new brush to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Brush", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Brush", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "mode", rna_enum_object_mode_items, OB_MODE_TEXTURE_PAINT, "", "Paint Mode for the new brush"); | parm = RNA_def_enum(func, "mode", rna_enum_object_mode_items, OB_MODE_TEXTURE_PAINT, "", "Paint Mode for the new brush"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "brush", "Brush", "", "New brush data-block"); | parm = RNA_def_pointer(func, "brush", "Brush", "", "New brush data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a brush from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a brush from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "brush", "Brush", "", "Brush to remove"); | parm = RNA_def_pointer(func, "brush", "Brush", "", "Brush 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this brush before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this brush before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_brushes_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_brushes_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_brushes_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_brushes_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataWorlds"); | RNA_def_property_srna(cprop, "BlendDataWorlds"); | ||||
| srna = RNA_def_struct(brna, "BlendDataWorlds", NULL); | srna = RNA_def_struct(brna, "BlendDataWorlds", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Worlds", "Collection of worlds"); | RNA_def_struct_ui_text(srna, "Main Worlds", "Collection of worlds"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_worlds_new"); | func = RNA_def_function(srna, "new", "rna_Main_worlds_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new world to the main database"); | RNA_def_function_ui_description(func, "Add a new world to the main database"); | ||||
| parm = RNA_def_string(func, "name", "World", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "World", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "world", "World", "", "New world data-block"); | parm = RNA_def_pointer(func, "world", "World", "", "New world data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a world from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a world from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "world", "World", "", "World to remove"); | parm = RNA_def_pointer(func, "world", "World", "", "World 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this world before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this world before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_worlds_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_worlds_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_worlds_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_worlds_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_groups(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_groups(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataGroups"); | RNA_def_property_srna(cprop, "BlendDataGroups"); | ||||
| srna = RNA_def_struct(brna, "BlendDataGroups", NULL); | srna = RNA_def_struct(brna, "BlendDataGroups", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Groups", "Collection of groups"); | RNA_def_struct_ui_text(srna, "Main Groups", "Collection of groups"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_groups_new"); | func = RNA_def_function(srna, "new", "rna_Main_groups_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new group to the main database"); | RNA_def_function_ui_description(func, "Add a new group to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Group", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Group", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "group", "Group", "", "New group data-block"); | parm = RNA_def_pointer(func, "group", "Group", "", "New group data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a group from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a group from the current blendfile"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "group", "Group", "", "Group to remove"); | parm = RNA_def_pointer(func, "group", "Group", "", "Group 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this group before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this group before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_groups_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_groups_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_groups_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_groups_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_speakers(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_speakers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataSpeakers"); | RNA_def_property_srna(cprop, "BlendDataSpeakers"); | ||||
| srna = RNA_def_struct(brna, "BlendDataSpeakers", NULL); | srna = RNA_def_struct(brna, "BlendDataSpeakers", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Speakers", "Collection of speakers"); | RNA_def_struct_ui_text(srna, "Main Speakers", "Collection of speakers"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_speakers_new"); | func = RNA_def_function(srna, "new", "rna_Main_speakers_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new speaker to the main database"); | RNA_def_function_ui_description(func, "Add a new speaker to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Speaker", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Speaker", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "speaker", "Speaker", "", "New speaker data-block"); | parm = RNA_def_pointer(func, "speaker", "Speaker", "", "New speaker data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a speaker from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a speaker from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "speaker", "Speaker", "", "Speaker to remove"); | parm = RNA_def_pointer(func, "speaker", "Speaker", "", "Speaker 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", | RNA_def_boolean(func, "do_unlink", true, "", | ||||
| "Unlink all usages of this speaker before deleting it " | "Unlink all usages of this speaker before deleting it " | ||||
| "(WARNING: will also delete objects instancing that speaker data)"); | "(WARNING: will also delete objects instancing that speaker data)"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_speakers_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_speakers_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_speakers_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_speakers_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataTexts"); | RNA_def_property_srna(cprop, "BlendDataTexts"); | ||||
| srna = RNA_def_struct(brna, "BlendDataTexts", NULL); | srna = RNA_def_struct(brna, "BlendDataTexts", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Texts", "Collection of texts"); | RNA_def_struct_ui_text(srna, "Main Texts", "Collection of texts"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_texts_new"); | func = RNA_def_function(srna, "new", "rna_Main_texts_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new text to the main database"); | RNA_def_function_ui_description(func, "Add a new text to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Text", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Text", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "text", "Text", "", "New text data-block"); | parm = RNA_def_pointer(func, "text", "Text", "", "New text data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a text from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a text from the current blendfile"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "text", "Text", "", "Text to remove"); | parm = RNA_def_pointer(func, "text", "Text", "", "Text 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this text before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this text before deleting it"); | ||||
| /* load func */ | /* load func */ | ||||
| func = RNA_def_function(srna, "load", "rna_Main_texts_load"); | func = RNA_def_function(srna, "load", "rna_Main_texts_load"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Add a new text to the main database from a file"); | RNA_def_function_ui_description(func, "Add a new text to the main database from a file"); | ||||
| parm = RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the data-block"); | parm = RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_boolean(func, "internal", 0, "Make internal", "Make text file internal after loading"); | parm = RNA_def_boolean(func, "internal", 0, "Make internal", "Make text file internal after loading"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "text", "Text", "", "New text data-block"); | parm = RNA_def_pointer(func, "text", "Text", "", "New text data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_texts_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_texts_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_texts_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_texts_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_sounds(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_sounds(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataSounds"); | RNA_def_property_srna(cprop, "BlendDataSounds"); | ||||
| srna = RNA_def_struct(brna, "BlendDataSounds", NULL); | srna = RNA_def_struct(brna, "BlendDataSounds", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Sounds", "Collection of sounds"); | RNA_def_struct_ui_text(srna, "Main Sounds", "Collection of sounds"); | ||||
| /* load func */ | /* load func */ | ||||
| func = RNA_def_function(srna, "load", "rna_Main_sounds_load"); | func = RNA_def_function(srna, "load", "rna_Main_sounds_load"); | ||||
| RNA_def_function_ui_description(func, "Add a new sound to the main database from a file"); | RNA_def_function_ui_description(func, "Add a new sound to the main database from a file"); | ||||
| parm = RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the data-block"); | parm = RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_boolean(func, "check_existing", false, "", "Using existing data-block if this file is already loaded"); | RNA_def_boolean(func, "check_existing", false, "", "Using existing data-block if this file is already loaded"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "sound", "Sound", "", "New text data-block"); | parm = RNA_def_pointer(func, "sound", "Sound", "", "New text data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a sound from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a sound from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "sound", "Sound", "", "Sound to remove"); | parm = RNA_def_pointer(func, "sound", "Sound", "", "Sound 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this sound before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this sound before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_sounds_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_sounds_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_sounds_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_sounds_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataArmatures"); | RNA_def_property_srna(cprop, "BlendDataArmatures"); | ||||
| srna = RNA_def_struct(brna, "BlendDataArmatures", NULL); | srna = RNA_def_struct(brna, "BlendDataArmatures", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Armatures", "Collection of armatures"); | RNA_def_struct_ui_text(srna, "Main Armatures", "Collection of armatures"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_armatures_new"); | func = RNA_def_function(srna, "new", "rna_Main_armatures_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new armature to the main database"); | RNA_def_function_ui_description(func, "Add a new armature to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Armature", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Armature", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "armature", "Armature", "", "New armature data-block"); | parm = RNA_def_pointer(func, "armature", "Armature", "", "New armature data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a armature from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a armature from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "armature", "Armature", "", "Armature to remove"); | parm = RNA_def_pointer(func, "armature", "Armature", "", "Armature 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", | RNA_def_boolean(func, "do_unlink", true, "", | ||||
| "Unlink all usages of this armature before deleting it " | "Unlink all usages of this armature before deleting it " | ||||
| "(WARNING: will also delete objects instancing that armature data)"); | "(WARNING: will also delete objects instancing that armature data)"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_armatures_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_armatures_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_armatures_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_armatures_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataActions"); | RNA_def_property_srna(cprop, "BlendDataActions"); | ||||
| srna = RNA_def_struct(brna, "BlendDataActions", NULL); | srna = RNA_def_struct(brna, "BlendDataActions", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Actions", "Collection of actions"); | RNA_def_struct_ui_text(srna, "Main Actions", "Collection of actions"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_actions_new"); | func = RNA_def_function(srna, "new", "rna_Main_actions_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new action to the main database"); | RNA_def_function_ui_description(func, "Add a new action to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Action", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Action", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "action", "Action", "", "New action data-block"); | parm = RNA_def_pointer(func, "action", "Action", "", "New action data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a action from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a action from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "action", "Action", "", "Action to remove"); | parm = RNA_def_pointer(func, "action", "Action", "", "Action 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this action before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this action before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_actions_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_actions_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_actions_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_actions_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataParticles"); | RNA_def_property_srna(cprop, "BlendDataParticles"); | ||||
| srna = RNA_def_struct(brna, "BlendDataParticles", NULL); | srna = RNA_def_struct(brna, "BlendDataParticles", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Particle Settings", "Collection of particle settings"); | RNA_def_struct_ui_text(srna, "Main Particle Settings", "Collection of particle settings"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_particles_new"); | func = RNA_def_function(srna, "new", "rna_Main_particles_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new particle settings instance to the main database"); | RNA_def_function_ui_description(func, "Add a new particle settings instance to the main database"); | ||||
| parm = RNA_def_string(func, "name", "ParticleSettings", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "ParticleSettings", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "particle", "ParticleSettings", "", "New particle settings data-block"); | parm = RNA_def_pointer(func, "particle", "ParticleSettings", "", "New particle settings data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a particle settings instance from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a particle settings instance from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings to remove"); | parm = RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of those particle settings before deleting them"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of those particle settings before deleting them"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_particles_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_particles_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_particles_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_particles_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_palettes(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_palettes(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataPalettes"); | RNA_def_property_srna(cprop, "BlendDataPalettes"); | ||||
| srna = RNA_def_struct(brna, "BlendDataPalettes", NULL); | srna = RNA_def_struct(brna, "BlendDataPalettes", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Palettes", "Collection of palettes"); | RNA_def_struct_ui_text(srna, "Main Palettes", "Collection of palettes"); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_palettes_new"); | func = RNA_def_function(srna, "new", "rna_Main_palettes_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new palette to the main database"); | RNA_def_function_ui_description(func, "Add a new palette to the main database"); | ||||
| parm = RNA_def_string(func, "name", "Palette", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "Palette", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "palette", "Palette", "", "New palette data-block"); | parm = RNA_def_pointer(func, "palette", "Palette", "", "New palette data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a palette from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a palette from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "palette", "Palette", "", "Palette to remove"); | parm = RNA_def_pointer(func, "palette", "Palette", "", "Palette 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this palette before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this palette before deleting it"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_palettes_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_palettes_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_palettes_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_palettes_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_cachefiles(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_cachefiles(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | |||||
| FunctionRNA *func; | |||||
| PropertyRNA *parm; | |||||
| PropertyRNA *prop; | |||||
| RNA_def_property_srna(cprop, "BlendDataCacheFiles"); | RNA_def_property_srna(cprop, "BlendDataCacheFiles"); | ||||
| StructRNA *srna = RNA_def_struct(brna, "BlendDataCacheFiles", NULL); | srna = RNA_def_struct(brna, "BlendDataCacheFiles", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Cache Files", "Collection of cache files"); | RNA_def_struct_ui_text(srna, "Main Cache Files", "Collection of cache files"); | ||||
| FunctionRNA *func = RNA_def_function(srna, "tag", "rna_Main_cachefiles_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_cachefiles_tag"); | ||||
| PropertyRNA *parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| PropertyRNA *prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_cachefiles_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_cachefiles_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_paintcurves(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_paintcurves(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | |||||
| FunctionRNA *func; | |||||
| PropertyRNA *parm; | |||||
| PropertyRNA *prop; | |||||
| RNA_def_property_srna(cprop, "BlendDataPaintCurves"); | RNA_def_property_srna(cprop, "BlendDataPaintCurves"); | ||||
| StructRNA *srna = RNA_def_struct(brna, "BlendDataPaintCurves", NULL); | srna = RNA_def_struct(brna, "BlendDataPaintCurves", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Paint Curves", "Collection of paint curves"); | RNA_def_struct_ui_text(srna, "Main Paint Curves", "Collection of paint curves"); | ||||
| FunctionRNA *func = RNA_def_function(srna, "tag", "rna_Main_paintcurves_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_paintcurves_tag"); | ||||
| PropertyRNA *parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| PropertyRNA *prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_paintcurves_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_paintcurves_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_gpencil(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_gpencil(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataGreasePencils"); | RNA_def_property_srna(cprop, "BlendDataGreasePencils"); | ||||
| srna = RNA_def_struct(brna, "BlendDataGreasePencils", NULL); | srna = RNA_def_struct(brna, "BlendDataGreasePencils", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Grease Pencils", "Collection of grease pencils"); | RNA_def_struct_ui_text(srna, "Main Grease Pencils", "Collection of grease pencils"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_gpencil_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_gpencil_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "new", "BKE_gpencil_data_addnew"); | func = RNA_def_function(srna, "new", "BKE_gpencil_data_addnew"); | ||||
| RNA_def_function_flag(func, FUNC_NO_SELF); | RNA_def_function_flag(func, FUNC_NO_SELF); | ||||
| parm = RNA_def_string(func, "name", "GreasePencil", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "GreasePencil", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "grease_pencil", "GreasePencil", "", "New grease pencil data-block"); | parm = RNA_def_pointer(func, "grease_pencil", "GreasePencil", "", "New grease pencil data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a grease pencil instance from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a grease pencil instance from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "grease_pencil", "GreasePencil", "", "Grease Pencil to remove"); | parm = RNA_def_pointer(func, "grease_pencil", "GreasePencil", "", "Grease Pencil 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this grease pencil before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this grease pencil before deleting it"); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_gpencil_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_gpencil_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_movieclips(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_movieclips(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataMovieClips"); | RNA_def_property_srna(cprop, "BlendDataMovieClips"); | ||||
| srna = RNA_def_struct(brna, "BlendDataMovieClips", NULL); | srna = RNA_def_struct(brna, "BlendDataMovieClips", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Movie Clips", "Collection of movie clips"); | RNA_def_struct_ui_text(srna, "Main Movie Clips", "Collection of movie clips"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_movieclips_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_movieclips_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a movie clip from the current blendfile."); | RNA_def_function_ui_description(func, "Remove a movie clip from the current blendfile."); | ||||
| parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to remove"); | parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this movie clip before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this movie clip before deleting it"); | ||||
| /* load func */ | /* load func */ | ||||
| func = RNA_def_function(srna, "load", "rna_Main_movieclip_load"); | func = RNA_def_function(srna, "load", "rna_Main_movieclip_load"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description( | RNA_def_function_ui_description( | ||||
| func, "Add a new movie clip to the main database from a file " | func, "Add a new movie clip to the main database from a file " | ||||
| "(while ``check_existing`` is disabled for consistency with other load functions, " | "(while ``check_existing`` is disabled for consistency with other load functions, " | ||||
| "behavior with multiple movie-clips using the same file may incorrectly generate proxies)"); | "behavior with multiple movie-clips using the same file may incorrectly generate proxies)"); | ||||
| parm = RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the data-block"); | parm = RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_boolean(func, "check_existing", false, "", "Using existing data-block if this file is already loaded"); | RNA_def_boolean(func, "check_existing", false, "", "Using existing data-block if this file is already loaded"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "clip", "MovieClip", "", "New movie clip data-block"); | parm = RNA_def_pointer(func, "clip", "MovieClip", "", "New movie clip data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_movieclips_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_movieclips_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataMasks"); | RNA_def_property_srna(cprop, "BlendDataMasks"); | ||||
| srna = RNA_def_struct(brna, "BlendDataMasks", NULL); | srna = RNA_def_struct(brna, "BlendDataMasks", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Masks", "Collection of masks"); | RNA_def_struct_ui_text(srna, "Main Masks", "Collection of masks"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_masks_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_masks_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* new func */ | /* new func */ | ||||
| func = RNA_def_function(srna, "new", "rna_Main_mask_new"); | func = RNA_def_function(srna, "new", "rna_Main_mask_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new mask with a given name to the main database"); | RNA_def_function_ui_description(func, "Add a new mask with a given name to the main database"); | ||||
| RNA_def_string_file_path(func, "name", NULL, MAX_ID_NAME - 2, "Mask", "Name of new mask data-block"); | RNA_def_string_file_path(func, "name", NULL, MAX_ID_NAME - 2, "Mask", "Name of new mask data-block"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "mask", "Mask", "", "New mask data-block"); | parm = RNA_def_pointer(func, "mask", "Mask", "", "New mask data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* remove func */ | /* remove func */ | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a masks from the current blendfile."); | RNA_def_function_ui_description(func, "Remove a masks from the current blendfile."); | ||||
| parm = RNA_def_pointer(func, "mask", "Mask", "", "Mask to remove"); | parm = RNA_def_pointer(func, "mask", "Mask", "", "Mask 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this mask before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this mask before deleting it"); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_masks_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_masks_is_updated_get", NULL); | ||||
| } | } | ||||
| void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_property_srna(cprop, "BlendDataLineStyles"); | RNA_def_property_srna(cprop, "BlendDataLineStyles"); | ||||
| srna = RNA_def_struct(brna, "BlendDataLineStyles", NULL); | srna = RNA_def_struct(brna, "BlendDataLineStyles", NULL); | ||||
| RNA_def_struct_sdna(srna, "Main"); | RNA_def_struct_sdna(srna, "Main"); | ||||
| RNA_def_struct_ui_text(srna, "Main Line Styles", "Collection of line styles"); | RNA_def_struct_ui_text(srna, "Main Line Styles", "Collection of line styles"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_linestyle_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_linestyle_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "new", "rna_Main_linestyles_new"); | func = RNA_def_function(srna, "new", "rna_Main_linestyles_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new line style instance to the main database"); | RNA_def_function_ui_description(func, "Add a new line style instance to the main database"); | ||||
| parm = RNA_def_string(func, "name", "FreestyleLineStyle", 0, "", "New name for the data-block"); | parm = RNA_def_string(func, "name", "FreestyleLineStyle", 0, "", "New name for the data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "New line style data-block"); | parm = RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "New line style data-block"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a line style instance from the current blendfile"); | RNA_def_function_ui_description(func, "Remove a line style instance from the current blendfile"); | ||||
| parm = RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "Line style to remove"); | parm = RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "Line style 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); | ||||
| RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this line style before deleting it"); | RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of this line style before deleting it"); | ||||
| prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Main_linestyle_is_updated_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Main_linestyle_is_updated_get", NULL); | ||||
| } | } | ||||
| #endif | #endif | ||||