[Bf-blender-cvs] [16ddb6a6f7a] soc-2019-npr: LANPR: use ED_ functions for SVG export.

YimingWu noreply at git.blender.org
Wed Jul 10 14:30:45 CEST 2019


Commit: 16ddb6a6f7a80d4d9c41f287be726059bfa5b54c
Author: YimingWu
Date:   Wed Jul 10 20:28:26 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rB16ddb6a6f7a80d4d9c41f287be726059bfa5b54c

LANPR: use ED_ functions for SVG export.

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

M	source/blender/draw/engines/lanpr/lanpr_ops.c
M	source/blender/editors/include/ED_svg.h
M	source/blender/editors/io/CMakeLists.txt
M	source/blender/editors/io/io_svg.c

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

diff --git a/source/blender/draw/engines/lanpr/lanpr_ops.c b/source/blender/draw/engines/lanpr/lanpr_ops.c
index 00ab356fb38..5f33d655039 100644
--- a/source/blender/draw/engines/lanpr/lanpr_ops.c
+++ b/source/blender/draw/engines/lanpr/lanpr_ops.c
@@ -25,7 +25,6 @@
 #include "BKE_report.h"
 #include "BKE_screen.h"
 #include "BKE_text.h"
-#include "BKE_writesvg.h"
 #include "GPU_draw.h"
 
 #include "GPU_batch.h"
@@ -47,6 +46,9 @@
 #include "BKE_modifier.h"
 #include "BKE_gpencil.h"
 #include "BKE_gpencil_modifier.h"
+
+#include "ED_svg.h"
+
 #include "lanpr_access.h"
 
 extern LANPR_SharedResource lanpr_share;
@@ -5124,7 +5126,7 @@ static int lanpr_export_svg_exec(bContext *C, wmOperator *op)
 
   for(ll = lanpr->line_layers.first; ll; ll = ll->next){
     Text *ta = BKE_text_add(CTX_data_main(C),"exported_svg");
-    BKE_svg_data_from_lanpr_chain(ta,rb,ll);
+    ED_svg_data_from_lanpr_chain(ta,rb,ll);
   }
 
   return OPERATOR_FINISHED;
diff --git a/source/blender/editors/include/ED_svg.h b/source/blender/editors/include/ED_svg.h
index 554133e3b50..df7d77620ab 100644
--- a/source/blender/editors/include/ED_svg.h
+++ b/source/blender/editors/include/ED_svg.h
@@ -24,7 +24,7 @@
 #ifndef __ED_SVG_H__
 #define __ED_SVG_H__
 
-
+bool ED_svg_data_from_lanpr_chain(Text* ta, struct LANPR_RenderBuffer* rb, struct LANPR_LineLayer* ll);
 bool ED_svg_data_from_gpencil(struct bGPdata* gpd, struct Text* ta, struct bGPDlayer* layer, int frame);
 
 #endif /* __ED_SVG_H__ */
diff --git a/source/blender/editors/io/CMakeLists.txt b/source/blender/editors/io/CMakeLists.txt
index 6797a029267..2bce8d7b413 100644
--- a/source/blender/editors/io/CMakeLists.txt
+++ b/source/blender/editors/io/CMakeLists.txt
@@ -28,6 +28,9 @@ set(INC
   ../../makesrna
   ../../windowmanager
   ../../../../intern/guardedalloc
+
+  # remove this later when lanpr also uses ED_
+  ../../draw/engines/lanpr
 )
 
 set(INC_SYS
diff --git a/source/blender/editors/io/io_svg.c b/source/blender/editors/io/io_svg.c
index 33c995e96d4..925a7bc9afd 100644
--- a/source/blender/editors/io/io_svg.c
+++ b/source/blender/editors/io/io_svg.c
@@ -221,7 +221,7 @@ static int svg_lanpr_get_node_callback(LanprSVGIterator* iterator, float* x, flo
     }
 }
 
-bool BKE_svg_data_from_lanpr_chain(Text* ta, LANPR_RenderBuffer* rb, LANPR_LineLayer* ll){
+bool ED_svg_data_from_lanpr_chain(Text* ta, LANPR_RenderBuffer* rb, LANPR_LineLayer* ll){
     if(!ll || !rb || !rb->chains.first){
         return false;
     }



More information about the Bf-blender-cvs mailing list