Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_meta_api.c
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| static void rna_Meta_transform(struct MetaBall *mb, float *mat) | static void rna_Meta_transform(struct MetaBall *mb, float *mat) | ||||
| { | { | ||||
| BKE_mball_transform(mb, (float (*)[4])mat, true); | BKE_mball_transform(mb, (float (*)[4])mat, true); | ||||
| DEG_id_tag_update(&mb->id, 0); | DEG_id_tag_update(&mb->id, 0); | ||||
| } | } | ||||
| static void rna_Mball_update_gpu_tag(MetaBall *mb) | |||||
| { | |||||
| BKE_mball_batch_cache_dirty(mb, BKE_MBALL_BATCH_DIRTY_ALL); | |||||
| } | |||||
| #else | #else | ||||
| void RNA_api_meta(StructRNA *srna) | void RNA_api_meta(StructRNA *srna) | ||||
| { | { | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| func = RNA_def_function(srna, "transform", "rna_Meta_transform"); | func = RNA_def_function(srna, "transform", "rna_Meta_transform"); | ||||
| RNA_def_function_ui_description(func, "Transform meta elements by a matrix"); | RNA_def_function_ui_description(func, "Transform meta elements by a matrix"); | ||||
| parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f); | parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f); | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_function(srna, "update_gpu_tag", "rna_Mball_update_gpu_tag"); | |||||
| } | } | ||||
| #endif | #endif | ||||