Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_key.c
| Show First 20 Lines • Show All 914 Lines • ▼ Show 20 Lines | static void rna_def_keyblock(BlenderRNA *brna) | ||||
| RNA_def_property_collection_sdna(prop, NULL, "data", "totelem"); | RNA_def_property_collection_sdna(prop, NULL, "data", "totelem"); | ||||
| RNA_def_property_struct_type(prop, "UnknownType"); | RNA_def_property_struct_type(prop, "UnknownType"); | ||||
| RNA_def_property_ui_text(prop, "Data", ""); | RNA_def_property_ui_text(prop, "Data", ""); | ||||
| RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", NULL, NULL, "rna_ShapeKey_data_get", | RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", NULL, NULL, "rna_ShapeKey_data_get", | ||||
| "rna_ShapeKey_data_length", "rna_ShapeKey_data_lookup_int", NULL, NULL); | "rna_ShapeKey_data_length", "rna_ShapeKey_data_lookup_int", NULL, NULL); | ||||
| /* XXX multi-dim dynamic arrays are very badly supported by (py)rna currently, those are defined for the day | /* XXX multi-dim dynamic arrays are very badly supported by (py)rna currently, those are defined for the day | ||||
| * it works better, for now user will get a 1D tuple... | * it works better, for now user will get a 1D tuple... | ||||
| **/ | */ | ||||
| func = RNA_def_function(srna, "normals_vertex_get", "rna_KeyBlock_normals_vert_calc"); | func = RNA_def_function(srna, "normals_vertex_get", "rna_KeyBlock_normals_vert_calc"); | ||||
| RNA_def_function_ui_description(func, "Compute local space vertices' normals for this shape key"); | RNA_def_function_ui_description(func, "Compute local space vertices' normals for this shape key"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID); | RNA_def_function_flag(func, FUNC_USE_SELF_ID); | ||||
| parm = RNA_def_property(func, "normals", PROP_FLOAT, /* PROP_DIRECTION */ PROP_NONE); | parm = RNA_def_property(func, "normals", PROP_FLOAT, /* PROP_DIRECTION */ PROP_NONE); | ||||
| RNA_def_parameter_flags(parm, PROP_DYNAMIC, PARM_OUTPUT); | RNA_def_parameter_flags(parm, PROP_DYNAMIC, PARM_OUTPUT); | ||||
| RNA_def_property_multi_array(parm, 2, NULL); | RNA_def_property_multi_array(parm, 2, NULL); | ||||
| RNA_def_property_range(parm, -1.0f, 1.0f); | RNA_def_property_range(parm, -1.0f, 1.0f); | ||||
| RNA_def_property_dynamic_array_funcs(parm, "rna_KeyBlock_normals_vert_len"); | RNA_def_property_dynamic_array_funcs(parm, "rna_KeyBlock_normals_vert_len"); | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||