[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20979] branches/blender2.5/blender/source /blender/makesrna/intern/rna_cloth.c: RNA:
Brecht Van Lommel
brecht at blender.org
Thu Jun 18 16:29:24 CEST 2009
Revision: 20979
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20979
Author: blendix
Date: 2009-06-18 16:29:24 +0200 (Thu, 18 Jun 2009)
Log Message:
-----------
RNA:
* Make cloth settings animateable from buttons.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/makesrna/intern/rna_cloth.c
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_cloth.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_cloth.c 2009-06-18 14:20:25 UTC (rev 20978)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_cloth.c 2009-06-18 14:29:24 UTC (rev 20979)
@@ -31,6 +31,8 @@
#include "rna_internal.h"
#include "BKE_cloth.h"
+#include "BKE_modifier.h"
+
#include "DNA_cloth_types.h"
#ifdef RNA_RUNTIME
@@ -129,6 +131,22 @@
sim->gravity[2]= values[2];
}
+static char *rna_ClothSettings_path(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
+
+ return BLI_sprintfN("modifiers[%s].settings", md->name);
+}
+
+static char *rna_ClothCollisionSettings_path(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
+
+ return BLI_sprintfN("modifiers[%s].collision_settings", md->name);
+}
+
#else
static void rna_def_cloth_sim_settings(BlenderRNA *brna)
@@ -139,6 +157,7 @@
srna = RNA_def_struct(brna, "ClothSettings", NULL);
RNA_def_struct_ui_text(srna, "Cloth Settings", "Cloth simulation settings for an object.");
RNA_def_struct_sdna(srna, "ClothSimSettings");
+ RNA_def_struct_path_func(srna, "rna_ClothSettings_path");
/* goal */
@@ -297,6 +316,7 @@
srna = RNA_def_struct(brna, "ClothCollisionSettings", NULL);
RNA_def_struct_ui_text(srna, "Cloth Collision Settings", "Cloth simulation settings for self collision and collision with other objects.");
RNA_def_struct_sdna(srna, "ClothCollSettings");
+ RNA_def_struct_path_func(srna, "rna_ClothCollisionSettings_path");
/* general collision */
More information about the Bf-blender-cvs
mailing list