Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_main_api.c
| Show First 20 Lines • Show All 672 Lines • ▼ Show 20 Lines | static Hair *rna_Main_hairs_new(Main *bmain, const char *name) | ||||
| rna_idname_validate(name, safe_name); | rna_idname_validate(name, safe_name); | ||||
| Hair *hair = BKE_hair_add(bmain, safe_name); | Hair *hair = BKE_hair_add(bmain, safe_name); | ||||
| id_us_min(&hair->id); | id_us_min(&hair->id); | ||||
| return hair; | return hair; | ||||
| } | } | ||||
| # endif | # endif | ||||
| # ifdef WITH_POINT_CLOUD | |||||
| static PointCloud *rna_Main_pointclouds_new(Main *bmain, const char *name) | static PointCloud *rna_Main_pointclouds_new(Main *bmain, const char *name) | ||||
| { | { | ||||
| char safe_name[MAX_ID_NAME - 2]; | char safe_name[MAX_ID_NAME - 2]; | ||||
| rna_idname_validate(name, safe_name); | rna_idname_validate(name, safe_name); | ||||
| PointCloud *pointcloud = BKE_pointcloud_add(bmain, safe_name); | PointCloud *pointcloud = BKE_pointcloud_add(bmain, safe_name); | ||||
| id_us_min(&pointcloud->id); | id_us_min(&pointcloud->id); | ||||
| return pointcloud; | return pointcloud; | ||||
| } | } | ||||
| # endif | |||||
| static Volume *rna_Main_volumes_new(Main *bmain, const char *name) | static Volume *rna_Main_volumes_new(Main *bmain, const char *name) | ||||
| { | { | ||||
| char safe_name[MAX_ID_NAME - 2]; | char safe_name[MAX_ID_NAME - 2]; | ||||
| rna_idname_validate(name, safe_name); | rna_idname_validate(name, safe_name); | ||||
| Volume *volume = BKE_volume_add(bmain, safe_name); | Volume *volume = BKE_volume_add(bmain, safe_name); | ||||
| id_us_min(&volume->id); | id_us_min(&volume->id); | ||||
| ▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(linestyle, linestyles, ID_LS) | RNA_MAIN_ID_TAG_FUNCS_DEF(linestyle, linestyles, ID_LS) | ||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(cachefiles, cachefiles, ID_CF) | RNA_MAIN_ID_TAG_FUNCS_DEF(cachefiles, cachefiles, ID_CF) | ||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(paintcurves, paintcurves, ID_PC) | RNA_MAIN_ID_TAG_FUNCS_DEF(paintcurves, paintcurves, ID_PC) | ||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(workspaces, workspaces, ID_WS) | RNA_MAIN_ID_TAG_FUNCS_DEF(workspaces, workspaces, ID_WS) | ||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(lightprobes, lightprobes, ID_LP) | RNA_MAIN_ID_TAG_FUNCS_DEF(lightprobes, lightprobes, ID_LP) | ||||
| # ifdef WITH_HAIR_NODES | # ifdef WITH_HAIR_NODES | ||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(hairs, hairs, ID_HA) | RNA_MAIN_ID_TAG_FUNCS_DEF(hairs, hairs, ID_HA) | ||||
| # endif | # endif | ||||
| # ifdef WITH_POINT_CLOUD | |||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(pointclouds, pointclouds, ID_PT) | RNA_MAIN_ID_TAG_FUNCS_DEF(pointclouds, pointclouds, ID_PT) | ||||
| # endif | |||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volumes, ID_VO) | RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volumes, ID_VO) | ||||
| # ifdef WITH_GEOMETRY_NODES | # ifdef WITH_GEOMETRY_NODES | ||||
| RNA_MAIN_ID_TAG_FUNCS_DEF(simulations, simulations, ID_SIM) | RNA_MAIN_ID_TAG_FUNCS_DEF(simulations, simulations, ID_SIM) | ||||
| # endif | # endif | ||||
| # undef RNA_MAIN_ID_TAG_FUNCS_DEF | # undef RNA_MAIN_ID_TAG_FUNCS_DEF | ||||
| #else | #else | ||||
| ▲ Show 20 Lines • Show All 1,434 Lines • ▼ Show 20 Lines | RNA_def_boolean( | ||||
| func, "do_ui_user", true, "", "Make sure interface does not reference this hair data"); | func, "do_ui_user", true, "", "Make sure interface does not reference this hair data"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_hairs_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_hairs_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| } | } | ||||
| # endif | # endif | ||||
| # ifdef WITH_POINT_CLOUD | |||||
| void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "BlendDataPointClouds"); | RNA_def_property_srna(cprop, "BlendDataPointClouds"); | ||||
| srna = RNA_def_struct(brna, "BlendDataPointClouds", NULL); | srna = RNA_def_struct(brna, "BlendDataPointClouds", NULL); | ||||
| Show All 30 Lines | RNA_def_boolean(func, | ||||
| true, | true, | ||||
| "", | "", | ||||
| "Make sure interface does not reference this point cloud data"); | "Make sure interface does not reference this point cloud data"); | ||||
| func = RNA_def_function(srna, "tag", "rna_Main_pointclouds_tag"); | func = RNA_def_function(srna, "tag", "rna_Main_pointclouds_tag"); | ||||
| parm = RNA_def_boolean(func, "value", 0, "Value", ""); | parm = RNA_def_boolean(func, "value", 0, "Value", ""); | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| } | } | ||||
| # endif | |||||
| void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop) | void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "BlendDataVolumes"); | RNA_def_property_srna(cprop, "BlendDataVolumes"); | ||||
| ▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines | |||||