[Bf-blender-cvs] [fbb7036b5b8] temp-lineart-contained: LineArt: change ED_ to MOD_
YimingWu
noreply at git.blender.org
Fri Mar 12 12:29:22 CET 2021
Commit: fbb7036b5b8a702c5a99ac00bf281352ad33c100
Author: YimingWu
Date: Fri Mar 12 19:23:57 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rBfbb7036b5b8a702c5a99ac00bf281352ad33c100
LineArt: change ED_ to MOD_
===================================================================
M source/blender/editors/object/object_ops.c
M source/blender/gpencil_modifiers/CMakeLists.txt
A source/blender/gpencil_modifiers/MOD_gpencil_lineart.h
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
R085 source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
M source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
M source/blender/gpencil_modifiers/intern/lineart/lineart_util.c
===================================================================
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 2dc72474d5f..6680fb99ead 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -38,7 +38,7 @@
#include "object_intern.h"
// TODO: Not nice, but here in the mean time to just try out the LineArt bake operators
-#include "../../gpencil_modifiers/intern/lineart/ED_lineart.h"
+#include "MOD_gpencil_lineart.h"
/* ************************** registration **********************************/
@@ -156,7 +156,9 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_gpencil_modifier_apply);
WM_operatortype_append(OBJECT_OT_gpencil_modifier_copy);
WM_operatortype_append(OBJECT_OT_gpencil_modifier_copy_to_selected);
- ED_operatortypes_lineart();
+
+ /* grease pencil line art */
+ WM_operatortypes_lineart();
/* Shader FX. */
WM_operatortype_append(OBJECT_OT_shaderfx_add);
diff --git a/source/blender/gpencil_modifiers/CMakeLists.txt b/source/blender/gpencil_modifiers/CMakeLists.txt
index de153b06fa4..e3bb0d773a2 100644
--- a/source/blender/gpencil_modifiers/CMakeLists.txt
+++ b/source/blender/gpencil_modifiers/CMakeLists.txt
@@ -79,7 +79,7 @@ set(SRC
intern/lineart/lineart_util.c
intern/lineart/lineart_intern.h
- intern/lineart/ED_lineart.h
+ intern/lineart/MOD_lineart.h
)
diff --git a/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h b/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h
new file mode 100644
index 00000000000..685f0cb36cb
--- /dev/null
+++ b/source/blender/gpencil_modifiers/MOD_gpencil_lineart.h
@@ -0,0 +1,31 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/** \file
+ * \ingroup modifiers
+ */
+
+#pragma once
+
+#include "DNA_windowmanager_types.h"
+
+/* Operator types should be in exposed header. */
+void OBJECT_OT_lineart_bake_strokes(struct wmOperatorType *ot);
+void OBJECT_OT_lineart_bake_strokes_all(struct wmOperatorType *ot);
+void OBJECT_OT_lineart_clear(struct wmOperatorType *ot);
+void OBJECT_OT_lineart_clear_all(struct wmOperatorType *ot);
+
+void WM_operatortypes_lineart(void);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 70f3cc8c537..0956373c332 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -39,7 +39,7 @@
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
-#include "lineart/ED_lineart.h"
+#include "lineart/MOD_lineart.h"
#include "BKE_collection.h"
#include "BKE_context.h"
@@ -90,7 +90,7 @@ static void generate_strokes_actual(
printf("LRT: Generating from modifier.\n");
}
- ED_lineart_gpencil_generate(
+ MOD_lineart_gpencil_generate(
lmd->render_buffer,
depsgraph,
ob,
@@ -160,11 +160,11 @@ static void generateStrokes(GpencilModifierData *md, Depsgraph *depsgraph, Objec
return;
}
- ED_lineart_compute_feature_lines(depsgraph, lmd);
+ MOD_lineart_compute_feature_lines(depsgraph, lmd);
generate_strokes_actual(md, depsgraph, ob, gpl, gpf);
- ED_lineart_destroy_render_data(lmd);
+ MOD_lineart_destroy_render_data(lmd);
WM_main_add_notifier(NA_EDITED | NC_GPENCIL, NULL);
}
@@ -186,11 +186,11 @@ static void bakeModifier(Main *UNUSED(bmain),
return;
}
- ED_lineart_compute_feature_lines(depsgraph, lmd);
+ MOD_lineart_compute_feature_lines(depsgraph, lmd);
generate_strokes_actual(md, depsgraph, ob, gpl, gpf);
- ED_lineart_destroy_render_data(lmd);
+ MOD_lineart_destroy_render_data(lmd);
}
static bool isDisabled(GpencilModifierData *md, int UNUSED(userRenderParams))
diff --git a/source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
similarity index 85%
rename from source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h
rename to source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
index 67b2bbfdc36..d1254a5f76d 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
@@ -29,7 +29,6 @@
#include "BLI_threads.h"
#include "DNA_lineart_types.h"
-#include "DNA_windowmanager_types.h"
#include <math.h>
#include <string.h>
@@ -497,62 +496,56 @@ struct Scene;
struct LineartRenderBuffer;
struct LineartGpencilModifierData;
-void ED_lineart_destroy_render_data(struct LineartGpencilModifierData *lmd);
+void MOD_lineart_destroy_render_data(struct LineartGpencilModifierData *lmd);
-void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb);
-void ED_lineart_chain_split_for_fixed_occlusion(LineartRenderBuffer *rb);
-void ED_lineart_chain_connect(LineartRenderBuffer *rb, const bool do_geometry_space);
-void ED_lineart_chain_discard_short(LineartRenderBuffer *rb, const float threshold);
-void ED_lineart_chain_split_angle(LineartRenderBuffer *rb, float angle_threshold_rad);
+void MOD_lineart_chain_feature_lines(LineartRenderBuffer *rb);
+void MOD_lineart_chain_split_for_fixed_occlusion(LineartRenderBuffer *rb);
+void MOD_lineart_chain_connect(LineartRenderBuffer *rb, const bool do_geometry_space);
+void MOD_lineart_chain_discard_short(LineartRenderBuffer *rb, const float threshold);
+void MOD_lineart_chain_split_angle(LineartRenderBuffer *rb, float angle_threshold_rad);
-int ED_lineart_chain_count(const LineartRenderLineChain *rlc);
-void ED_lineart_chain_clear_picked_flag(struct LineartRenderBuffer *rb);
+int MOD_lineart_chain_count(const LineartRenderLineChain *rlc);
+void MOD_lineart_chain_clear_picked_flag(struct LineartRenderBuffer *rb);
-int ED_lineart_compute_feature_lines(struct Depsgraph *depsgraph,
- struct LineartGpencilModifierData *lmd);
+int MOD_lineart_compute_feature_lines(struct Depsgraph *depsgraph,
+ struct LineartGpencilModifierData *lmd);
struct Scene;
-LineartBoundingArea *ED_lineart_get_point_bounding_area_rb(LineartRenderBuffer *rb,
- double x,
- double y);
+LineartBoundingArea *MOD_lineart_get_point_bounding_area_rb(LineartRenderBuffer *rb,
+ double x,
+ double y);
-LineartBoundingArea *ED_lineart_get_point_bounding_area_deep_rb(LineartRenderBuffer *rb,
- double x,
- double y);
+LineartBoundingArea *MOD_lineart_get_point_bounding_area_deep_rb(LineartRenderBuffer *rb,
+ double x,
+ double y);
struct bGPDlayer;
struct bGPDframe;
struct GpencilModifierData;
-void ED_lineart_gpencil_generate(LineartRenderBuffer *rb,
- struct Depsgraph *depsgraph,
- struct Object *ob,
- struct bGPDlayer *gpl,
- struct bGPDframe *gpf,
- char source_type,
- void *source_reference,
- int level_start,
- int level_end,
- int mat_nr,
- short line_types,
- unsigned char transparency_flags,
- unsigned char transparency_mask,
- short thickness,
- float opacity,
- float pre_sample_length,
- const char *source_vgname,
- const char *vgname,
- int modifier_flags);
-
-float ED_lineart_chain_compute_length(LineartRenderLineChain *rlc);
+void MOD_lineart_gpencil_generate(LineartRenderBuffer *rb,
+ struct Depsgraph *depsgraph,
+ struct Object *ob,
+ struct bGPDlayer *gpl,
+ struct bGPDframe *gpf,
+ char source_type,
+ void *source_reference,
+ int level_start,
+ int level_end,
+ int mat_nr,
+ short line_types,
+ unsigned char transparency_flags,
+ unsigned char transparency_mask,
+ short thickness,
+ float opacity,
+ float pre_sample_length,
+ const char *source_vgname,
+ const char *vgname,
+ int modifier_flags);
+
+float MOD_lineart_chain_compute_length(LineartRenderLineChain *rlc);
struct wmOperatorType;
-/* Operator types */
-void OBJECT_OT_lineart_bake_strokes(struct wmOperatorType *ot);
-void OBJECT_OT_lineart_bake_strokes_all(struct wmOperatorType *ot);
-void OBJECT_OT_
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list