[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12899] trunk/blender/source/blender/ python: final renaming of variables before api merge
Campbell Barton
ideasman42 at gmail.com
Sat Dec 15 23:50:59 CET 2007
Revision: 12899
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12899
Author: campbellbarton
Date: 2007-12-15 23:50:59 +0100 (Sat, 15 Dec 2007)
Log Message:
-----------
final renaming of variables before api merge
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/BGL.c
trunk/blender/source/blender/python/api2_2x/BGL.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/Blender.h
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.c
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/Font.h
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.c
trunk/blender/source/blender/python/api2_2x/Library.h
trunk/blender/source/blender/python/api2_2x/MTex.c
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/Noise.c
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.c
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/Registry.c
trunk/blender/source/blender/python/api2_2x/Registry.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/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/Text3d.h
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.h
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/gen_utils.h
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/meshPrimitive.c
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/sceneRadio.c
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.c
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:44:40 UTC (rev 12898)
+++ trunk/blender/source/blender/python/BPY_interface.c 2007-12-15 22:50:59 UTC (rev 12899)
@@ -85,7 +85,7 @@
#include "DNA_scene_types.h"
#include "DNA_material_types.h"
-/* bpy_registryDict is declared in api2_2x/Registry.h and defined
+/* V24_bpy_registryDict is declared in api2_2x/Registry.h and defined
* in api2_2x/Registry.c
* This Python dictionary will be used to store data that scripts
* choose to preserve after they are executed, so user changes can be
@@ -194,8 +194,8 @@
}
//stuff for Registry module
- bpy_registryDict = PyDict_New( );/* check comment at start of this file */
- if( !bpy_registryDict )
+ V24_bpy_registryDict = PyDict_New( );/* check comment at start of this file */
+ if( !V24_bpy_registryDict )
printf( "Error: Couldn't create the Registry Python Dictionary!" );
Py_SetProgramName( "blender" );
@@ -231,7 +231,7 @@
init_ourReload( );
//init a global dictionary
- g_blenderdict = NULL;
+ V24_g_blenderdict = NULL;
//Look for a python installation
init_syspath( first_time ); /* not first_time: some msgs are suppressed */
@@ -246,9 +246,9 @@
{
Script *script = NULL;
- if( bpy_registryDict ) {
- Py_DECREF( bpy_registryDict );
- bpy_registryDict = NULL;
+ if( V24_bpy_registryDict ) {
+ Py_DECREF( V24_bpy_registryDict );
+ V24_bpy_registryDict = NULL;
}
if( bpy_pydriver_Dict ) {
@@ -1139,7 +1139,7 @@
/* error return function for BPY_eval_pydriver */
static float pydriver_error(IpoDriver *driver) {
- if (bpy_pydriver_oblist)
+ if (V24_bpy_pydriver_oblist)
bpy_pydriver_freeList();
if (bpy_pydriver_Dict) { /* free the global dict used by pydrivers */
@@ -1781,7 +1781,7 @@
static int bpy_button_eval_error(char *expr) {
- if (bpy_pydriver_oblist)
+ if (V24_bpy_pydriver_oblist)
bpy_pydriver_freeList();
if (bpy_pydriver_Dict) { /* free the persistent global dict */
@@ -1965,10 +1965,10 @@
disable_where_scriptlink( (short)during_slink );
/* set globals in Blender module to identify scriptlink */
- PyDict_SetItemString( g_blenderdict, "bylink", Py_True);
- V24_EXPP_dict_set_item_str( g_blenderdict, "link", value );
- V24_EXPP_dict_set_item_str( g_blenderdict, "event",
- PyString_FromString( event_to_name
+ PyDict_SetItemString( V24_g_blenderdict, "bylink", Py_True);
+ V24_EXPP_dict_set_item_str( V24_g_blenderdict, "link", value );
+ V24_EXPP_dict_set_item_str( V24_g_blenderdict, "event",
+ PyString_FromString( V24_event_to_name
( event ) ) );
if (event == SCRIPT_POSTRENDER) event = SCRIPT_RENDER;
@@ -2005,9 +2005,9 @@
/* cleanup bylink flag and clear link so PyObject
* can be released
*/
- PyDict_SetItemString(g_blenderdict, "bylink", Py_False);
- PyDict_SetItemString( g_blenderdict, "link", Py_None );
- V24_EXPP_dict_set_item_str( g_blenderdict, "event", PyString_FromString( "" ) );
+ PyDict_SetItemString(V24_g_blenderdict, "bylink", Py_False);
+ PyDict_SetItemString( V24_g_blenderdict, "link", Py_None );
+ V24_EXPP_dict_set_item_str( V24_g_blenderdict, "event", PyString_FromString( "" ) );
}
}
@@ -2188,11 +2188,11 @@
}
/* set globals in Blender module to identify space handler scriptlink */
- PyDict_SetItemString(g_blenderdict, "bylink", Py_True);
+ PyDict_SetItemString(V24_g_blenderdict, "bylink", Py_True);
/* unlike normal scriptlinks, here Blender.link is int (space event type) */
- V24_EXPP_dict_set_item_str(g_blenderdict, "link", PyInt_FromLong(space_event));
+ V24_EXPP_dict_set_item_str(V24_g_blenderdict, "link", PyInt_FromLong(space_event));
/* note: DRAW space_events set event to 0 */
- V24_EXPP_dict_set_item_str(g_blenderdict, "event", PyInt_FromLong(event));
+ V24_EXPP_dict_set_item_str(V24_g_blenderdict, "event", PyInt_FromLong(event));
/* now run all assigned space handlers for this space and space_event */
for( index = 0; index < scriptlink->totscript; index++ ) {
@@ -2221,7 +2221,7 @@
* if the script sets Blender.event to None it accepted it;
* otherwise the space's event handling callback that called us
* can go on processing the event */
- if (event && (PyDict_GetItemString(g_blenderdict,"event") == Py_None))
+ if (event && (PyDict_GetItemString(V24_g_blenderdict,"event") == Py_None))
retval = 1; /* event was swallowed */
}
@@ -2247,9 +2247,9 @@
}
- PyDict_SetItemString(g_blenderdict, "bylink", Py_False);
- PyDict_SetItemString(g_blenderdict, "link", Py_None );
- V24_EXPP_dict_set_item_str(g_blenderdict, "event", PyString_FromString(""));
+ PyDict_SetItemString(V24_g_blenderdict, "bylink", Py_False);
+ PyDict_SetItemString(V24_g_blenderdict, "link", Py_None );
+ V24_EXPP_dict_set_item_str(V24_g_blenderdict, "event", PyString_FromString(""));
}
/* retval:
Modified: trunk/blender/source/blender/python/api2_2x/Armature.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Armature.c 2007-12-15 21:44:40 UTC (rev 12898)
+++ trunk/blender/source/blender/python/api2_2x/Armature.c 2007-12-15 22:50:59 UTC (rev 12899)
@@ -60,9 +60,9 @@
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);
+PyObject * V24_arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref);
/* python callable */
-PyObject * arm_weakref_callback_weakref_dealloc__pyfunc;
+PyObject * V24_arm_weakref_callback_weakref_dealloc__pyfunc;
//################## V24_BonesDict_Type (internal) ########################
/*This is an internal psuedo-dictionary type that allows for manipulation
@@ -273,7 +273,7 @@
return V24_EXPP_intError(PyExc_AttributeError, "%s%s",
V24_sBoneDictBadArgs, "The key must be the name of an editbone");
- if (value && !V24_EditBoneObject_Check(value))
+ if (value && !EditBoneObject_Check(value))
return V24_EXPP_intError(PyExc_AttributeError, "%s%s",
V24_sBoneDictBadArgs, "Can only assign editbones as values");
@@ -657,7 +657,7 @@
long numeric_value;
if(value){
- if(V24_BPy_Constant_Check(value)){
+ if(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"))
@@ -975,7 +975,7 @@
//------------------------tp_getset
//This contains methods for attributes that require checking
static PyGetSetDef V24_BPy_Armature_getset[] = {
- V24_GENERIC_LIB_GETSETATTR,
+ GENERIC_LIB_GETSETATTR,
{"bones", (getter)V24_Armature_getBoneDict, (setter)V24_Armature_setBoneDict,
"The armature's Bone dictionary", NULL},
{"vertexGroups", (getter)V24_Armature_getVertexGroups, (setter)V24_Armature_setVertexGroups,
@@ -1042,7 +1042,7 @@
//This methods does initialization of the new object
//This method will get called in python by 'myObject(argument, keyword=value)'
//tp_new will be automatically called before this
-static int Armature_init(V24_BPy_Armature *self, PyObject *args, PyObject *kwds)
+static int V24_Armature_init(V24_BPy_Armature *self, PyObject *args, PyObject *kwds)
{
char buf[21];
char *name = "myArmature";
@@ -1087,7 +1087,7 @@
//------------------------tp_dealloc
//This tells how to 'tear-down' our object when ref count hits 0
///tp_dealloc
-static void Armature_dealloc(V24_BPy_Armature * self)
+static void V24_Armature_dealloc(V24_BPy_Armature * self)
{
if (self->weaklist != NULL)
PyObject_ClearWeakRefs((PyObject *) self); /* this causes the weakref dealloc func to be called */
@@ -1102,7 +1102,7 @@
"Armature", //tp_name
sizeof(V24_BPy_Armature), //tp_basicsize
0, //tp_itemsize
- (destructor)Armature_dealloc, //tp_dealloc
+ (destructor)V24_Armature_dealloc, //tp_dealloc
0, //tp_print
0, //tp_getattr
0, //tp_setattr
@@ -1133,7 +1133,7 @@
0, //tp_descr_get
0, //tp_descr_set
0, //tp_dictoffset
- (initproc)Armature_init, //tp_init
+ (initproc)V24_Armature_init, //tp_init
0, //tp_alloc
(newfunc)V24_Armature_new, //tp_new
0, //tp_free
@@ -1276,7 +1276,7 @@
//----------------Blender.Armature.New()
-static PyObject *M_Armature_New(PyObject * self, PyObject * args)
+static PyObject *V24_M_Armature_New(PyObject * self, PyObject * args)
{
char *name = "Armature";
struct bArmature *armature;
@@ -1307,9 +1307,9 @@
static char V24_M_Armature_New_doc[] = "(name) - return a new armature object.";
-struct PyMethodDef M_Armature_methods[] = {
+struct PyMethodDef V24_M_Armature_methods[] = {
{"Get", V24_M_Armature_Get, METH_VARARGS, V24_M_Armature_Get_doc},
- {"New", M_Armature_New, METH_VARARGS, V24_M_Armature_New_doc},
+ {"New", V24_M_Armature_New, METH_VARARGS, V24_M_Armature_New_doc},
{NULL, NULL, 0, NULL}
};
//------------------VISIBLE PROTOTYPE IMPLEMENTATION-----------------------
@@ -1326,7 +1326,7 @@
}
/* internal func to remove weakref from weakref list */
-PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref)
+PyObject * V24_arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref)
{
char *list_name = ARM_WEAKREF_LIST_NAME;
PyObject *maindict = NULL, *armlist = NULL;
@@ -1371,7 +1371,7 @@
/* see if we alredy have it */
for (i=0; i< PyList_Size(armlist); i++) {
py_armature = (V24_BPy_Armature *)PyWeakref_GetObject(PyList_GET_ITEM(armlist, i));
- if (V24_BPy_Armature_Check(py_armature) && py_armature->armature == armature) {
+ if (BPy_Armature_Check(py_armature) && py_armature->armature == armature) {
Py_INCREF(py_armature);
/*printf("reusing armature\n");*/
return (PyObject *)py_armature;
@@ -1397,7 +1397,7 @@
goto RuntimeError;
}
- weakref = PyWeakref_NewRef((PyObject*)py_armature, arm_weakref_callback_weakref_dealloc__pyfunc);
+ weakref = PyWeakref_NewRef((PyObject*)py_armature, V24_arm_weakref_callback_weakref_dealloc__pyfunc);
if (PyList_Append(armlist, weakref) == -1){
printf("Oops - list-append failed\n");
goto RuntimeError;
@@ -1412,19 +1412,19 @@
}
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list