Revision: 21143
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21143
Author:   aligorith
Date:     2009-06-25 02:21:39 +0200 (Thu, 25 Jun 2009)

Log Message:
-----------
Overwriting this file with a single type of line ending to see if this will 
help when merging.

Modified Paths:
--------------
    
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object_force.c

Modified: 
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object_force.c
===================================================================
--- 
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object_force.c   
    2009-06-24 23:42:45 UTC (rev 21142)
+++ 
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object_force.c   
    2009-06-25 00:21:39 UTC (rev 21143)
@@ -1,55 +1,55 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * Contributor(s): Blender Foundation (2008), Thomas Dinges
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-
-#include "RNA_define.h"
-#include "RNA_types.h"
-
-#include "rna_internal.h"
-
-#include "DNA_object_types.h"
-#include "DNA_object_force.h"
-
-#include "WM_types.h"
-
-#ifdef RNA_RUNTIME
-
-#include "MEM_guardedalloc.h"
-
-#include "BKE_context.h"
-#include "BKE_pointcache.h"
-
-#include "BLI_blenlib.h"
-
-static void rna_Cache_toggle_disk_cache(bContext *C, PointerRNA *ptr)
-{
-       Object *ob = CTX_data_active_object(C);
-       PointCache *cache = (PointCache*)ptr->data;
-       PTCacheID *pid = NULL;
-       ListBase pidlist;
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * Contributor(s): Blender Foundation (2008), Thomas Dinges
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
 
+#include <stdlib.h>
+
+#include "RNA_define.h"
+#include "RNA_types.h"
+
+#include "rna_internal.h"
+
+#include "DNA_object_types.h"
+#include "DNA_object_force.h"
+
+#include "WM_types.h"
+
+#ifdef RNA_RUNTIME
+
+#include "MEM_guardedalloc.h"
+
+#include "BKE_context.h"
+#include "BKE_pointcache.h"
+
+#include "BLI_blenlib.h"
+
+static void rna_Cache_toggle_disk_cache(bContext *C, PointerRNA *ptr)
+{
+       Object *ob = CTX_data_active_object(C);
+       PointCache *cache = (PointCache*)ptr->data;
+       PTCacheID *pid = NULL;
+       ListBase pidlist;
+
        if(!ob)
                return;
 
@@ -58,28 +58,28 @@
        for(pid=pidlist.first; pid; pid=pid->next) {
                if(pid->cache==cache)
                        break;
-       }
-
-       if(pid)
-               BKE_ptcache_toggle_disk_cache(pid);
-
-       BLI_freelistN(&pidlist);
-}
-
-static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
-{
-       Object *ob = CTX_data_active_object(C);
-       PointCache *cache = (PointCache*)ptr->data;
-       PTCacheID *pid = NULL, *pid2;
-       ListBase pidlist;
-       int new_name = 1;
-       char name[80];
-
-       if(!ob)
-               return;
-
-       /* TODO: check for proper characters */
+       }
 
+       if(pid)
+               BKE_ptcache_toggle_disk_cache(pid);
+
+       BLI_freelistN(&pidlist);
+}
+
+static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
+{
+       Object *ob = CTX_data_active_object(C);
+       PointCache *cache = (PointCache*)ptr->data;
+       PTCacheID *pid = NULL, *pid2;
+       ListBase pidlist;
+       int new_name = 1;
+       char name[80];
+
+       if(!ob)
+               return;
+
+       /* TODO: check for proper characters */
+
        BKE_ptcache_ids_from_object(&pidlist, ob);
 
        for(pid=pidlist.first; pid; pid=pid->next) {
@@ -90,339 +90,339 @@
                        strcpy(cache->name, cache->prev_name);
                        new_name = 0;
                }
-       }
-
-       if(new_name) {
-               if(pid2 && cache->flag & PTCACHE_DISK_CACHE) {
+       }
+
+       if(new_name) {
+               if(pid2 && cache->flag & PTCACHE_DISK_CACHE) {
                        strcpy(name, cache->name);
-                       strcpy(cache->name, cache->prev_name);
-
-                       cache->flag &= ~PTCACHE_DISK_CACHE;
-
-                       BKE_ptcache_toggle_disk_cache(pid2);
-
-                       strcpy(cache->name, name);
-
-                       cache->flag |= PTCACHE_DISK_CACHE;
-
-                       BKE_ptcache_toggle_disk_cache(pid2);
-               }
-
-               strcpy(cache->prev_name, cache->name);
-       }
-
-       BLI_freelistN(&pidlist);
-}
-#else
-
-static void rna_def_pointcache(BlenderRNA *brna)
-{
-       StructRNA *srna;
-       PropertyRNA *prop;
-
-       srna= RNA_def_struct(brna, "PointCache", NULL);
-       RNA_def_struct_ui_text(srna, "Point Cache", "Point cache for physics 
simulations.");
-       
-       prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
-       RNA_def_property_int_sdna(prop, NULL, "startframe");
-       RNA_def_property_range(prop, 1, 300000);
-       RNA_def_property_ui_text(prop, "Start", "Frame on which the simulation 
starts.");
-       
-       prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
-       RNA_def_property_int_sdna(prop, NULL, "endframe");
-       RNA_def_property_range(prop, 1, 300000);
-       RNA_def_property_ui_text(prop, "End", "Frame on which the simulation 
stops.");
-
-       /* flags */
-       prop= RNA_def_property(srna, "baked", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_BAKED);
-
-       prop= RNA_def_property(srna, "baking", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_BAKING);
-
-       prop= RNA_def_property(srna, "disk_cache", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_DISK_CACHE);
-       RNA_def_property_ui_text(prop, "Disk Cache", "Save cache files to 
disk");
-       RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_toggle_disk_cache");
-
-       prop= RNA_def_property(srna, "outdated", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_OUTDATED);
-       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-       RNA_def_property_ui_text(prop, "Cache is outdated", "");
-
-       prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
-       RNA_def_property_string_sdna(prop, NULL, "name");
-       RNA_def_property_ui_text(prop, "Name", "Cache name");
-       RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
-
-       prop= RNA_def_property(srna, "autocache", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_AUTOCACHE);
-       RNA_def_property_ui_text(prop, "Auto Cache", "Cache changes 
automatically");
-       //RNA_def_property_update(prop, NC_OBJECT, 
"rna_Cache_toggle_autocache");
-
-       prop= RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
-       RNA_def_property_string_sdna(prop, NULL, "info");
-       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-       RNA_def_property_ui_text(prop, "Cache Info", "Info on current cache 
status.");
-
-}
-
-static void rna_def_collision(BlenderRNA *brna)
-{
-       StructRNA *srna;
-       PropertyRNA *prop;
-
-       srna= RNA_def_struct(brna, "CollisionSettings", NULL);
-       RNA_def_struct_sdna(srna, "PartDeflect");
-       RNA_def_struct_ui_text(srna, "Collision Settings", "Collision settings 
for object in physics simulation.");
-       
-       prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "deflect", 1);
-       RNA_def_property_ui_text(prop, "Enabled", "Enable this objects as a 
collider for physics systems");
-       
-       /* Particle Interaction */
-       
-       prop= RNA_def_property(srna, "damping_factor", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "pdef_damp");
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Damping Factor", "Amount of damping 
during particle collision");
-       
-       prop= RNA_def_property(srna, "random_damping", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "pdef_rdamp");
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Random Damping", "Random variation of 
damping");
-       
-       prop= RNA_def_property(srna, "friction_factor", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "pdef_frict");
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Friction Factor", "Amount of friction 
during particle collision");
-       
-       prop= RNA_def_property(srna, "random_friction", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "pdef_rfrict");
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Random Friction", "Random variation of 
friction");
-               
-       prop= RNA_def_property(srna, "permeability", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "pdef_perm");
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Permeability", "Chance that the 
particle will pass through the mesh");
-       
-       prop= RNA_def_property(srna, "kill_particles", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", PDEFLE_KILL_PART);
-       RNA_def_property_ui_text(prop, "Kill Particles", "Kill collided 
particles");
-       
-       /* Soft Body and Cloth Interaction */
-       
-       prop= RNA_def_property(srna, "inner_thickness", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "pdef_sbift");
-       RNA_def_property_range(prop, 0.001f, 1.0f);
-       RNA_def_property_ui_text(prop, "Inner Thickness", "Inner face 
thickness");
-       
-       prop= RNA_def_property(srna, "outer_thickness", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "pdef_sboft");
-       RNA_def_property_range(prop, 0.001f, 1.0f);
-       RNA_def_property_ui_text(prop, "Outer Thickness", "Outer face 
thickness");
-       
-       prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "pdef_sbdamp");
-       RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Damping", "Amount of damping during 
collision");
-       
-       /* Does this belong here?
-       prop= RNA_def_property(srna, "collision_stack", PROP_BOOLEAN, 
PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "softflag", OB_SB_COLLFINAL);

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to