[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12840] trunk/blender/source/blender/ python/api2_2x: Python API

Ken Hughes khughes at pacific.edu
Tue Dec 11 02:58:23 CET 2007


Revision: 12840
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12840
Author:   khughes
Date:     2007-12-11 02:58:22 +0100 (Tue, 11 Dec 2007)

Log Message:
-----------
Python API
----------
Bugfix #7898: added access to DISPLACE modifiers, add ARRAY constant to
modifier documentation.

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/Modifier.c
    trunk/blender/source/blender/python/api2_2x/doc/Modifier.py

Modified: trunk/blender/source/blender/python/api2_2x/Modifier.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Modifier.c	2007-12-10 23:25:21 UTC (rev 12839)
+++ trunk/blender/source/blender/python/api2_2x/Modifier.c	2007-12-11 01:58:22 UTC (rev 12840)
@@ -776,8 +776,6 @@
 		return PyFloat_FromDouble( md->length );
 	else if( type == EXPP_MOD_MERGE_DIST )
 		return PyFloat_FromDouble( md->merge_dist );
-	else if( type == EXPP_MOD_MERGE_DIST )
-		return PyFloat_FromDouble( md->merge_dist );
 	else if( type == EXPP_MOD_OFFSET_VEC)
 		return newVectorObject( md->offset, 3, Py_NEW );
 	else if( type == EXPP_MOD_SCALE_VEC)
@@ -1505,6 +1503,8 @@
 				PyInt_FromLong( eModifierType_Smooth ) );
 		PyConstant_Insert( d, "CAST",
 				PyInt_FromLong( eModifierType_Cast ) );
+		PyConstant_Insert( d, "DISPLACE",
+				PyInt_FromLong( eModifierType_Displace ) );
 	}
 	return S;
 }

Modified: trunk/blender/source/blender/python/api2_2x/doc/Modifier.py
===================================================================
--- trunk/blender/source/blender/python/api2_2x/doc/Modifier.py	2007-12-10 23:25:21 UTC (rev 12839)
+++ trunk/blender/source/blender/python/api2_2x/doc/Modifier.py	2007-12-11 01:58:22 UTC (rev 12840)
@@ -49,6 +49,7 @@
 @var Types: Constant Modifier dict used for  L{ModSeq.append} to a
   modifier sequence and comparing with L{Modifier.type}:
     - ARMATURE - type value for Armature modifiers
+    - ARRAY - type value for Array modifiers
     - BOOLEAN - type value for Boolean modifiers
     - BUILD - type value for Build modifiers
     - CURVE - type value for Curve modifiers





More information about the Bf-blender-cvs mailing list