[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21200] branches/itasc: svn merge -r 21181 :21196 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/ blender

Benoit Bolsee benoit.bolsee at online.be
Sat Jun 27 19:14:14 CEST 2009


Revision: 21200
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21200
Author:   ben2610
Date:     2009-06-27 19:14:14 +0200 (Sat, 27 Jun 2009)

Log Message:
-----------
svn merge -r 21181:21196 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender

Modified Paths:
--------------
    branches/itasc/release/ui/buttons_object_constraint.py
    branches/itasc/release/ui/buttons_particle.py
    branches/itasc/release/ui/buttons_physic_cloth.py
    branches/itasc/source/blender/blenkernel/BKE_cloth.h
    branches/itasc/source/blender/blenkernel/BKE_particle.h
    branches/itasc/source/blender/blenkernel/BKE_pointcache.h
    branches/itasc/source/blender/blenkernel/intern/cloth.c
    branches/itasc/source/blender/blenkernel/intern/depsgraph.c
    branches/itasc/source/blender/blenkernel/intern/implicit.c
    branches/itasc/source/blender/blenkernel/intern/modifier.c
    branches/itasc/source/blender/blenkernel/intern/particle.c
    branches/itasc/source/blender/blenkernel/intern/particle_system.c
    branches/itasc/source/blender/blenkernel/intern/pointcache.c
    branches/itasc/source/blender/blenloader/intern/readfile.c
    branches/itasc/source/blender/blenloader/intern/writefile.c
    branches/itasc/source/blender/editors/interface/interface.c
    branches/itasc/source/blender/editors/interface/interface_panel.c
    branches/itasc/source/blender/editors/mesh/editmesh_add.c
    branches/itasc/source/blender/editors/object/object_edit.c
    branches/itasc/source/blender/editors/physics/ed_pointcache.c
    branches/itasc/source/blender/editors/space_buttons/buttons_header.c
    branches/itasc/source/blender/editors/space_buttons/buttons_intern.h
    branches/itasc/source/blender/editors/space_buttons/buttons_ops.c
    branches/itasc/source/blender/editors/space_buttons/space_buttons.c
    branches/itasc/source/blender/editors/space_view3d/view3d_toolbar.c
    branches/itasc/source/blender/editors/transform/transform_conversions.c
    branches/itasc/source/blender/makesdna/DNA_object_force.h
    branches/itasc/source/blender/makesrna/intern/rna_cloth.c
    branches/itasc/source/blender/makesrna/intern/rna_object.c
    branches/itasc/source/blender/makesrna/intern/rna_object_force.c
    branches/itasc/source/blender/makesrna/intern/rna_particle.c
    branches/itasc/source/blender/render/intern/source/pipeline.c
    branches/itasc/source/blender/windowmanager/intern/wm_event_system.c
    branches/itasc/source/blender/windowmanager/intern/wm_files.c

Modified: branches/itasc/release/ui/buttons_object_constraint.py
===================================================================
--- branches/itasc/release/ui/buttons_object_constraint.py	2009-06-27 17:10:19 UTC (rev 21199)
+++ branches/itasc/release/ui/buttons_object_constraint.py	2009-06-27 17:14:14 UTC (rev 21200)
@@ -529,20 +529,20 @@
 class BONE_PT_constraints(ConstraintButtonsPanel):
 	__idname__ = "BONE_PT_constraints"
 	__label__ = "Bone Constraints"
-	__context__ = "constraint"
+	__context__ = "bone"
 
 	def poll(self, context):
 		ob = context.object
-		return (ob and ob.type == "ARMATURE")
+		return (ob and ob.type == "ARMATURE" and context.bone)
 		
 	def draw(self, context):
 		ob = context.object
-		pchan = ob.pose.pose_channels[0] # XXX
+		pchan = ob.pose.pose_channels[context.bone.name]
 		layout = self.layout
 
-		#row = layout.row()
-		#row.item_menu_enumO("BONE_OT_constraint_add", "type")
-		#row.itemL();
+		row = layout.row()
+		row.item_menu_enumO("OBJECT_OT_constraint_add", "type")
+		row.itemL();
 
 		for con in pchan.constraints:
 			self.draw_constraint(con)

Modified: branches/itasc/release/ui/buttons_particle.py
===================================================================
--- branches/itasc/release/ui/buttons_particle.py	2009-06-27 17:10:19 UTC (rev 21199)
+++ branches/itasc/release/ui/buttons_particle.py	2009-06-27 17:14:14 UTC (rev 21200)
@@ -7,6 +7,7 @@
 def particle_panel_poll(context):
 	psys = context.particle_system
 	if psys==None:	return False
+	if psys.settings==None:  return False
 	return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
 
 class ParticleButtonsPanel(bpy.types.Panel):
@@ -29,42 +30,51 @@
 		ob = context.object
 		psys = context.particle_system
 
-		split = layout.split(percentage=0.65)
+		if ob:
+			row = layout.row()
 
-		if psys:
-			split.template_ID(psys, "settings")
+			row.template_list(ob, "particle_systems", "active_particle_system_index")
 
+			col = row.column(align=True)
+			col.itemO("OBJECT_OT_particle_system_slot_add", icon="ICON_ZOOMIN", text="")
+			col.itemO("OBJECT_OT_particle_system_slot_remove", icon="ICON_ZOOMOUT", text="")
+
 		if psys:
+			split = layout.split(percentage=0.65)
+			
+			split.template_ID(psys, "settings", new="PARTICLE_OT_new")
+			
 			#row = layout.row()
 			#row.itemL(text="Viewport")
 			#row.itemL(text="Render")
 			
 			part = psys.settings
-			ptype = psys.settings.type
 			
-			if ptype not in ('EMITTER', 'REACTOR', 'HAIR'):
-				layout.itemL(text="No settings for fluid particles")
-				return
+			if part:
+				ptype = psys.settings.type
+				if ptype not in ('EMITTER', 'REACTOR', 'HAIR'):
+					layout.itemL(text="No settings for fluid particles")
+					return
+					
+				split = layout.split(percentage=0.65)
 				
-			split = layout.split(percentage=0.65)
-			
-			split.enabled = particle_panel_enabled(psys)
-			split.itemR(part, "type")
-			split.itemR(psys, "seed")
-			
-			split = layout.split(percentage=0.65)
-			if part.type=='HAIR':
-				if psys.editable==True:
-					split.itemO("PARTICLE_OT_editable_set", text="Free Edit")
-				else:
-					split.itemO("PARTICLE_OT_editable_set", text="Make Editable")
-				row = split.row()
-				row.enabled = particle_panel_enabled(psys)
-				row.itemR(part, "hair_step")
-			elif part.type=='REACTOR':
 				split.enabled = particle_panel_enabled(psys)
-				split.itemR(psys, "reactor_target_object")
-				split.itemR(psys, "reactor_target_particle_system", text="Particle System")
+				split.itemR(part, "type")
+				split.itemR(psys, "seed")
+				
+				split = layout.split(percentage=0.65)
+				if part.type=='HAIR':
+					if psys.editable==True:
+						split.itemO("PARTICLE_OT_editable_set", text="Free Edit")
+					else:
+						split.itemO("PARTICLE_OT_editable_set", text="Make Editable")
+					row = split.row()
+					row.enabled = particle_panel_enabled(psys)
+					row.itemR(part, "hair_step")
+				elif part.type=='REACTOR':
+					split.enabled = particle_panel_enabled(psys)
+					split.itemR(psys, "reactor_target_object")
+					split.itemR(psys, "reactor_target_particle_system", text="Particle System")
 		
 class PARTICLE_PT_emission(ParticleButtonsPanel):
 	__idname__= "PARTICLE_PT_emission"
@@ -120,6 +130,7 @@
 	def poll(self, context):
 		psys = context.particle_system
 		if psys==None:	return False
+		if psys.settings==None:  return False
 		return psys.settings.type in ('EMITTER', 'REACTOR')
 
 	def draw(self, context):
@@ -130,11 +141,7 @@
 		cache = psys.point_cache
 		
 		row = layout.row()
-		row.itemR(cache, "name", text="")
-		if cache.outdated:
-			row.itemL(text="Cache is outdated.")
-		else:
-			row.itemL(text="")
+		row.itemR(cache, "name")
 		
 		row = layout.row()
 		
@@ -142,19 +149,30 @@
 			row.itemO("PTCACHE_OT_free_bake_particle_system", text="Free Bake")
 		else:
 			row.item_booleanO("PTCACHE_OT_cache_particle_system", "bake", True, text="Bake")
-			
+		
+		subrow = row.row()
+		subrow.enabled = (cache.frames_skipped or cache.outdated) and particle_panel_enabled(psys)
+		subrow.itemO("PTCACHE_OT_cache_particle_system", text="Calculate to Current Frame")
+		
 		row = layout.row()
 		row.enabled = particle_panel_enabled(psys)
 		row.itemO("PTCACHE_OT_bake_from_particles_cache", text="Current Cache to Bake")
-		if cache.autocache == 0:
-			row.itemO("PTCACHE_OT_cache_particle_system", text="Cache to Current Frame")
+		row.itemR(cache, "step");
 	
 		row = layout.row()
 		row.enabled = particle_panel_enabled(psys)
-		#row.itemR(cache, "autocache")
+		row.itemR(cache, "quick_cache")
 		row.itemR(cache, "disk_cache")
-		row.itemL(text=cache.info)
 		
+		layout.itemL(text=cache.info)
+		
+		layout.itemS()
+		
+		row = layout.row()
+		row.item_booleanO("PTCACHE_OT_bake_all", "bake", True, text="Bake All Dynamics")
+		row.itemO("PTCACHE_OT_free_bake_all", text="Free All Bakes")
+		layout.itemO("PTCACHE_OT_bake_all", text="Update All Dynamics to current frame")
+		
 		# for particles these are figured out automatically
 		#row.itemR(cache, "start_frame")
 		#row.itemR(cache, "end_frame")
@@ -280,7 +298,10 @@
 	__label__ = "Render"
 	
 	def poll(self, context):
-		return (context.particle_system != None)
+		psys = context.particle_system
+		if psys==None: return False
+		if psys.settings==None: return False
+		return True;
 		
 	def draw(self, context):
 		layout = self.layout
@@ -414,7 +435,10 @@
 	__default_closed__ = True
 	
 	def poll(self, context):
-		return (context.particle_system != None)
+		psys = context.particle_system
+		if psys==None: return False
+		if psys.settings==None: return False
+		return True;
 	
 	def draw(self, context):
 		layout = self.layout

Modified: branches/itasc/release/ui/buttons_physic_cloth.py
===================================================================
--- branches/itasc/release/ui/buttons_physic_cloth.py	2009-06-27 17:10:19 UTC (rev 21199)
+++ branches/itasc/release/ui/buttons_physic_cloth.py	2009-06-27 17:14:14 UTC (rev 21200)
@@ -43,7 +43,54 @@
 			col.itemR(cloth, "goal_spring", text="Stiffness")
 			col.itemR(cloth, "goal_friction", text="Friction")
 		"""
+
+class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
+	__idname__= "PHYSICS_PT_cloth_cache"
+	__label__ = "Cache"
+	__default_closed__ = True
+
+	def draw(self, context):
+		layout = self.layout
+
+		cache = context.cloth.point_cache
+		
+		row = layout.row()
+		row.itemR(cache, "name")
+		
+		row = layout.row()
+		row.itemR(cache, "start_frame")
+		row.itemR(cache, "end_frame")
+		
+		row = layout.row()
+		
+		if cache.baked == True:
+			row.itemO("PTCACHE_OT_free_bake_cloth", text="Free Bake")
+		else:
+			row.item_booleanO("PTCACHE_OT_cache_cloth", "bake", True, text="Bake")
+		
+		subrow = row.row()
+		subrow.enabled = cache.frames_skipped or cache.outdated
+		subrow.itemO("PTCACHE_OT_cache_cloth", text="Calculate to Current Frame")
+			
+		row = layout.row()
+		#row.enabled = particle_panel_enabled(psys)
+		row.itemO("PTCACHE_OT_bake_from_cloth_cache", text="Current Cache to Bake")
+		row.itemR(cache, "step");
 	
+		row = layout.row()
+		#row.enabled = particle_panel_enabled(psys)
+		row.itemR(cache, "quick_cache")
+		row.itemR(cache, "disk_cache")
+		
+		layout.itemL(text=cache.info)
+		
+		layout.itemS()
+		
+		row = layout.row()
+		row.itemO("PTCACHE_OT_bake_all", "bake", True, text="Bake All Dynamics")
+		row.itemO("PTCACHE_OT_free_bake_all", text="Free All Bakes")
+		layout.itemO("PTCACHE_OT_bake_all", text="Update All Dynamics to current frame")
+		
 class Physic_PT_cloth_collision(PhysicButtonsPanel):
 	__idname__ = "Physic_PT_clothcollision"
 	__label__ = "Cloth Collision"
@@ -102,5 +149,6 @@
 		sub.itemR(cloth, "bending_stiffness_max", text="Max")
 		
 bpy.types.register(Physic_PT_cloth)
+bpy.types.register(PHYSICS_PT_cloth_cache)
 bpy.types.register(Physic_PT_cloth_collision)
 bpy.types.register(Physic_PT_cloth_stiffness)

Modified: branches/itasc/source/blender/blenkernel/BKE_cloth.h
===================================================================
--- branches/itasc/source/blender/blenkernel/BKE_cloth.h	2009-06-27 17:10:19 UTC (rev 21199)
+++ branches/itasc/source/blender/blenkernel/BKE_cloth.h	2009-06-27 17:14:14 UTC (rev 21200)
@@ -46,6 +46,7 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_modifier_types.h"
 #include "DNA_object_types.h"
+#include "DNA_scene_types.h"
 
 #include "BKE_collision.h"
 
@@ -245,8 +246,8 @@
 void bvhselftree_update_from_cloth ( ClothModifierData *clmd, int moving );
 
 // needed for editmesh.c
-void cloth_write_cache ( Object *ob, ClothModifierData *clmd, float framenr );
-int cloth_read_cache ( Object *ob, ClothModifierData *clmd, float framenr );
+void cloth_write_cache( Object *ob, ClothModifierData *clmd, int framenr );
+int cloth_read_cache( Scene *scene, Object *ob, ClothModifierData *clmd, float framenr, int *old_framenr );
 
 // needed for button_object.c
 void cloth_clear_cache ( Object *ob, ClothModifierData *clmd, float framenr );

Modified: branches/itasc/source/blender/blenkernel/BKE_particle.h
===================================================================
--- branches/itasc/source/blender/blenkernel/BKE_particle.h	2009-06-27 17:10:19 UTC (rev 21199)
+++ branches/itasc/source/blender/blenkernel/BKE_particle.h	2009-06-27 17:14:14 UTC (rev 21200)
@@ -217,6 +217,7 @@
 
 struct ParticleSystem *psys_get_current(struct Object *ob);
 short psys_get_current_num(struct Object *ob);
+void psys_set_current_num(Object *ob, int index);
 struct Object *psys_find_object(struct Scene *scene, struct ParticleSystem *psys);

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list