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:
authorJanne Karhu <jhkarh@gmail.com>2009-08-02 23:39:33 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-08-02 23:39:33 +0400
commitdc75023f6ff54d1b7c99360260fa3e70a4e42005 (patch)
treed445af308df4ad8612d0cdd352b48d98b0705a47 /source/blender/makesrna/intern/rna_modifier.c
parent7b123ff13c21984c36a44962b5e48d8ae8b69c6e (diff)
Softbody now uses the new pointcache code.
Note: Rna access to softbody point cache is through softbody modifier although the point cache is in softbody settings. This is to make it similar to cloth. Bugfix: Softbody rna was trying to get "ob->soft->softflag" instead of the correct "ob->softflag".
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 5192e2df611..80bc46bb2f0 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -34,6 +34,7 @@
#include "DNA_armature_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
+#include "DNA_object_force.h"
#include "DNA_scene_types.h"
#include "BKE_bmesh.h" /* For BevelModifierData */
@@ -383,6 +384,12 @@ static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_SoftBodySettings, ob->soft);
}
+static PointerRNA rna_SoftBodyModifier_point_cache_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ return rna_pointer_inherit_refine(ptr, &RNA_PointCache, ob->soft->pointcache);
+}
+
static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
@@ -883,6 +890,11 @@ static void rna_def_modifier_softbody(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "SoftBodySettings");
RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_settings_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Soft Body Settings", "");
+
+ prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "PointCache");
+ RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_point_cache_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Soft Body Point Cache", "");
}
static void rna_def_modifier_boolean(BlenderRNA *brna)