Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-08-04 16:59:57 +0300
committerAntonioya <blendergit@gmail.com>2018-08-04 16:59:57 +0300
commitccf794dfc4c84e9831c48defa4dbb43b9e5bf63f (patch)
treea4820965444c7b7a8ab6087d0cfa8f514210729d /source/blender/gpencil_modifiers
parent4edae3cc2d1eecc028d3f790136ff5a0ffa8ef2f (diff)
GP: Fix stupid mistake in mirror modifier
The object can be NULL. This was a line used in debug that it was not removed. Also removed an old function not used. Thanks to Charlie Jolly for catching this error.
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
index d4e8e8d3cff..a01ed4da695 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
@@ -73,29 +73,6 @@ static void copyData(const GpencilModifierData *md, GpencilModifierData *target)
BKE_gpencil_modifier_copyData_generic(md, target);
}
-static void clip_stroke(MirrorGpencilModifierData *mmd, bGPDstroke *gps)
-{
- int i;
- bGPDspoint *pt;
- float fpt[3];
- if ((mmd->flag & GP_MIRROR_CLIPPING) == 0) {
- return;
- }
-
- for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
- copy_v3_v3(fpt, &pt->x);
- for (int xi = 0; xi < 3; ++xi) {
- if (mmd->flag & (GP_MIRROR_AXIS_X << xi)) {
- if (fpt[xi] >= 0.0f) {
- fpt[xi] = 0.0f;
- }
- }
- }
- copy_v3_v3(&pt->x, fpt);
- }
-
-}
-
static void update_position(Object *ob, MirrorGpencilModifierData *mmd, bGPDstroke *gps, int axis)
{
int i;
@@ -150,9 +127,6 @@ static void generateStrokes(
ob, mmd->layername, mmd->pass_index, 1, gpl, gps,
mmd->flag & GP_MIRROR_INVERT_LAYER, mmd->flag & GP_MIRROR_INVERT_PASS))
{
- /* clip before duplicate */
- clip_stroke(mmd, gps);
-
gps_new = BKE_gpencil_stroke_duplicate(gps);
update_position(ob, mmd, gps_new, xi);
BLI_addtail(&gpf->strokes, gps_new);
@@ -171,9 +145,6 @@ static void bakeModifier(
bGPdata *gpd = ob->data;
int oldframe = (int)DEG_get_ctime(depsgraph);
- if (mmd->object == NULL)
- return;
-
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
/* apply mirror effects on this frame */