[Bf-blender-cvs] [100e9aa15f8] blender2.8: Draw Manager: Texture space support for Curve and Metaball objects

Germano noreply at git.blender.org
Thu Dec 14 20:53:38 CET 2017


Commit: 100e9aa15f808bfc9cd0cc6c0abc892587cf9f34
Author: Germano
Date:   Thu Dec 14 17:53:27 2017 -0200
Branches: blender2.8
https://developer.blender.org/rB100e9aa15f808bfc9cd0cc6c0abc892587cf9f34

Draw Manager: Texture space support for Curve and Metaball objects

===================================================================

M	source/blender/draw/intern/draw_manager.c

===================================================================

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 264fc079e42..525289f51b9 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -33,6 +33,7 @@
 
 #include "BIF_glutil.h"
 
+#include "BKE_curve.h"
 #include "BKE_global.h"
 #include "BKE_mesh.h"
 #include "BKE_object.h"
@@ -47,10 +48,12 @@
 #include "DRW_render.h"
 
 #include "DNA_camera_types.h"
+#include "DNA_curve_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
+#include "DNA_meta_types.h"
 
 #include "ED_space_api.h"
 #include "ED_screen.h"
@@ -1870,8 +1873,24 @@ static void draw_geometry(DRWShadingGroup *shgroup, Gwn_Batch *geom, const float
 			case ID_ME:
 				BKE_mesh_texspace_get_reference((Mesh *)ob_data, NULL, &texcoloc, NULL, &texcosize);
 				break;
+			case ID_CU:
+			{
+				Curve *cu = (Curve *)ob_data;
+				if (cu->bb == NULL || (cu->bb->flag & BOUNDBOX_DIRTY)) {
+					BKE_curve_texspace_calc(cu);
+				}
+				texcoloc = cu->loc;
+				texcosize = cu->size;
+				break;
+			}
+			case ID_MB:
+			{
+				MetaBall *mb = (MetaBall *)ob_data;
+				texcoloc = mb->loc;
+				texcosize = mb->size;
+				break;
+			}
 			default:
-				/* TODO, curve, metaball? */
 				break;
 		}
 	}



More information about the Bf-blender-cvs mailing list