Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index c412fd460b3..1ba00056ea5 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -46,6 +46,7 @@
#include "BKE_data_transfer.h"
#include "BKE_DerivedMesh.h"
#include "BKE_dynamicpaint.h"
+#include "BKE_effect.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_remap.h"
#include "BKE_multires.h"
@@ -719,6 +720,28 @@ static int rna_LaplacianDeformModifier_is_bind_get(PointerRNA *ptr)
return ((lmd->flag & MOD_LAPLACIANDEFORM_BIND) && (lmd->cache_system != NULL));
}
+static int rna_ClothModifier_show_debug_data_get(PointerRNA *ptr)
+{
+ ClothModifierData *clmd = (ClothModifierData *)ptr->data;
+ return clmd->debug_data != NULL;
+}
+
+static void rna_ClothModifier_show_debug_data_set(PointerRNA *ptr, int value)
+{
+ ClothModifierData *clmd = (ClothModifierData *)ptr->data;
+ if (value) {
+ if (!clmd->debug_data) {
+ clmd->debug_data = BKE_sim_debug_data_new();
+ }
+ }
+ else {
+ if (clmd->debug_data) {
+ BKE_sim_debug_data_free(clmd->debug_data);
+ clmd->debug_data = NULL;
+ }
+ }
+}
+
/* NOTE: Curve and array modifiers requires curve path to be evaluated,
* dependency graph will make sure that curve eval would create such a path,
* but if curve was already evaluated we might miss path.
@@ -2468,6 +2491,11 @@ static void rna_def_modifier_cloth(BlenderRNA *brna)
prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Point Cache", "");
+
+ prop = RNA_def_property(srna, "show_debug_data", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_ClothModifier_show_debug_data_get", "rna_ClothModifier_show_debug_data_set");
+ RNA_def_property_ui_text(prop, "Debug", "Show debug info");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_smoke(BlenderRNA *brna)