Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_curves.c
| Show All 10 Lines | |||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "DNA_curves_types.h" | #include "DNA_curves_types.h" | ||||
| #include "BLI_math_base.h" | #include "BLI_math_base.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "WM_types.h" | |||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| # include "BLI_math_vector.h" | # include "BLI_math_vector.h" | ||||
| # include "BKE_attribute.h" | # include "BKE_attribute.h" | ||||
| # include "BKE_curves.h" | # include "BKE_curves.h" | ||||
| # include "DEG_depsgraph.h" | # include "DEG_depsgraph.h" | ||||
| ▲ Show 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | static void rna_def_curves(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE); | prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE); | ||||
| RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol"); | RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol"); | ||||
| RNA_def_property_struct_type(prop, "Material"); | RNA_def_property_struct_type(prop, "Material"); | ||||
| RNA_def_property_ui_text(prop, "Materials", ""); | RNA_def_property_ui_text(prop, "Materials", ""); | ||||
| RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */ | RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */ | ||||
| RNA_def_property_collection_funcs( | RNA_def_property_collection_funcs( | ||||
| prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int"); | prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int"); | ||||
| prop = RNA_def_property(srna, "surface", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_struct_type(prop, "Object"); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | |||||
HooglyBoogly: Is the property not editable by default? | |||||
JacquesLuckeAuthorUnsubmitted Done Inline ActionsNo, think PROP_POINTER are not editable by default or so. JacquesLucke: No, think `PROP_POINTER` are not editable by default or so. | |||||
| RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Mesh_object_poll"); | |||||
| RNA_def_property_ui_text(prop, "Surface", "Mesh that the curves can be attached to"); | |||||
HooglyBooglyUnsubmitted Not Done Inline ActionsMesh -> Mesh object HooglyBoogly: Mesh -> Mesh object | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); | |||||
| /* attributes */ | /* attributes */ | ||||
| rna_def_attributes_common(srna); | rna_def_attributes_common(srna); | ||||
| /* common */ | /* common */ | ||||
| rna_def_animdata_common(srna); | rna_def_animdata_common(srna); | ||||
| } | } | ||||
| void RNA_def_curves(BlenderRNA *brna) | void RNA_def_curves(BlenderRNA *brna) | ||||
| { | { | ||||
| rna_def_curves_point(brna); | rna_def_curves_point(brna); | ||||
| rna_def_curves_curve(brna); | rna_def_curves_curve(brna); | ||||
| rna_def_curves(brna); | rna_def_curves(brna); | ||||
| } | } | ||||
| #endif | #endif | ||||
Is the property not editable by default?