[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12798] trunk/blender: - fix for [#7327] Problem/issue with .PLY export,
Campbell Barton
ideasman42 at gmail.com
Wed Dec 5 21:21:25 CET 2007
Revision: 12798
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12798
Author: campbellbarton
Date: 2007-12-05 21:21:25 +0100 (Wed, 05 Dec 2007)
Log Message:
-----------
- fix for [#7327] Problem/issue with .PLY export,
editmode was not exited, and vertex normals would not write at all! (probably own error)
- Edited tooltip for texture DVar (was some user confusion in the studio as to its purpose)
- Set render border is disabled when it has no area - so drawing a box outside the camera disables .
Modified Paths:
--------------
trunk/blender/release/scripts/ply_export.py
trunk/blender/source/blender/render/extern/include/RE_shader_ext.h
trunk/blender/source/blender/src/buttons_shading.c
trunk/blender/source/blender/src/editview.c
Modified: trunk/blender/release/scripts/ply_export.py
===================================================================
--- trunk/blender/release/scripts/ply_export.py 2007-12-05 19:47:20 UTC (rev 12797)
+++ trunk/blender/release/scripts/ply_export.py 2007-12-05 20:21:25 UTC (rev 12798)
@@ -7,6 +7,7 @@
Tooltip: 'Export active object to Stanford PLY format'
"""
+import bpy
import Blender
from Blender import Mesh, Scene, Window, sys, Image, Draw
import BPyMesh
@@ -64,7 +65,7 @@
if not filename.lower().endswith('.ply'):
filename += '.ply'
- scn= Blender.Scene.GetCurrent()
+ scn= bpy.data.scenes.active
ob= scn.objects.active
if not ob:
Blender.Draw.PupMenu('Error%t|Select 1 active object')
@@ -89,6 +90,10 @@
if not Draw.PupBlock('Export...', pup_block):
return
+ is_editmode = Blender.Window.EditMode()
+ if is_editmode:
+ Blender.Window.EditMode(0, '', 0)
+
Window.WaitCursor(1)
EXPORT_APPLY_MODIFIERS = EXPORT_APPLY_MODIFIERS.val
@@ -132,7 +137,7 @@
if vertexColors: col = f.col
for j, v in enumerate(f):
if smooth:
- normal= v.no
+ normal= tuple(v.no)
normal_key = rvec3d(normal)
if faceUV:
@@ -211,12 +216,12 @@
file.write('\n')
file.close()
+
+ if is_editmode:
+ Blender.Window.EditMode(1, '', 0)
-
-
def main():
Blender.Window.FileSelector(file_callback, 'PLY Export', Blender.sys.makename(ext='.ply'))
-
if __name__=='__main__':
main()
Modified: trunk/blender/source/blender/render/extern/include/RE_shader_ext.h
===================================================================
--- trunk/blender/source/blender/render/extern/include/RE_shader_ext.h 2007-12-05 19:47:20 UTC (rev 12797)
+++ trunk/blender/source/blender/render/extern/include/RE_shader_ext.h 2007-12-05 20:21:25 UTC (rev 12798)
@@ -120,7 +120,7 @@
/* end direct copy from material */
/* individual copies: */
- int har;
+ int har; /* hardness */
float layerfac;
/* texture coordinates */
Modified: trunk/blender/source/blender/src/buttons_shading.c
===================================================================
--- trunk/blender/source/blender/src/buttons_shading.c 2007-12-05 19:47:20 UTC (rev 12797)
+++ trunk/blender/source/blender/src/buttons_shading.c 2007-12-05 20:21:25 UTC (rev 12798)
@@ -1974,7 +1974,7 @@
uiDefButF(block, NUMSLI, B_WORLDPRV, "G ", 10,60,135,19, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "The default color for textures that don't return RGB");
uiDefButF(block, NUMSLI, B_WORLDPRV, "B ", 10,40,135,19, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "The default color for textures that don't return RGB");
uiBlockEndAlign(block);
- uiDefButF(block, NUMSLI, B_WORLDPRV, "DVar ", 10,10,135,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "The default value for textures to mix with values (not RGB)");
+ uiDefButF(block, NUMSLI, B_WORLDPRV, "DVar ", 10,10,135,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "Texture influence for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard");
/* MAP TO */
uiBlockBeginAlign(block);
@@ -2405,7 +2405,7 @@
uiDefButF(block, NUMSLI, B_LAMPPRV, "G ", 10,60,135,19, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "The default color for textures that don't return RGB");
uiDefButF(block, NUMSLI, B_LAMPPRV, "B ", 10,40,135,19, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "The default color for textures that don't return RGB");
uiBlockEndAlign(block);
- uiDefButF(block, NUMSLI, B_LAMPPRV, "DVar ", 10,10,135,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "The default value the textures uses to mix with");
+ uiDefButF(block, NUMSLI, B_LAMPPRV, "DVar ", 10,10,135,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "Texture influence for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard");
/* MAP TO */
uiDefButBitS(block, TOG, MAP_COL, B_LAMPPRV, "Col", 10,180,135,19, &(mtex->mapto), 0, 0, 0, 0, "Lets the texture affect the basic color of the lamp");
@@ -3146,7 +3146,7 @@
}
uiBlockEndAlign(block);
- uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 10,10,135,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "The default value the texture uses to mix with (not RGB)");
+ uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 10,10,135,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "Texture influence for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard");
/* MAP TO */
uiBlockBeginAlign(block);
Modified: trunk/blender/source/blender/src/editview.c
===================================================================
--- trunk/blender/source/blender/src/editview.c 2007-12-05 19:47:20 UTC (rev 12797)
+++ trunk/blender/source/blender/src/editview.c 2007-12-05 20:21:25 UTC (rev 12798)
@@ -2144,9 +2144,12 @@
allqueue(REDRAWVIEWCAM, 1);
- /* drawing a border surrounding the entire camera view switches off border rendering */
- if (G.scene->r.border.xmin <= 0.0 && G.scene->r.border.xmax >= 1.0 &&
- G.scene->r.border.ymin <= 0.0 && G.scene->r.border.ymax >= 1.0)
+ /* drawing a border surrounding the entire camera view switches off border rendering
+ * or the border covers no pixels */
+ if ((G.scene->r.border.xmin <= 0.0 && G.scene->r.border.xmax >= 1.0 &&
+ G.scene->r.border.ymin <= 0.0 && G.scene->r.border.ymax >= 1.0) ||
+ (G.scene->r.border.xmin == G.scene->r.border.xmax ||
+ G.scene->r.border.ymin == G.scene->r.border.ymax ))
{
G.scene->r.mode &= ~R_BORDER;
} else {
More information about the Bf-blender-cvs
mailing list