[Bf-blender-cvs] [72382baea89] greasepencil-object: GPencil: Undo any difference with master
Antonio Vazquez
noreply at git.blender.org
Wed Mar 24 17:09:42 CET 2021
Commit: 72382baea893a93ddef8fcb9ed00ce53daef80f9
Author: Antonio Vazquez
Date: Wed Mar 24 17:09:32 2021 +0100
Branches: greasepencil-object
https://developer.blender.org/rB72382baea893a93ddef8fcb9ed00ce53daef80f9
GPencil: Undo any difference with master
This keeps the branch equal ready for new developments and tests.
===================================================================
M source/blender/editors/object/object_add.c
M source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
M source/blender/io/gpencil/intern/gpencil_io_capi.cc
D source/blender/io/gpencil/intern/gpencil_io_export_base.cc
M source/blender/io/gpencil/intern/gpencil_io_import_base.cc
M source/blender/makesdna/DNA_gpencil_types.h
M source/blender/makesrna/intern/rna_gpencil.c
M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
===================================================================
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index e4527740164..b3fb497aa9a 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1440,7 +1440,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static const EnumPropertyItem *object_gpencil_add_options(bContext *C,
+static const EnumPropertyItem *object_gpencil_add_options(bContext *UNUSED(C),
PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop),
bool *r_free)
@@ -1453,18 +1453,9 @@ static const EnumPropertyItem *object_gpencil_add_options(bContext *C,
/* Default types. */
for (i = 0; i < orig_count; i++) {
- if (item_ref[i].value == GP_LRT_OBJECT || item_ref[i].value == GP_LRT_COLLECTION ||
- item_ref[i].value == GP_LRT_SCENE) {
- if (item_ref[i].value == GP_LRT_SCENE) {
- /* separator before line art types */
- RNA_enum_item_add_separator(&item, &totitem);
- }
- else if (item_ref[i].value == GP_LRT_OBJECT) {
- Object *ob = CTX_data_active_object(C);
- if (!ob || ob->type != OB_MESH) {
- continue;
- }
- }
+ if (item_ref[i].value == GP_LRT_SCENE) {
+ /* separator before line art types */
+ RNA_enum_item_add_separator(&item, &totitem);
}
RNA_enum_item_add(&item, &totitem, &item_ref[i]);
}
diff --git a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
index 89c9960a24f..f00cf3c34c0 100644
--- a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
+++ b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
@@ -148,6 +148,14 @@ void TreeDisplayViewLayer::add_layer_collections_recursive(ListBase &tree,
if (!exclude && show_objects_) {
add_layer_collection_objects(ten->subtree, *lc, *ten);
}
+
+ const bool lib_overrides_visible = !SUPPORT_FILTER_OUTLINER(&space_outliner_) ||
+ ((space_outliner_.filter & SO_FILTER_NO_LIB_OVERRIDE) == 0);
+
+ if (lib_overrides_visible && ID_IS_OVERRIDE_LIBRARY_REAL(&lc->collection->id)) {
+ outliner_add_element(
+ &space_outliner_, &ten->subtree, &lc->collection->id, ten, TSE_LIBRARY_OVERRIDE_BASE, 0);
+ }
}
}
diff --git a/source/blender/io/gpencil/intern/gpencil_io_capi.cc b/source/blender/io/gpencil/intern/gpencil_io_capi.cc
index 34539a66fe8..231d23948ef 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_capi.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_capi.cc
@@ -58,6 +58,7 @@ using blender::io::gpencil::GpencilExporterSVG;
using blender::io::gpencil::GpencilImporterSVG;
/* Check if frame is included. */
+#ifdef WITH_HARU
static bool is_keyframe_included(bGPdata *gpd_, const int32_t framenum, const bool use_selected)
{
/* Check if exist a frame. */
@@ -75,6 +76,7 @@ static bool is_keyframe_included(bGPdata *gpd_, const int32_t framenum, const bo
}
return false;
}
+#endif
/* Import frame. */
static bool gpencil_io_import_frame(void *in_importer, const GpencilIOParams &iparams)
@@ -177,7 +179,7 @@ bool gpencil_io_export(const char *filename, GpencilIOParams *iparams)
Scene *scene_ = CTX_data_scene(iparams->C);
Object *ob = CTX_data_active_object(iparams->C);
- UNUSED_VARS(depsgraph_, scene_, ob);
+ UNUSED_VARS(filename, depsgraph_, scene_, ob);
switch (iparams->mode) {
#ifdef WITH_PUGIXML
diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_base.cc b/source/blender/io/gpencil/intern/gpencil_io_export_base.cc
deleted file mode 100644
index 248c44e3f3d..00000000000
--- a/source/blender/io/gpencil/intern/gpencil_io_export_base.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-/*
- * 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.
- *
- * The Original Code is Copyright (C) 2020 Blender Foundation
- * All rights reserved.
- */
-
-/** \file
- * \ingroup bgpencil
- */
-#include <algorithm>
-#include <cctype>
-#include <iostream>
-#include <string>
-
-#include "BKE_context.h"
-#include "BKE_gpencil.h"
-#include "BKE_gpencil_geom.h"
-#include "BKE_layer.h"
-#include "BKE_main.h"
-#include "BKE_material.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
-#include "BLI_utildefines.h"
-
-#include "DNA_gpencil_types.h"
-#include "DNA_material_types.h"
-#include "DNA_object_types.h"
-#include "DNA_screen_types.h"
-
-#include "UI_view2d.h"
-
-#include "ED_view3d.h"
-
-#include "DEG_depsgraph.h"
-#include "DEG_depsgraph_query.h"
-
-#include "gpencil_io.h"
-#include "gpencil_io_export_base.h"
-
-#include "pugixml.hpp"
-
-namespace blender::io::gpencil {
-
-/* Constructor. */
-GpencilExporter::GpencilExporter(const struct GpencilIOParams *iparams) : GpencilIO(iparams)
-{
- /* Nothing yet */
-}
-} // namespace blender::io::gpencil
diff --git a/source/blender/io/gpencil/intern/gpencil_io_import_base.cc b/source/blender/io/gpencil/intern/gpencil_io_import_base.cc
index b49b4c969ad..2e7cfdeb5cd 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_import_base.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_import_base.cc
@@ -35,8 +35,6 @@
#include "gpencil_io_import_base.h"
-#include "pugixml.hpp"
-
namespace blender::io::gpencil {
/* Constructor. */
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index f985794d864..8facdca2f9c 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -293,7 +293,7 @@ typedef struct bGPDstroke {
/** factor xy of shape for dots gradients */
float aspect_ratio[2];
- /** Factor of opacity for Fill color. */
+ /** Factor of opacity for Fill color (used by opacity modifier). */
float fill_opacity_fac;
/** Min of the bound box used to speedup painting operators. */
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index d34f017e92c..1a0497b72f4 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1738,13 +1738,6 @@ static void rna_def_gpencil_stroke(BlenderRNA *brna)
RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_uv_update");
- /* Fill opacity. */
- prop = RNA_def_property(srna, "fill_opacity", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "fill_opacity_fac");
- RNA_def_property_float_default(prop, 1.0f);
- RNA_def_property_ui_text(prop, "Fill Opacity", "Opacity of the fill area");
- RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
-
/* Vertex Color for Fill. */
prop = RNA_def_property(srna, "vertex_color_fill", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "vert_color_fill");
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
index 72b05dcce70..e9228a2942b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
@@ -223,8 +223,10 @@ Mesh *create_cylinder_or_cone_mesh(const float radius_top,
transform.values,
true);
+ BMeshToMeshParams params{};
+ params.calc_object_remap = false;
Mesh *mesh = (Mesh *)BKE_id_new_nomain(ID_ME, nullptr);
- BM_mesh_bm_to_me_for_eval(bm, mesh, nullptr);
+ BM_mesh_bm_to_me(nullptr, bm, mesh, ¶ms);
BM_mesh_free(bm);
return mesh;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
index 1803a13f651..f8a9bfd2ed1 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
@@ -50,8 +50,10 @@ static Mesh *create_cube_mesh(const float size)
size,
true);
+ BMeshToMeshParams params{};
+ params.calc_object_remap = false;
Mesh *mesh = (Mesh *)BKE_id_new_nomain(ID_ME, nullptr);
- BM_mesh_bm_to_me_for_eval(bm, mesh, nullptr);
+ BM_mesh_bm_to_me(nullptr, bm, mesh, ¶ms);
BM_mesh_free(bm);
return mesh;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
index f16b37fe977..242cc6ed7df 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
@@ -52,8 +52,10 @@ static Mesh *create_ico_sphere_mesh(const int subdivisions, const float radius)
transform.values,
true);
+ BMeshToMeshParams params{};
+ params.calc_object_remap = false;
Mesh *mesh = (Mesh *)BKE_id_new_nomain(ID_ME, nullptr);
- BM_mesh_bm_to_me_for_eval(bm, mesh, nullptr);
+ BM_mesh_bm_to_me(nullptr, bm, mesh, ¶ms);
BM_mesh_free(bm);
return mesh;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
index b7d249c18bc..8efba91da1a 100644
--- a/source/blend
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list