[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40198] branches/soc-2011-radish: svn merge -r40195:40197 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Campbell Barton ideasman42 at gmail.com
Wed Sep 14 03:54:07 CEST 2011


Revision: 40198
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40198
Author:   campbellbarton
Date:     2011-09-14 01:54:04 +0000 (Wed, 14 Sep 2011)
Log Message:
-----------
svn merge -r40195:40197 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40195

Modified Paths:
--------------
    branches/soc-2011-radish/source/blender/blenkernel/BKE_object.h
    branches/soc-2011-radish/source/blender/blenkernel/intern/object.c
    branches/soc-2011-radish/source/blender/editors/armature/editarmature.c
    branches/soc-2011-radish/source/blender/editors/armature/poseSlide.c
    branches/soc-2011-radish/source/blender/editors/armature/poselib.c
    branches/soc-2011-radish/source/blender/editors/armature/poseobject.c
    branches/soc-2011-radish/source/blender/editors/include/ED_armature.h
    branches/soc-2011-radish/source/blender/editors/interface/interface_widgets.c
    branches/soc-2011-radish/source/blender/editors/object/object_constraint.c
    branches/soc-2011-radish/source/blender/editors/screen/screen_context.c
    branches/soc-2011-radish/source/blender/editors/screen/screen_ops.c
    branches/soc-2011-radish/source/blenderplayer/bad_level_call_stubs/stubs.c

Property Changed:
----------------
    branches/soc-2011-radish/
    branches/soc-2011-radish/intern/audaspace/OpenAL/
    branches/soc-2011-radish/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-radish
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:40001-40195
   + /trunk/blender:40001-40197


Property changes on: branches/soc-2011-radish/intern/audaspace/OpenAL
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-pepper/intern/audaspace/OpenAL:38630
/trunk/blender/intern/audaspace/OpenAL:36835-38822,39182-40195
/trunk/intern/audaspace/OpenAL:39258-39296
   + /branches/soc-2011-pepper/intern/audaspace/OpenAL:38630
/trunk/blender/intern/audaspace/OpenAL:36835-38822,39182-40197
/trunk/intern/audaspace/OpenAL:39258-39296

Modified: branches/soc-2011-radish/source/blender/blenkernel/BKE_object.h
===================================================================
--- branches/soc-2011-radish/source/blender/blenkernel/BKE_object.h	2011-09-14 01:48:55 UTC (rev 40197)
+++ branches/soc-2011-radish/source/blender/blenkernel/BKE_object.h	2011-09-14 01:54:04 UTC (rev 40198)
@@ -108,6 +108,7 @@
 void object_apply_mat4(struct Object *ob, float mat[][4], const short use_compat, const short use_parent);
 
 void set_no_parent_ipo(int val);
+struct Object *object_pose_armature_get(struct Object *ob);
 
 void where_is_object_time(struct Scene *scene, struct Object *ob, float ctime);
 void where_is_object(struct Scene *scene, struct Object *ob);

Modified: branches/soc-2011-radish/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/soc-2011-radish/source/blender/blenkernel/intern/object.c	2011-09-14 01:48:55 UTC (rev 40197)
+++ branches/soc-2011-radish/source/blender/blenkernel/intern/object.c	2011-09-14 01:54:04 UTC (rev 40198)
@@ -1310,6 +1310,37 @@
 	}
 }
 
+static int object_pose_context(Object *ob)
+{
+	if(	(ob) &&
+		(ob->type == OB_ARMATURE) &&
+		(ob->pose) &&
+		(ob->mode & OB_MODE_POSE)
+	) {
+		return 1;
+	}
+	else {
+		return 0;
+	}
+}
+
+//Object *object_pose_armature_get(Object *ob)
+Object *object_pose_armature_get(struct Object *ob)
+{
+	if(ob==NULL)
+		return NULL;
+
+	if(object_pose_context(ob))
+		return ob;
+
+	ob= modifiers_isDeformedByArmature(ob);
+
+	if(object_pose_context(ob))
+		return ob;
+
+	return NULL;
+}
+
 static void copy_object_transform(Object *ob_tar, Object *ob_src)
 {
 	copy_v3_v3(ob_tar->loc, ob_src->loc);

Modified: branches/soc-2011-radish/source/blender/editors/armature/editarmature.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/armature/editarmature.c	2011-09-14 01:48:55 UTC (rev 40197)
+++ branches/soc-2011-radish/source/blender/editors/armature/editarmature.c	2011-09-14 01:54:04 UTC (rev 40198)
@@ -643,7 +643,7 @@
 static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
 {
 	Scene *scene= CTX_data_scene(C);
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C)); // must be active object, not edit-object
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
 	bArmature *arm= get_armature(ob);
 	bPose *pose;
 	bPoseChannel *pchan;
@@ -745,7 +745,7 @@
 /* set the current pose as the restpose */
 static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op))
 {
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C)); // must be active object, not edit-object
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
 
 	/* don't check if editmode (should be done by caller) */
 	if (ob->type!=OB_ARMATURE)
@@ -4927,7 +4927,7 @@
 		void (*clear_func)(bPoseChannel*), const char default_ksName[])
 {
 	Scene *scene= CTX_data_scene(C);
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	short autokey = 0;
 	
 	/* sanity checks */
@@ -5163,7 +5163,7 @@
 
 static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op))
 {
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	bPoseChannel *pchan,*parent;
 
 	/*	Determine if there is an active bone */
@@ -5239,7 +5239,7 @@
 /* active object is armature in posemode, poll checked */
 static int pose_hide_exec(bContext *C, wmOperator *op) 
 {
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	bArmature *arm= ob->data;
 
 	if(RNA_boolean_get(op->ptr, "unselected"))
@@ -5288,7 +5288,7 @@
 /* active object is armature in posemode, poll checked */
 static int pose_reveal_exec(bContext *C, wmOperator *UNUSED(op)) 
 {
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	bArmature *arm= ob->data;
 	
 	bone_looper(ob, arm->bonebase.first, NULL, show_pose_bone_cb);

Modified: branches/soc-2011-radish/source/blender/editors/armature/poseSlide.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/armature/poseSlide.c	2011-09-14 01:48:55 UTC (rev 40197)
+++ branches/soc-2011-radish/source/blender/editors/armature/poseSlide.c	2011-09-14 01:54:04 UTC (rev 40198)
@@ -51,6 +51,7 @@
 #include "BKE_fcurve.h"
 
 #include "BKE_context.h"
+#include "BKE_object.h"
 #include "BKE_report.h"
 
 #include "RNA_access.h"
@@ -129,7 +130,7 @@
 	
 	/* get info from context */
 	pso->scene= CTX_data_scene(C);
-	pso->ob= ED_object_pose_armature(CTX_data_active_object(C));
+	pso->ob= object_pose_armature_get(CTX_data_active_object(C));
 	pso->arm= (pso->ob)? pso->ob->data : NULL;
 	pso->sa= CTX_wm_area(C); /* only really needed when doing modal() */
 	pso->ar= CTX_wm_region(C); /* only really needed when doing modal() */
@@ -1164,7 +1165,7 @@
 static int pose_propagate_exec (bContext *C, wmOperator *op)
 {
 	Scene *scene = CTX_data_scene(C);
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	bAction *act= (ob && ob->adt)? ob->adt->action : NULL;
 	
 	ListBase pflinks = {NULL, NULL};

Modified: branches/soc-2011-radish/source/blender/editors/armature/poselib.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/armature/poselib.c	2011-09-14 01:48:55 UTC (rev 40197)
+++ branches/soc-2011-radish/source/blender/editors/armature/poselib.c	2011-09-14 01:54:04 UTC (rev 40198)
@@ -54,6 +54,7 @@
 #include "BKE_depsgraph.h"
 #include "BKE_idprop.h"
 #include "BKE_library.h"
+#include "BKE_object.h"
 
 #include "BKE_context.h"
 #include "BKE_report.h"
@@ -170,7 +171,7 @@
 	if (sa && (sa->spacetype == SPACE_BUTS)) 
 		return CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
 	else
-		return ED_object_pose_armature(CTX_data_active_object(C));
+		return object_pose_armature_get(CTX_data_active_object(C));
 }
 
 /* Poll callback for operators that require existing PoseLib data (with poses) to work */
@@ -632,7 +633,7 @@
 
 static int poselib_rename_exec (bContext *C, wmOperator *op)
 {
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	bAction *act= (ob) ? ob->poselib : NULL;
 	TimeMarker *marker;
 	char newname[64];

Modified: branches/soc-2011-radish/source/blender/editors/armature/poseobject.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/armature/poseobject.c	2011-09-14 01:48:55 UTC (rev 40197)
+++ branches/soc-2011-radish/source/blender/editors/armature/poseobject.c	2011-09-14 01:54:04 UTC (rev 40198)
@@ -58,6 +58,7 @@
 #include "BKE_depsgraph.h"
 #include "BKE_fcurve.h"
 #include "BKE_modifier.h"
+#include "BKE_object.h"
 #include "BKE_report.h"
 
 
@@ -78,36 +79,6 @@
 
 #include "armature_intern.h"
 
-static int object_pose_context(Object *ob)
-{
-	if(	(ob) && 
-		(ob->type == OB_ARMATURE) &&
-		(ob->pose) &&
-		(ob->mode & OB_MODE_POSE)
-	) {
-		return 1;
-	}
-	else {
-		return 0;
-	}
-}
-
-Object *ED_object_pose_armature(Object *ob)
-{
-	if(ob==NULL)
-		return NULL;
-	
-	if(object_pose_context(ob))
-		return ob;
-
-	ob= modifiers_isDeformedByArmature(ob);
-
-	if(object_pose_context(ob))
-		return ob;
-
-	return NULL;
-}
-
 /* This function is used to process the necessary updates for */
 void ED_armature_enter_posemode(bContext *C, Base *base)
 {
@@ -238,7 +209,7 @@
 	if (sa->spacetype == SPACE_BUTS) 
 		ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
 	else
-		ob= ED_object_pose_armature(CTX_data_active_object(C));
+		ob= object_pose_armature_get(CTX_data_active_object(C));
 		
 	if (ELEM(NULL, ob, ob->pose))
 		return OPERATOR_CANCELLED;
@@ -314,7 +285,7 @@
 	if (sa->spacetype == SPACE_BUTS) 
 		ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
 	else
-		ob= ED_object_pose_armature(CTX_data_active_object(C));
+		ob= object_pose_armature_get(CTX_data_active_object(C));
 		
 	/* only continue if there's an object */
 	if ELEM(NULL, ob, ob->pose)
@@ -348,7 +319,7 @@
 
 static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op))
 {
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	bConstraint *con;
 	int found= 0;
 	
@@ -408,7 +379,7 @@
 
 static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
 {
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	bArmature *arm= ob->data;
 	Bone *curbone, *pabone, *chbone;
 	int direction = RNA_enum_get(op->ptr, "direction");
@@ -646,7 +617,7 @@
 
 static int pose_select_grouped_exec (bContext *C, wmOperator *op)
 {
-	Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+	Object *ob= object_pose_armature_get(CTX_data_active_object(C));
 	short extend= RNA_boolean_get(op->ptr, "extend");
 	short changed = 0;
 	
@@ -713,7 +684,7 @@
 static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op))
 {
 	Object *ob_act= CTX_data_active_object(C);
-	Object *ob= ED_object_pose_armature(ob_act);
+	Object *ob= object_pose_armature_get(ob_act);
 
 	if(ob && (ob->mode & OB_MODE_POSE)) {
 		bArmature *arm= ob->data;
@@ -1135,7 +1106,7 @@
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list