Revision: 14597
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14597
Author:   campbellbarton
Date:     2008-04-28 18:09:17 +0200 (Mon, 28 Apr 2008)

Log Message:
-----------
fix for [#9651] raw_export.py tooltip outdated?
own error, bpath looper was trying to free NULL pointer,
added fromOrig to python mtex api
made FromOrig and FromDupli tooltips be understandable 

Modified Paths:
--------------
    trunk/blender/release/scripts/raw_export.py
    trunk/blender/source/blender/blenlib/intern/bpath.c
    trunk/blender/source/blender/python/api2_2x/MTex.c
    trunk/blender/source/blender/python/api2_2x/doc/Texture.py
    trunk/blender/source/blender/src/buttons_shading.c

Modified: trunk/blender/release/scripts/raw_export.py
===================================================================
--- trunk/blender/release/scripts/raw_export.py 2008-04-28 14:54:24 UTC (rev 
14596)
+++ trunk/blender/release/scripts/raw_export.py 2008-04-28 16:09:17 UTC (rev 
14597)
@@ -2,9 +2,9 @@
 
 """
 Name: 'Raw Faces (.raw)...'
-Blender: 242
+Blender: 245
 Group: 'Export'
-Tooltip: 'Export selected mesh to Raw Triangle Format (.raw)'
+Tooltip: 'Export selected mesh to Raw Format (.raw)'
 """
 
 __author__ = "Anthony D'Agostino (Scorpius)"
@@ -13,10 +13,10 @@
 __version__ = "Part of IOSuite 0.5"
 
 __bpydoc__ = """\
-This script exports meshes to Raw Triangle file format.
+This script exports meshes to Raw file format.
 
 The raw triangle format is very simple; it has no verts or faces lists.
-It's just a simple ascii text file with the vertices of each triangle
+It's just a simple ascii text file with the vertices of each triangle or quad
 listed on each line. There were some very old utilities (when the PovRay
 forum was in existence on CompuServe) that preformed operations on these
 files.
@@ -65,24 +65,24 @@
                filename += '.raw'
        
        scn= Blender.Scene.GetCurrent()
-       object= scn.getActiveObject()
-       if not object:
+       ob= scn.objects.active
+       if not ob:
                Blender.Draw.PupMenu('Error%t|Select 1 active object')
                return
        
        file = open(filename, 'wb')
        
-       mesh = BPyMesh.getMeshFromObject(object, None, True, False, scn)
+       mesh = BPyMesh.getMeshFromObject(ob, None, True, False, scn)
        if not mesh:
                Blender.Draw.PupMenu('Error%t|Could not get mesh data from 
active object')
                return
        
-       mesh.transform(object.matrixWorld)
+       mesh.transform(ob.matrixWorld)
        
        
        file = open(filename, "wb")
        for f in mesh.faces:
-               for v in f.v:
+               for v in f:
                        file.write('%.6f %.6f %.6f ' % tuple(v.co))
                file.write('\n')
        file.close()

Modified: trunk/blender/source/blender/blenlib/intern/bpath.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/bpath.c 2008-04-28 14:54:24 UTC 
(rev 14596)
+++ trunk/blender/source/blender/blenlib/intern/bpath.c 2008-04-28 16:09:17 UTC 
(rev 14597)
@@ -239,8 +239,10 @@
                                return seq;
                        } else {
                                /* keep looking through the next scene, 
reallocate seq array */
-                               MEM_freeN((void *)bpi->seqdata.seqar);
-                               bpi->seqdata.seqar = NULL;
+                               if (bpi->seqdata.seqar) {
+                                       MEM_freeN((void *)bpi->seqdata.seqar);
+                                       bpi->seqdata.seqar = NULL;
+                               }
                                bpi->seqdata.scene = 
bpi->seqdata.scene->id.next;
                        }
                } else {

Modified: trunk/blender/source/blender/python/api2_2x/MTex.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/MTex.c  2008-04-28 14:54:24 UTC 
(rev 14596)
+++ trunk/blender/source/blender/python/api2_2x/MTex.c  2008-04-28 16:09:17 UTC 
(rev 14597)
@@ -143,8 +143,11 @@
                "Correct normal mapping for Texture space and Object space",
                (void*) MTEX_VIEWSPACE },
        { "fromDupli", (getter) MTex_getFlag, (setter) MTex_setFlag,
-               "If object is duplicated by vertices, faces or particles, 
inherit texture coordinate from parent object",
+               "Dupli's instanced from verts, faces or particles, inherit 
texture coordinate from their parent",
                (void*) MTEX_DUPLI_MAPTO },
+       { "fromOrig", (getter) MTex_getFlag, (setter) MTex_setFlag,
+               "Dupli's derive their object coordinates from the original 
objects transformation",
+               (void*) MTEX_OB_DUPLI_ORIG },
        { "xproj", (getter) MTex_getProjX, (setter) MTex_setProjX,
                "Projection of X axis to Texture space", NULL },
        { "yproj", (getter) MTex_getProjY, (setter) MTex_setProjY,

Modified: trunk/blender/source/blender/python/api2_2x/doc/Texture.py
===================================================================
--- trunk/blender/source/blender/python/api2_2x/doc/Texture.py  2008-04-28 
14:54:24 UTC (rev 14596)
+++ trunk/blender/source/blender/python/api2_2x/doc/Texture.py  2008-04-28 
16:09:17 UTC (rev 14597)
@@ -515,7 +515,8 @@
        @ivar neg: Negate texture values mode
        @ivar noRGB: Convert texture RGB values to intensity values
        @ivar correctNor: Correct normal mapping for Texture space and Object 
space
-       @ivar fromDupli: If object is duplicated by vertices, faces or 
particles, inherit texture coordinate from parent object
+       @ivar fromDupli: Dupli's instanced from verts, faces or particles, 
inherit texture coordinate from their parent
+       @ivar fromOrig: Dupli's derive their object coordinates from the 
original objects transformation
        @ivar xproj: Projection of X axis to Texture space. L{Proj}
        @ivar yproj: Projection of Y axis to Texture space. L{Proj}
        @ivar zproj: Projection of Z axis to Texture space. L{Proj}

Modified: trunk/blender/source/blender/src/buttons_shading.c
===================================================================
--- trunk/blender/source/blender/src/buttons_shading.c  2008-04-28 14:54:24 UTC 
(rev 14596)
+++ trunk/blender/source/blender/src/buttons_shading.c  2008-04-28 16:09:17 UTC 
(rev 14597)
@@ -3440,9 +3440,9 @@
        uiBlockEndAlign(block);
 
        if(ELEM(mtex->texco, TEXCO_UV, TEXCO_ORCO))
-               uiDefButBitS(block, TOG, MTEX_DUPLI_MAPTO, B_MATPRV, "From 
Dupli",      820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "If object is 
duplicated by vertices, faces or particles, inherit texture coordinate from 
parent object");
+               uiDefButBitS(block, TOG, MTEX_DUPLI_MAPTO, B_MATPRV, "From 
Dupli",      820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "Dupli's instanced 
from verts, faces or particles, inherit texture coordinate from their parent");
        else if(mtex->texco == TEXCO_OBJECT)
-               uiDefButBitS(block, TOG, MTEX_OB_DUPLI_ORIG, B_MATPRV, "From 
Original", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "If object is 
duplicated, use object coordinates as if the object was in its original 
position");
+               uiDefButBitS(block, TOG, MTEX_OB_DUPLI_ORIG, B_MATPRV, "From 
Original", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "Dupli's derive their 
object coordinates from the original objects transformation");
 
 
        /* COORDS */


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to