[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33743] trunk/blender/source/blender: no functional change: only check against OB_RECALC_ALL but don' t use for assignment.

Campbell Barton ideasman42 at gmail.com
Fri Dec 17 16:51:43 CET 2010


Revision: 33743
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33743
Author:   campbellbarton
Date:     2010-12-17 16:51:42 +0100 (Fri, 17 Dec 2010)

Log Message:
-----------
no functional change: only check against OB_RECALC_ALL but don't use for assignment.

Makes adding new flags give ambiguous results and also makes it less easy to tell whats intended.
In some places it looks like OB_RECALC_TIME should be left out too.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/exotic.c
    trunk/blender/source/blender/blenkernel/intern/library.c
    trunk/blender/source/blender/blenkernel/intern/object.c
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/collada/DocumentImporter.cpp
    trunk/blender/source/blender/editors/animation/anim_deps.c
    trunk/blender/source/blender/editors/animation/keyingsets.c
    trunk/blender/source/blender/editors/object/object_add.c
    trunk/blender/source/blender/editors/object/object_edit.c
    trunk/blender/source/blender/editors/object/object_relations.c
    trunk/blender/source/blender/editors/transform/transform_conversions.c
    trunk/blender/source/blender/editors/transform/transform_snap.c
    trunk/blender/source/blender/makesdna/DNA_object_types.h
    trunk/blender/source/blender/makesrna/intern/rna_access.c
    trunk/blender/source/blender/makesrna/intern/rna_object_force.c
    trunk/blender/source/blender/makesrna/intern/rna_scene.c

Modified: trunk/blender/source/blender/blenkernel/intern/exotic.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/exotic.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/blenkernel/intern/exotic.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -2376,7 +2376,7 @@
 	
 						ob->dupon= 1; ob->dupoff= 0;
 						ob->dupsta= 1; ob->dupend= 100;
-						ob->recalc= OB_RECALC_ALL;	/* needed because of weird way of adding libdata directly */
+						ob->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;	/* needed because of weird way of adding libdata directly */
 						
 						ob->data= obdata;
 						((ID*)ob->data)->us++;

Modified: trunk/blender/source/blender/blenkernel/intern/library.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/library.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/blenkernel/intern/library.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -450,7 +450,7 @@
 	/* flag for full recalc */
 	for(ob=main->object.first; ob; ob=ob->id.next)
 		if(ob->id.lib)
-			ob->recalc |= OB_RECALC_ALL;
+			ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 }
 
 /* note: MAX_LIBARRAY define should match this code */

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/blenkernel/intern/object.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -316,7 +316,7 @@
 
 	if (*obpoin==unlinkOb) {
 		*obpoin = NULL;
-		ob->recalc |= OB_RECALC_ALL; // XXX: should this just be OB_RECALC_DATA?
+		ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; // XXX: should this just be OB_RECALC_DATA?
 	}
 }
 
@@ -357,7 +357,7 @@
 		
 		if(obt->parent==ob) {
 			obt->parent= NULL;
-			obt->recalc |= OB_RECALC_ALL;
+			obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 		}
 		
 		modifiers_foreachObjectLink(obt, unlink_object__unlinkModifierLinks, ob);
@@ -367,15 +367,15 @@
 
 			if(cu->bevobj==ob) {
 				cu->bevobj= NULL;
-				obt->recalc |= OB_RECALC_ALL;
+				obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 			}
 			if(cu->taperobj==ob) {
 				cu->taperobj= NULL;
-				obt->recalc |= OB_RECALC_ALL;
+				obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 			}
 			if(cu->textoncurve==ob) {
 				cu->textoncurve= NULL;
-				obt->recalc |= OB_RECALC_ALL;
+				obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 			}
 		}
 		else if(obt->type==OB_ARMATURE && obt->pose) {
@@ -1078,7 +1078,7 @@
 	
 	base= scene_add_base(scene, ob);
 	scene_select_base(scene, base);
-	ob->recalc |= OB_RECALC_ALL;
+	ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 
 	return ob;
 }
@@ -1538,7 +1538,7 @@
 	ob->proxy_group= gob;
 	id_lib_extern(&target->id);
 	
-	ob->recalc= target->recalc= OB_RECALC_ALL;
+	ob->recalc= target->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 	
 	/* copy transform
 	 * - gob means this proxy comes from a group, just apply the matrix

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -2248,7 +2248,7 @@
 	}
 	
 	if(rebuild) {
-		ob->recalc= OB_RECALC_ALL;
+		ob->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 		pose->flag |= POSE_RECALC;
 	}
 }
@@ -3505,7 +3505,7 @@
 					/* this triggers object_update to always use a copy */
 					ob->proxy->proxy_from= ob;
 					/* force proxy updates after load/undo, a bit weak */
-					ob->recalc= ob->proxy->recalc= OB_RECALC_ALL;
+					ob->recalc= ob->proxy->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 				}
 			}
 			ob->proxy_group= newlibadr(fd, ob->id.lib, ob->proxy_group);
@@ -7955,7 +7955,7 @@
 			if(ob->type==OB_ARMATURE) {
 				if(ob->pose)
 					ob->pose->flag |= POSE_RECALC;
-				ob->recalc |= OB_RECALC_ALL;	// cannot call stuff now (pointers!), done in setup_app_data
+				ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;	// cannot call stuff now (pointers!), done in setup_app_data
 
 				/* new generic xray option */
 				arm= newlibadr(fd, lib, ob->data);
@@ -12351,7 +12351,7 @@
 			base= scene_add_base(scene, ob);
 			base->flag |= SELECT;
 			base->object->flag= base->flag;
-			ob->recalc |= OB_RECALC_ALL;
+			ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 			scene->basact= base;
 
 			/* assign the group */

Modified: trunk/blender/source/blender/collada/DocumentImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/DocumentImporter.cpp	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/collada/DocumentImporter.cpp	2010-12-17 15:51:42 UTC (rev 33743)
@@ -308,7 +308,7 @@
 	Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Node *source_node, COLLADAFW::Node *instance_node, Scene *sce, bool is_library_node)
 	{
 		Object *obn = copy_object(source_ob);
-		obn->recalc |= OB_RECALC_ALL;
+		obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 		scene_add_base(sce, obn);
 
 		if (instance_node)

Modified: trunk/blender/source/blender/editors/animation/anim_deps.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_deps.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/editors/animation/anim_deps.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -90,7 +90,7 @@
 	else {
 		/* in other case we do standard depsgaph update, ideally
 		   we'd be calling property update functions here too ... */
-		DAG_id_tag_update(id, OB_RECALC_ALL); // XXX or do we want something more restrictive?
+		DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX or do we want something more restrictive?
 	}
 }
 
@@ -106,7 +106,7 @@
 			adt->recalc |= ADT_RECALC_ANIM;
 			
 		/* set recalc flags */
-		DAG_id_tag_update(id, OB_RECALC_ALL); // XXX or do we want something more restrictive?
+		DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX or do we want something more restrictive?
 	}
 }
 

Modified: trunk/blender/source/blender/editors/animation/keyingsets.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyingsets.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/editors/animation/keyingsets.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -926,7 +926,7 @@
 				{
 					Object *ob= (Object *)ksp->id;
 					
-					ob->recalc |= OB_RECALC_ALL; // XXX: only object transforms only?
+					ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; // XXX: only object transforms only?
 				}
 					break;
 			}

Modified: trunk/blender/source/blender/editors/object/object_add.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_add.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/editors/object/object_add.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -1066,7 +1066,7 @@
 	}
 
 	obn= copy_object(ob);
-	obn->recalc |= OB_RECALC_ALL;
+	obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 
 	basen= MEM_mallocN(sizeof(Base), "duplibase");
 	*basen= *base;
@@ -1150,7 +1150,7 @@
 				newob->data= copy_mesh(me);
 			} else {
 				newob = ob;
-				ob->recalc |= OB_RECALC_ALL;
+				ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 			}
 
 			/* make new mesh data from the original copy */
@@ -1211,7 +1211,7 @@
 					for(ob1= bmain->object.first; ob1; ob1=ob1->id.next) {
 						if(ob1->data==ob->data) {
 							ob1->type= OB_CURVE;
-							ob1->recalc |= OB_RECALC_ALL;
+							ob1->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 						}
 					}
 				}
@@ -1404,7 +1404,7 @@
 	}
 	else {
 		obn= copy_object(ob);
-		obn->recalc |= OB_RECALC_ALL;
+		obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 		
 		basen= MEM_mallocN(sizeof(Base), "duplibase");
 		*basen= *base;

Modified: trunk/blender/source/blender/editors/object/object_edit.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_edit.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/editors/object/object_edit.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -460,7 +460,7 @@
 		scene->obedit= ob;
 		ED_armature_to_edit(ob);
 		/* to ensure all goes in restposition and without striding */
-		DAG_id_tag_update(&ob->id, OB_RECALC_ALL); // XXX: should this be OB_RECALC_DATA?
+		DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX: should this be OB_RECALC_DATA?
 
 		WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_ARMATURE, scene);
 	}

Modified: trunk/blender/source/blender/editors/object/object_relations.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_relations.c	2010-12-17 15:37:59 UTC (rev 33742)
+++ trunk/blender/source/blender/editors/object/object_relations.c	2010-12-17 15:51:42 UTC (rev 33743)
@@ -196,7 +196,7 @@
 	
 	CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
 		if(ob != obedit) {
-			ob->recalc |= OB_RECALC_ALL;
+			ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 			par= obedit->parent;
 			
 			while(par) {
@@ -343,7 +343,7 @@
 		
 		/* depsgraph flushes are needed for the new data */
 		DAG_scene_sort(bmain, scene);
-		DAG_id_tag_update(&newob->id, OB_RECALC_ALL);
+		DAG_id_tag_update(&newob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME);
 		WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, newob);
 	}
 	else {
@@ -434,7 +434,7 @@
 		else if(type == 2)
 			unit_m4(ob->parentinv);
 
-		ob->recalc |= OB_RECALC_ALL;
+		ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 	}
 	CTX_DATA_END;
 	
@@ -894,7 +894,7 @@
 		
 		/* remove track-object for old track */
 		ob->track= NULL;
-		ob->recalc |= OB_RECALC_ALL;
+		ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
 		
 		/* also remove all tracking constraints */
 		for (con= ob->constraints.last; con; con= pcon) {

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list