[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12898] trunk/blender/source/blender/ python: more prefixing pyapi vars to merge in the new api

Campbell Barton ideasman42 at gmail.com
Sat Dec 15 22:44:41 CET 2007


Revision: 12898
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12898
Author:   campbellbarton
Date:     2007-12-15 22:44:40 +0100 (Sat, 15 Dec 2007)

Log Message:
-----------
more prefixing pyapi vars to merge in the new api

Modified Paths:
--------------
    trunk/blender/source/blender/python/BPY_interface.c
    trunk/blender/source/blender/python/api2_2x/Armature.c
    trunk/blender/source/blender/python/api2_2x/Armature.h
    trunk/blender/source/blender/python/api2_2x/BezTriple.c
    trunk/blender/source/blender/python/api2_2x/BezTriple.h
    trunk/blender/source/blender/python/api2_2x/Blender.c
    trunk/blender/source/blender/python/api2_2x/Bone.c
    trunk/blender/source/blender/python/api2_2x/Bone.h
    trunk/blender/source/blender/python/api2_2x/Camera.c
    trunk/blender/source/blender/python/api2_2x/Camera.h
    trunk/blender/source/blender/python/api2_2x/Constraint.c
    trunk/blender/source/blender/python/api2_2x/Constraint.h
    trunk/blender/source/blender/python/api2_2x/CurNurb.c
    trunk/blender/source/blender/python/api2_2x/CurNurb.h
    trunk/blender/source/blender/python/api2_2x/Curve.c
    trunk/blender/source/blender/python/api2_2x/Curve.h
    trunk/blender/source/blender/python/api2_2x/Draw.c
    trunk/blender/source/blender/python/api2_2x/Draw.h
    trunk/blender/source/blender/python/api2_2x/EXPP_interface.h
    trunk/blender/source/blender/python/api2_2x/Effect.c
    trunk/blender/source/blender/python/api2_2x/Effect.h
    trunk/blender/source/blender/python/api2_2x/Font.c
    trunk/blender/source/blender/python/api2_2x/Geometry.c
    trunk/blender/source/blender/python/api2_2x/Group.c
    trunk/blender/source/blender/python/api2_2x/Group.h
    trunk/blender/source/blender/python/api2_2x/Image.c
    trunk/blender/source/blender/python/api2_2x/Image.h
    trunk/blender/source/blender/python/api2_2x/Ipo.c
    trunk/blender/source/blender/python/api2_2x/Ipo.h
    trunk/blender/source/blender/python/api2_2x/Ipocurve.c
    trunk/blender/source/blender/python/api2_2x/Ipocurve.h
    trunk/blender/source/blender/python/api2_2x/Key.c
    trunk/blender/source/blender/python/api2_2x/Lamp.c
    trunk/blender/source/blender/python/api2_2x/Lamp.h
    trunk/blender/source/blender/python/api2_2x/Lattice.c
    trunk/blender/source/blender/python/api2_2x/Lattice.h
    trunk/blender/source/blender/python/api2_2x/Library.h
    trunk/blender/source/blender/python/api2_2x/MTex.h
    trunk/blender/source/blender/python/api2_2x/Material.c
    trunk/blender/source/blender/python/api2_2x/Material.h
    trunk/blender/source/blender/python/api2_2x/Mathutils.c
    trunk/blender/source/blender/python/api2_2x/Mathutils.h
    trunk/blender/source/blender/python/api2_2x/Mesh.c
    trunk/blender/source/blender/python/api2_2x/Mesh.h
    trunk/blender/source/blender/python/api2_2x/Metaball.c
    trunk/blender/source/blender/python/api2_2x/Metaball.h
    trunk/blender/source/blender/python/api2_2x/Modifier.c
    trunk/blender/source/blender/python/api2_2x/Modifier.h
    trunk/blender/source/blender/python/api2_2x/NLA.c
    trunk/blender/source/blender/python/api2_2x/NLA.h
    trunk/blender/source/blender/python/api2_2x/NMesh.c
    trunk/blender/source/blender/python/api2_2x/NMesh.h
    trunk/blender/source/blender/python/api2_2x/Object.c
    trunk/blender/source/blender/python/api2_2x/Object.h
    trunk/blender/source/blender/python/api2_2x/Particle.h
    trunk/blender/source/blender/python/api2_2x/Pose.c
    trunk/blender/source/blender/python/api2_2x/Pose.h
    trunk/blender/source/blender/python/api2_2x/Scene.c
    trunk/blender/source/blender/python/api2_2x/Scene.h
    trunk/blender/source/blender/python/api2_2x/Sound.c
    trunk/blender/source/blender/python/api2_2x/Sound.h
    trunk/blender/source/blender/python/api2_2x/SurfNurb.c
    trunk/blender/source/blender/python/api2_2x/SurfNurb.h
    trunk/blender/source/blender/python/api2_2x/Sys.c
    trunk/blender/source/blender/python/api2_2x/Sys.h
    trunk/blender/source/blender/python/api2_2x/Text.c
    trunk/blender/source/blender/python/api2_2x/Text.h
    trunk/blender/source/blender/python/api2_2x/Text3d.c
    trunk/blender/source/blender/python/api2_2x/Texture.c
    trunk/blender/source/blender/python/api2_2x/Texture.h
    trunk/blender/source/blender/python/api2_2x/Types.c
    trunk/blender/source/blender/python/api2_2x/Types.h
    trunk/blender/source/blender/python/api2_2x/Window.c
    trunk/blender/source/blender/python/api2_2x/World.c
    trunk/blender/source/blender/python/api2_2x/World.h
    trunk/blender/source/blender/python/api2_2x/bpy.c
    trunk/blender/source/blender/python/api2_2x/bpy_config.h
    trunk/blender/source/blender/python/api2_2x/bpy_data.c
    trunk/blender/source/blender/python/api2_2x/bpy_data.h
    trunk/blender/source/blender/python/api2_2x/charRGBA.c
    trunk/blender/source/blender/python/api2_2x/charRGBA.h
    trunk/blender/source/blender/python/api2_2x/constant.c
    trunk/blender/source/blender/python/api2_2x/constant.h
    trunk/blender/source/blender/python/api2_2x/euler.c
    trunk/blender/source/blender/python/api2_2x/euler.h
    trunk/blender/source/blender/python/api2_2x/gen_library.c
    trunk/blender/source/blender/python/api2_2x/gen_library.h
    trunk/blender/source/blender/python/api2_2x/gen_utils.c
    trunk/blender/source/blender/python/api2_2x/logic.c
    trunk/blender/source/blender/python/api2_2x/logic.h
    trunk/blender/source/blender/python/api2_2x/matrix.c
    trunk/blender/source/blender/python/api2_2x/matrix.h
    trunk/blender/source/blender/python/api2_2x/point.c
    trunk/blender/source/blender/python/api2_2x/point.h
    trunk/blender/source/blender/python/api2_2x/quat.c
    trunk/blender/source/blender/python/api2_2x/quat.h
    trunk/blender/source/blender/python/api2_2x/rgbTuple.c
    trunk/blender/source/blender/python/api2_2x/rgbTuple.h
    trunk/blender/source/blender/python/api2_2x/sceneRender.c
    trunk/blender/source/blender/python/api2_2x/sceneRender.h
    trunk/blender/source/blender/python/api2_2x/sceneSequence.c
    trunk/blender/source/blender/python/api2_2x/sceneSequence.h
    trunk/blender/source/blender/python/api2_2x/sceneTimeLine.h
    trunk/blender/source/blender/python/api2_2x/vector.c
    trunk/blender/source/blender/python/api2_2x/vector.h
    trunk/blender/source/blender/python/api2_2x/windowTheme.c

Modified: trunk/blender/source/blender/python/BPY_interface.c
===================================================================
--- trunk/blender/source/blender/python/BPY_interface.c	2007-12-15 21:40:23 UTC (rev 12897)
+++ trunk/blender/source/blender/python/BPY_interface.c	2007-12-15 21:44:40 UTC (rev 12898)
@@ -1309,12 +1309,12 @@
 	 *	- id-properties are wrapped using the id-properties pyapi
 	 *	- targets are presented as a list of matrices
 	 */
-	srcmat = newMatrixObject((float *)cob->matrix, 4, 4, Py_NEW);
+	srcmat = V24_newMatrixObject((float *)cob->matrix, 4, 4, Py_NEW);
 	idprop = V24_BPy_Wrap_IDProperty(NULL, con->prop, NULL);
 	
 	tarmats= PyList_New(con->tarnum); 
 	for (ct=targets->first, index=0; ct; ct=ct->next, index++) {
-		tarmat = newMatrixObject((float *)ct->matrix, 4, 4, Py_NEW);
+		tarmat = V24_newMatrixObject((float *)ct->matrix, 4, 4, Py_NEW);
 		PyList_SET_ITEM(tarmats, index, tarmat);
 	}
 	
@@ -1394,7 +1394,7 @@
 	}
 	
 	
-	if (!PyObject_TypeCheck(retval, &matrix_Type)) {
+	if (!PyObject_TypeCheck(retval, &V24_matrix_Type)) {
 		printf("Error in PyConstraint - doConstraint: Function not returning a matrix!\n");
 		con->flag |= PYCON_SCRIPTERROR;
 		
@@ -1468,7 +1468,7 @@
 	else
 		subtar = PyString_FromString(ct->subtarget);
 	
-	tarmat = newMatrixObject((float *)ct->matrix, 4, 4, Py_NEW);
+	tarmat = V24_newMatrixObject((float *)ct->matrix, 4, 4, Py_NEW);
 	idprop = V24_BPy_Wrap_IDProperty( NULL, con->prop, NULL);
 	
 /*  since I can't remember what the armature weakrefs do, I'll just leave this here
@@ -1546,7 +1546,7 @@
 		return;
 	}
 	
-	if (!PyObject_TypeCheck(retval, &matrix_Type)) {
+	if (!PyObject_TypeCheck(retval, &V24_matrix_Type)) {
 		con->flag |= PYCON_SCRIPTERROR;
 		
 		Py_XDECREF(tar);
@@ -1768,7 +1768,7 @@
 	return result;
 }
 
-/* V24V24__Button Python Evaluation */
+/* V24_Button Python Evaluation */
 
 /* Python evaluation for gui buttons:
  *	users can write any valid Python expression (that evals to an int or float)
@@ -1809,7 +1809,7 @@
 	if (!bpy_pydriver_Dict) {
 		if (bpy_pydriver_create_dict() != 0) {
 			fprintf(stderr,
-				"V24V24__Button Python Eval error: couldn't create Python dictionary");
+				"V24_Button Python Eval error: couldn't create Python dictionary");
 			return -1;
 		}
 	}

Modified: trunk/blender/source/blender/python/api2_2x/Armature.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Armature.c	2007-12-15 21:40:23 UTC (rev 12897)
+++ trunk/blender/source/blender/python/api2_2x/Armature.c	2007-12-15 21:44:40 UTC (rev 12898)
@@ -53,12 +53,12 @@
 
 //------------------------ERROR CODES---------------------------------
 //This is here just to make me happy and to have more consistant error strings :)
-static const char sBoneDictError[] = "ArmatureType.bones - Error: ";
-static const char sBoneDictBadArgs[] = "ArmatureType.bones - Bad Arguments: ";
-static const char sArmatureError[] = "ArmatureType - Error: ";
-static const char sArmatureBadArgs[] = "ArmatureType - Bad Arguments: ";
-static const char sModuleError[] = "Blender.Armature - Error: ";
-static const char sModuleBadArgs[] = "Blender.Armature - Bad Arguments: ";
+static const char V24_sBoneDictError[] = "ArmatureType.bones - Error: ";
+static const char V24_sBoneDictBadArgs[] = "ArmatureType.bones - Bad Arguments: ";
+static const char V24_sArmatureError[] = "ArmatureType - Error: ";
+static const char V24_sArmatureBadArgs[] = "ArmatureType - Bad Arguments: ";
+static const char V24_sModuleError[] = "Blender.Armature - Error: ";
+static const char V24_sModuleBadArgs[] = "Blender.Armature - Bad Arguments: ";
 
 PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref);
 /* python callable */
@@ -267,15 +267,15 @@
 
 	if (!self->editmode_flag)
 		return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-				sBoneDictBadArgs,  "You must call makeEditable() first");
+				V24_sBoneDictBadArgs,  "You must call makeEditable() first");
 	
 	if (!key_str)
 		return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-				sBoneDictBadArgs,  "The key must be the name of an editbone");
+				V24_sBoneDictBadArgs,  "The key must be the name of an editbone");
 	
-	if (value && !EditBoneObject_Check(value))
+	if (value && !V24_EditBoneObject_Check(value))
 		return V24_EXPP_intError(PyExc_AttributeError, "%s%s",
-				sBoneDictBadArgs,  "Can only assign editbones as values");
+				V24_sBoneDictBadArgs,  "Can only assign editbones as values");
 	
 	//parse value for assignment
 	if (value){ /* we know this must be an editbone from the above check */
@@ -308,7 +308,7 @@
 				((V24_BPy_EditBone*)value)->editbone = NULL;
 				MEM_freeN(editbone);
 					return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-							sBoneDictBadArgs,  "The 'connected' flag is set but the bone has no parent!");
+							V24_sBoneDictBadArgs,  "The 'connected' flag is set but the bone has no parent!");
 			}else{
 				VECCOPY(editbone->head, editbone->parent->tail);
 			}
@@ -322,7 +322,7 @@
 			((V24_BPy_EditBone*)value)->editbone = NULL;
 			BLI_freelinkN(&self->editbones, editbone);
 			return V24_EXPP_intError(PyExc_RuntimeError, "%s%s", 
-					sBoneDictError,  "Unable to access dictionary!");
+					V24_sBoneDictError,  "Unable to access dictionary!");
 		}
 	}else {
 		//they are trying to delete the bone using 'del'
@@ -330,7 +330,7 @@
 
 		if (!editbone_for_deletion)
 			return V24_EXPP_intError(PyExc_KeyError, "%s%s%s%s", 
-					sBoneDictError,  "The key: ", key_str, " is not present in this dictionary!");
+					V24_sBoneDictError,  "The key: ", key_str, " is not present in this dictionary!");
 
 		/*first kill the datastruct then remove the item from the dict
 		and wait for GC to pick it up.
@@ -350,7 +350,7 @@
 		BLI_freelinkN(&self->editbones, editbone_for_deletion->editbone);
 		if(PyDict_DelItem(self->editbonesMap, key) == -1)
 			return V24_EXPP_intError(PyExc_RuntimeError, "%s%s", 
-					sBoneDictError,  "Unable to access dictionary!");
+					V24_sBoneDictError,  "Unable to access dictionary!");
 	}
 	return 0;
 }
@@ -443,7 +443,7 @@
 
 RuntimeError:
 	return V24_EXPP_objError(PyExc_RuntimeError, "%s%s", 
-		sBoneDictError, "Failed to create class");
+		V24_sBoneDictError, "Failed to create class");
 }
 
 //######################### V24_Armature_Type #############################
@@ -467,7 +467,7 @@
 
 AttributeError:
 	return V24_EXPP_objError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "The armature cannot be placed manually in editmode before you call makeEditable()!");
+		V24_sArmatureBadArgs, "The armature cannot be placed manually in editmode before you call makeEditable()!");
 }
 
 //------------------------Armature.update()
@@ -494,7 +494,7 @@
 
 AttributeError:
 	return V24_EXPP_objError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "The armature must be linked to an object before you can save changes!");
+		V24_sArmatureBadArgs, "The armature must be linked to an object before you can save changes!");
 }
 
 //------------------------Armature.__copy__()
@@ -535,7 +535,7 @@
 
 AttributeError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Expects True or False");
+		V24_sArmatureBadArgs, "Expects True or False");
 }
 //------------------------Armature.layers (getter)
 static PyObject *V24_Armature_getLayers(V24_BPy_Armature *self, void *closure)
@@ -629,7 +629,7 @@
 
 AttributeError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Expects True or False");
+		V24_sArmatureBadArgs, "Expects True or False");
 }
 //------------------------Armature.drawType (getter)
 static PyObject *V24_Armature_getDrawType(V24_BPy_Armature *self, void *closure)
@@ -648,7 +648,7 @@
 
 RuntimeError:
 	return V24_EXPP_objError(PyExc_RuntimeError, "%s%s%s", 
-		sArmatureError, "drawType: ", "Internal failure!");
+		V24_sArmatureError, "drawType: ", "Internal failure!");
 }
 //------------------------Armature.drawType (setter)
 static int V24_Armature_setDrawType(V24_BPy_Armature *self, PyObject *value, void *closure)
@@ -657,7 +657,7 @@
 	long numeric_value;
 
 	if(value){
-		if(BPy_Constant_Check(value)){
+		if(V24_BPy_Constant_Check(value)){
 			name = PyDict_GetItemString(((V24_BPy_constant*)value)->dict, "name");
 			if (!STREQ2(PyString_AsString(name), "OCTAHEDRON", "STICK") &&
 				!STREQ2(PyString_AsString(name), "BBONE", "ENVELOPE"))
@@ -674,11 +674,11 @@
 
 AttributeError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Expects module constant");
+		V24_sArmatureBadArgs, "Expects module constant");
 
 ValueError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Argument must be the constant OCTAHEDRON, STICK, BBONE, or ENVELOPE");
+		V24_sArmatureBadArgs, "Argument must be the constant OCTAHEDRON, STICK, BBONE, or ENVELOPE");
 }
 //------------------------Armature.ghostStep (getter)
 static PyObject *V24_Armature_getStep(V24_BPy_Armature *self, void *closure)
@@ -703,11 +703,11 @@
 
 AttributeError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Expects Integer");
+		V24_sArmatureBadArgs, "Expects Integer");
 
 ValueError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Argument must fall within 1-20");
+		V24_sArmatureBadArgs, "Argument must fall within 1-20");
 }
 //------------------------Armature.ghost (getter)
 static PyObject *V24_Armature_getGhost(V24_BPy_Armature *self, void *closure)
@@ -732,11 +732,11 @@
 
 AttributeError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Expects Integer");
+		V24_sArmatureBadArgs, "Expects Integer");
 
 ValueError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Argument must fall within 0-30");
+		V24_sArmatureBadArgs, "Argument must fall within 0-30");
 }
 //------------------------Armature.drawNames (getter)
 static PyObject *V24_Armature_getDrawNames(V24_BPy_Armature *self, void *closure)
@@ -764,7 +764,7 @@
 
 AttributeError:
 	return V24_EXPP_intError(PyExc_AttributeError, "%s%s", 
-		sArmatureBadArgs, "Expects True or False");
+		V24_sArmatureBadArgs, "Expects True or False");
 }
 //------------------------Armature.drawAxes (getter)
 static PyObject *V24_Armature_getDrawAxes(V24_BPy_Armature *self, void *closure)
@@ -792,7 +792,7 @@
 
 AttributeError:

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list