rna naming, *_frame --> frame_*
[blender-staging.git] / release / scripts / ui / properties_physics_common.py
index ef82707bfaa46267abccfa2ce0632539b88e0d78..372509773ef68cb388f87d18127bab5e9d370841 100644 (file)
@@ -12,7 +12,7 @@
 #
 #  You should have received a copy of the GNU General Public License
 #  along with this program; if not, write to the Free Software Foundation,
 #
 #  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.
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # ##### END GPL LICENSE BLOCK #####
 
 #
 # ##### END GPL LICENSE BLOCK #####
 
@@ -30,8 +30,8 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke):
     row = layout.row()
     row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2)
     col = row.column(align=True)
     row = layout.row()
     row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2)
     col = row.column(align=True)
-    col.operator("ptcache.add_new", icon='ICON_ZOOMIN', text="")
-    col.operator("ptcache.remove", icon='ICON_ZOOMOUT', text="")
+    col.operator("ptcache.add", icon='ZOOMIN', text="")
+    col.operator("ptcache.remove", icon='ZOOMOUT', text="")
 
     row = layout.row()
     row.label(text="File Name:")
 
     row = layout.row()
     row.label(text="File Name:")
@@ -53,19 +53,19 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke):
         if not particles:
             row = layout.row()
             row.enabled = enabled
         if not particles:
             row = layout.row()
             row.enabled = enabled
-            row.prop(cache, "start_frame")
-            row.prop(cache, "end_frame")
+            row.prop(cache, "frame_start")
+            row.prop(cache, "frame_end")
 
         row = layout.row()
 
         if cache.baked == True:
             row.operator("ptcache.free_bake", text="Free Bake")
         else:
 
         row = layout.row()
 
         if cache.baked == True:
             row.operator("ptcache.free_bake", text="Free Bake")
         else:
-            row.operator_boolean("ptcache.bake", "bake", True, text="Bake")
+            row.operator("ptcache.bake", text="Bake").bake = True
 
         sub = row.row()
         sub.enabled = (cache.frames_skipped or cache.outdated) and enabled
 
         sub = row.row()
         sub.enabled = (cache.frames_skipped or cache.outdated) and enabled
-        sub.operator("ptcache.bake", "bake", False, text="Calculate to Current Frame")
+        sub.operator("ptcache.bake", text="Calculate to Current Frame").bake = False
 
         row = layout.row()
         row.enabled = enabled
 
         row = layout.row()
         row.enabled = enabled
@@ -85,9 +85,9 @@ def point_cache_ui(self, context, cache, enabled, particles, smoke):
         layout.separator()
 
         row = layout.row()
         layout.separator()
 
         row = layout.row()
-        row.operator_boolean("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
+        row.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True
         row.operator("ptcache.free_bake_all", text="Free All Bakes")
         row.operator("ptcache.free_bake_all", text="Free All Bakes")
-        layout.operator("ptcache.bake_all", "bake", False, text="Update All Dynamics to current frame")
+        layout.operator("ptcache.bake_all", text="Update All Dynamics to current frame").bake = False
 
 
 def effector_weights_ui(self, context, weights):
 
 
 def effector_weights_ui(self, context, weights):
@@ -150,6 +150,7 @@ def basic_force_field_settings_ui(self, context, field):
         col.prop(field, "flow")
     elif field.type == 'HARMONIC':
         col.prop(field, "harmonic_damping", text="Damping")
         col.prop(field, "flow")
     elif field.type == 'HARMONIC':
         col.prop(field, "harmonic_damping", text="Damping")
+        col.prop(field, "rest_length")
     elif field.type == 'VORTEX' and field.shape != 'POINT':
         col.prop(field, "inflow")
     elif field.type == 'DRAG':
     elif field.type == 'VORTEX' and field.shape != 'POINT':
         col.prop(field, "inflow")
     elif field.type == 'DRAG':
@@ -163,6 +164,8 @@ def basic_force_field_settings_ui(self, context, field):
     col.prop(field, "seed")
     if field.type == 'TURBULENCE':
         col.prop(field, "global_coordinates", text="Global")
     col.prop(field, "seed")
     if field.type == 'TURBULENCE':
         col.prop(field, "global_coordinates", text="Global")
+    elif field.type == 'HARMONIC':
+        col.prop(field, "multiple_springs")
 
     split = layout.split()
 
 
     split = layout.split()
 
@@ -207,3 +210,14 @@ def basic_force_field_falloff_ui(self, context, field):
     sub = col.column()
     sub.active = field.use_max_distance
     sub.prop(field, "maximum_distance", text="Distance")
     sub = col.column()
     sub.active = field.use_max_distance
     sub.prop(field, "maximum_distance", text="Distance")
+
+
+def register():
+    pass
+
+
+def unregister():
+    pass
+
+if __name__ == "__main__":
+    register()