[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60062] branches/soc-2013-cycles_mblur: Merged trunk into branch.

Gavin Howard gavin.d.howard at gmail.com
Thu Sep 12 06:23:09 CEST 2013


Revision: 60062
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60062
Author:   gdh
Date:     2013-09-12 04:23:06 +0000 (Thu, 12 Sep 2013)
Log Message:
-----------
Merged trunk into branch. Includes r60020 to r60061.

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60020
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60061

Modified Paths:
--------------
    branches/soc-2013-cycles_mblur/CMakeLists.txt
    branches/soc-2013-cycles_mblur/intern/ghost/intern/GHOST_WindowWin32.cpp
    branches/soc-2013-cycles_mblur/intern/ghost/intern/GHOST_WindowX11.cpp
    branches/soc-2013-cycles_mblur/intern/ghost/test/gears/GHOST_Test.cpp
    branches/soc-2013-cycles_mblur/intern/ghost/test/multitest/MultiTest.c
    branches/soc-2013-cycles_mblur/release/scripts/startup/bl_operators/uvcalc_lightmap.py
    branches/soc-2013-cycles_mblur/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_DerivedMesh.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_addon.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_ccg.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_colortools.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_editmesh.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_mask.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_navmesh_conversion.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_ocean.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/addon.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/colortools.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/mask.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/mesh_evaluate.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/navmesh_conversion.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/ocean.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/pbvh_bmesh.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/pbvh_intern.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/tracking.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_array.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_bitmap.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_boxpack2d.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_buffer.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_callbacks.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_convexhull2d.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_math_interp.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_math_matrix.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_math_rotation.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/BLI_array.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/boxpack2d.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/buffer.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/callbacks.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/convexhull2d.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/math_interp.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/math_matrix.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/math_rotation.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/smallhash.c
    branches/soc-2013-cycles_mblur/source/blender/blenloader/intern/readfile.c
    branches/soc-2013-cycles_mblur/source/blender/bmesh/intern/bmesh_log.c
    branches/soc-2013-cycles_mblur/source/blender/bmesh/intern/bmesh_log.h
    branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_hull.c
    branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_wireframe.c
    branches/soc-2013-cycles_mblur/source/blender/compositor/intern/COM_ExecutionGroup.cpp
    branches/soc-2013-cycles_mblur/source/blender/compositor/operations/COM_RenderLayersProg.cpp
    branches/soc-2013-cycles_mblur/source/blender/compositor/operations/COM_RenderLayersProg.h
    branches/soc-2013-cycles_mblur/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
    branches/soc-2013-cycles_mblur/source/blender/datatoc/datatoc.c
    branches/soc-2013-cycles_mblur/source/blender/editors/include/UI_interface.h
    branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface.c
    branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface_intern.h
    branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface_regions.c
    branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface_templates.c
    branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface_widgets.c
    branches/soc-2013-cycles_mblur/source/blender/editors/mesh/editface.c
    branches/soc-2013-cycles_mblur/source/blender/editors/mesh/mesh_navmesh.c
    branches/soc-2013-cycles_mblur/source/blender/editors/physics/dynamicpaint_ops.c
    branches/soc-2013-cycles_mblur/source/blender/editors/space_info/textview.c
    branches/soc-2013-cycles_mblur/source/blender/editors/space_text/text_intern.h
    branches/soc-2013-cycles_mblur/source/blender/editors/transform/transform.c
    branches/soc-2013-cycles_mblur/source/blender/editors/transform/transform_conversions.c
    branches/soc-2013-cycles_mblur/source/blender/editors/uvedit/uvedit_parametrizer.c
    branches/soc-2013-cycles_mblur/source/blender/editors/uvedit/uvedit_parametrizer.h
    branches/soc-2013-cycles_mblur/source/blender/editors/uvedit/uvedit_unwrap_ops.c
    branches/soc-2013-cycles_mblur/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp
    branches/soc-2013-cycles_mblur/source/blender/freestyle/intern/stroke/TextStrokeRenderer.h
    branches/soc-2013-cycles_mblur/source/blender/gpu/GPU_extensions.h
    branches/soc-2013-cycles_mblur/source/blender/gpu/intern/gpu_extensions.c
    branches/soc-2013-cycles_mblur/source/blender/imbuf/IMB_colormanagement.h
    branches/soc-2013-cycles_mblur/source/blender/imbuf/intern/IMB_colormanagement_intern.h
    branches/soc-2013-cycles_mblur/source/blender/imbuf/intern/IMB_indexer.h
    branches/soc-2013-cycles_mblur/source/blender/imbuf/intern/colormanagement.c
    branches/soc-2013-cycles_mblur/source/blender/imbuf/intern/indexer.c
    branches/soc-2013-cycles_mblur/source/blender/imbuf/intern/indexer_dv.c
    branches/soc-2013-cycles_mblur/source/blender/makesdna/DNA_freestyle_types.h
    branches/soc-2013-cycles_mblur/source/blender/makesdna/DNA_linestyle_types.h
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_ID.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_access.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_action.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_actuator.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_animviz.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_armature.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_boid.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_brush.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_color.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_controller.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_dynamicpaint.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_key.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_mask.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_material.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_mesh.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_mesh_api.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_meta.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_nla.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_nodetree.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_object.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_packedfile.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_particle.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_property.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_rigidbody.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_sensor.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_sequencer.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_space.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_text.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_texture.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_tracking.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_wm.c
    branches/soc-2013-cycles_mblur/source/blender/modifiers/intern/MOD_meshcache_util.c
    branches/soc-2013-cycles_mblur/source/blender/nodes/composite/node_composite_tree.c
    branches/soc-2013-cycles_mblur/source/blender/nodes/intern/node_exec.c
    branches/soc-2013-cycles_mblur/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2013-cycles_mblur/source/blender/python/mathutils/mathutils_geometry.c
    branches/soc-2013-cycles_mblur/source/blender/render/intern/include/texture_ocean.h
    branches/soc-2013-cycles_mblur/source/blender/render/intern/source/external_engine.c
    branches/soc-2013-cycles_mblur/source/blender/render/intern/source/texture_ocean.c
    branches/soc-2013-cycles_mblur/source/blender/windowmanager/intern/wm_playanim.c
    branches/soc-2013-cycles_mblur/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/soc-2013-cycles_mblur/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    branches/soc-2013-cycles_mblur/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
    branches/soc-2013-cycles_mblur/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h

Property Changed:
----------------
    branches/soc-2013-cycles_mblur/
    branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface.c


Property changes on: branches/soc-2013-cycles_mblur
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-depsgraph_mt:57516,57900,57939-57940,57945,57958-57961,58151,58155-58156,58169,58277-58279,58282-58283,58711,58787,58789,58796,59086-59087,59163,59166,59170,59181,59259-59260
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835,59032,59214,59220,59251,59601
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-60019
   + /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-depsgraph_mt:57516,57900,57939-57940,57945,57958-57961,58151,58155-58156,58169,58277-58279,58282-58283,58711,58787,58789,58796,59086-59087,59163,59166,59170,59181,59259-59260
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835,59032,59214,59220,59251,59601
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-60061

Modified: branches/soc-2013-cycles_mblur/CMakeLists.txt
===================================================================
--- branches/soc-2013-cycles_mblur/CMakeLists.txt	2013-09-12 04:02:31 UTC (rev 60061)
+++ branches/soc-2013-cycles_mblur/CMakeLists.txt	2013-09-12 04:23:06 UTC (rev 60062)
@@ -1624,7 +1624,7 @@
 		endif()
 
 	if(WITH_JACK)
-		set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -weak_framework jackmp")
+		set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -F/Library/Frameworks -weak_framework jackmp")
 	endif()
 
 	else()
@@ -1784,8 +1784,14 @@
 		set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
 	endif()
 
-	# Xcode 5 has too low template depth of 128 for libmv
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
+	if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+		if(${CMAKE_GENERATOR} MATCHES "Xcode")
+			if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
+				# Xcode 5 has too low template depth of 128 for libmv
+				set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
+			endif()
+		endif()
+	endif()
 endif()
 
 #-----------------------------------------------------------------------------

Modified: branches/soc-2013-cycles_mblur/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/soc-2013-cycles_mblur/intern/ghost/intern/GHOST_WindowWin32.cpp	2013-09-12 04:02:31 UTC (rev 60061)
+++ branches/soc-2013-cycles_mblur/intern/ghost/intern/GHOST_WindowWin32.cpp	2013-09-12 04:23:06 UTC (rev 60062)
@@ -178,10 +178,19 @@
 	if (state != GHOST_kWindowStateFullScreen) {
 		RECT rect;
 
+		int framex = GetSystemMetrics(SM_CXSIZEFRAME);
+		int framey = GetSystemMetrics(SM_CYSIZEFRAME);
+		int caption = GetSystemMetrics(SM_CYCAPTION);
+		width += framex * 2;
+		height += framey * 2 + caption;
+
+		left -= framex;
+		top -= (caption+framey);
+
 		rect.left = left;
-		rect.right = left + width;
+		rect.right = left + width + framex;
 		rect.top = top;
-		rect.bottom = top + height;
+		rect.bottom = top + height + caption - framey;
 
 		int wintype = WS_OVERLAPPEDWINDOW;
 		if (m_parentWindowHwnd != 0)

Modified: branches/soc-2013-cycles_mblur/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- branches/soc-2013-cycles_mblur/intern/ghost/intern/GHOST_WindowX11.cpp	2013-09-12 04:02:31 UTC (rev 60061)
+++ branches/soc-2013-cycles_mblur/intern/ghost/intern/GHOST_WindowX11.cpp	2013-09-12 04:23:06 UTC (rev 60062)
@@ -182,7 +182,6 @@
 	 * X can find us a visual matching those requirements. */
 
 	int attributes[40], i, samples;
-	Atom atoms[2];
 	int natom;
 	int glxVersionMajor, glxVersionMinor; /* As in GLX major.minor */
 
@@ -405,6 +404,7 @@
 
 	/* The basic for a good ICCCM "work" */
 	if (m_system->m_atom.WM_PROTOCOLS) {
+		Atom atoms[2];
 		natom = 0;
 
 		if (m_system->m_atom.WM_DELETE_WINDOW) {

Modified: branches/soc-2013-cycles_mblur/intern/ghost/test/gears/GHOST_Test.cpp
===================================================================
--- branches/soc-2013-cycles_mblur/intern/ghost/test/gears/GHOST_Test.cpp	2013-09-12 04:02:31 UTC (rev 60061)
+++ branches/soc-2013-cycles_mblur/intern/ghost/test/gears/GHOST_Test.cpp	2013-09-12 04:23:06 UTC (rev 60062)
@@ -715,13 +715,16 @@
 
 		// Add the application as event consumer
 		fSystem->addEventConsumer(&app);
-                
+
 		// Enter main loop
 		while (!app.m_exitRequested) {
 			//printf("main: loop\n");
 			fSystem->processEvents(true);
 			fSystem->dispatchEvents();
 		}
+
+		// Remove so ghost doesn't do a double free
+		fSystem->removeEventConsumer(&app);
 	}
 
 	// Dispose the system

Modified: branches/soc-2013-cycles_mblur/intern/ghost/test/multitest/MultiTest.c
===================================================================
--- branches/soc-2013-cycles_mblur/intern/ghost/test/multitest/MultiTest.c	2013-09-12 04:02:31 UTC (rev 60061)
+++ branches/soc-2013-cycles_mblur/intern/ghost/test/multitest/MultiTest.c	2013-09-12 04:23:06 UTC (rev 60062)
@@ -931,11 +931,13 @@
 	
 int main(int argc, char **argv)
 {
+	MultiTestApp *app;
+
 #ifndef USE_BMF
 	BLF_init(11, 72);
 #endif
 
-	MultiTestApp *app = multitestapp_new();
+	app = multitestapp_new();
 	
 	multitestapp_run(app);
 	multitestapp_free(app);

Modified: branches/soc-2013-cycles_mblur/release/scripts/startup/bl_operators/uvcalc_lightmap.py
===================================================================
--- branches/soc-2013-cycles_mblur/release/scripts/startup/bl_operators/uvcalc_lightmap.py	2013-09-12 04:02:31 UTC (rev 60061)
+++ branches/soc-2013-cycles_mblur/release/scripts/startup/bl_operators/uvcalc_lightmap.py	2013-09-12 04:23:06 UTC (rev 60062)
@@ -24,15 +24,16 @@
 
 
 class prettyface(object):
-    __slots__ = ("uv",
-                 "width",
-                 "height",
-                 "children",
-                 "xoff",
-                 "yoff",
-                 "has_parent",
-                 "rot",
-                 )
+    __slots__ = (
+        "uv",
+        "width",
+        "height",
+        "children",
+        "xoff",
+        "yoff",
+        "has_parent",
+        "rot",
+        )
 
     def __init__(self, data):
         self.has_parent = False
@@ -94,9 +95,44 @@
             # cos = [v.co for v in data]
             cos = [data.id_data.vertices[v].co for v in data.vertices]  # XXX25
 
-            self.width = ((cos[0] - cos[1]).length + (cos[2] - cos[3]).length) / 2.0
-            self.height = ((cos[1] - cos[2]).length + (cos[0] - cos[3]).length) / 2.0
+            if len(self.uv) == 4:
+                self.width = ((cos[0] - cos[1]).length + (cos[2] - cos[3]).length) / 2.0
+                self.height = ((cos[1] - cos[2]).length + (cos[0] - cos[3]).length) / 2.0
+            else:
+                # ngon, note:
+                # for ngons to calculate the width/height we need to do the
+                # whole projection, unlike other faces
+                # we store normalized UV's in the faces coords to avoid
+                # calculating the projection and rotating it twice.
 
+                no = data.normal
+                r = no.rotation_difference(mathutils.Vector((0.0, 0.0, 1.0)))
+                cos_2d = [(r * co).xy for co in cos]
+                # print(cos_2d)
+                angle = mathutils.geometry.box_fit_2d(cos_2d)
+
+                mat = mathutils.Matrix.Rotation(angle, 2)
+                cos_2d = [(mat * co) for co in cos_2d]
+                xs = [co.x for co in cos_2d]
+                ys = [co.y for co in cos_2d]
+
+                xmin = min(xs)
+                ymin = min(ys)
+                xmax = max(xs)
+                ymax = max(ys)
+
+                xspan = xmax - xmin
+                yspan = ymax - ymin
+
+                self.width = xspan
+                self.height = yspan
+
+                # ngons work different, we store projected result
+                # in UV's to avoid having to re-project later.
+                for i, co in enumerate(cos_2d):
+                    self.uv[i][:] = ((co.x - xmin) / xspan,
+                                     (co.y - ymin) / yspan)
+
             self.children = []
 
     def spin(self):
@@ -105,7 +141,7 @@
 
         self.width, self.height = self.height, self.width
         self.xoff, self.yoff = self.yoff, self.xoff  # not needed?
-        self.rot = not self.rot  # only for tri pairs.
+        self.rot = not self.rot  # only for tri pairs and ngons.
         # print("spinning")
         for pf in self.children:
             pf.spin()
@@ -178,10 +214,19 @@
                 set_uv(f, (x2, y2), (x2, y1 + margin_h), (x1 + margin_w, y2))
 
         else:  # 1 QUAD
-            uv[1][:] = x1, y1
-            uv[2][:] = x1, y2
-            uv[3][:] = x2, y2
-            uv[0][:] = x2, y1
+            if len(uv) == 4:
+                uv[1][:] = x1, y1
+                uv[2][:] = x1, y2
+                uv[3][:] = x2, y2
+                uv[0][:] = x2, y1

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list