Add Chromium-only Blender WebEngine parity work

This commit is contained in:
mes123456
2026-08-12 04:47:48 -04:00
commit 9fd26010f6
18225 changed files with 11622124 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: 2023 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
set(INC
../include
../../makesrna
# RNA_prototypes.hh
${CMAKE_BINARY_DIR}/source/blender/makesrna
)
set(INC_SYS
)
set(SRC
geometry_attributes.cc
geometry_ops.cc
geometry_randomization.cc
node_group_operator.cc
geometry_intern.hh
)
set(LIB
PRIVATE bf::asset_system
PRIVATE bf::blenkernel
PRIVATE bf::blenlib
PRIVATE bf::blentranslation
PRIVATE bf::bmesh
PRIVATE bf::depsgraph
PRIVATE bf::dna
bf_editor_object
PRIVATE bf::functions
PRIVATE bf::intern::guardedalloc
PRIVATE bf::nodes
PRIVATE bf::windowmanager
PRIVATE bf::extern::xxhash
)
blender_add_lib(bf_editor_geometry "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
# RNA_prototypes.hh dna_type_offsets.h
add_dependencies(bf_editor_geometry bf_rna)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
/* SPDX-FileCopyrightText: 2020 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup edgeometry
*/
#pragma once
namespace blender {
struct wmOperatorType;
namespace ed::geometry {
/* *** geometry_attributes.cc *** */
void GEOMETRY_OT_attribute_add(wmOperatorType *ot);
void GEOMETRY_OT_attribute_remove(wmOperatorType *ot);
void GEOMETRY_OT_color_attribute_add(wmOperatorType *ot);
void GEOMETRY_OT_color_attribute_remove(wmOperatorType *ot);
void GEOMETRY_OT_color_attribute_render_set(wmOperatorType *ot);
void GEOMETRY_OT_color_attribute_duplicate(wmOperatorType *ot);
void GEOMETRY_OT_attribute_convert(wmOperatorType *ot);
void GEOMETRY_OT_color_attribute_convert(wmOperatorType *ot);
void GEOMETRY_OT_geometry_randomization(wmOperatorType *ot);
} // namespace ed::geometry
} // namespace blender

View File

@@ -0,0 +1,32 @@
/* SPDX-FileCopyrightText: 2020 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup edgeometry
*/
#include "WM_api.hh"
#include "ED_geometry.hh"
#include "geometry_intern.hh"
/**************************** registration **********************************/
namespace blender::ed::geometry {
void operatortypes_geometry()
{
WM_operatortype_append(GEOMETRY_OT_attribute_add);
WM_operatortype_append(GEOMETRY_OT_attribute_remove);
WM_operatortype_append(GEOMETRY_OT_color_attribute_add);
WM_operatortype_append(GEOMETRY_OT_color_attribute_remove);
WM_operatortype_append(GEOMETRY_OT_color_attribute_render_set);
WM_operatortype_append(GEOMETRY_OT_color_attribute_duplicate);
WM_operatortype_append(GEOMETRY_OT_attribute_convert);
WM_operatortype_append(GEOMETRY_OT_color_attribute_convert);
WM_operatortype_append(GEOMETRY_OT_geometry_randomization);
}
} // namespace blender::ed::geometry

View File

@@ -0,0 +1,62 @@
/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#include "WM_api.hh"
#include "BLI_listbase.h"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_main.hh"
#include "DEG_depsgraph.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "geometry_intern.hh"
namespace blender::ed::geometry {
static wmOperatorStatus geometry_randomization_invoke(bContext *C,
wmOperator *op,
const wmEvent *event)
{
RNA_boolean_set(op->ptr, "value", G.randomize_geometry_element_order);
return WM_operator_props_popup(C, op, event);
}
static wmOperatorStatus geometry_randomization_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
G.randomize_geometry_element_order = RNA_boolean_get(op->ptr, "value");
for (Object &object : bmain->objects) {
DEG_id_tag_update(&object.id, ID_RECALC_GEOMETRY);
}
WM_event_add_notifier(C, NC_WINDOW, nullptr);
return OPERATOR_FINISHED;
}
void GEOMETRY_OT_geometry_randomization(wmOperatorType *ot)
{
ot->name = "Set Geometry Randomization";
ot->idname = "GEOMETRY_OT_geometry_randomization";
ot->description = "Toggle geometry randomization for debugging purposes";
ot->exec = geometry_randomization_exec;
ot->invoke = geometry_randomization_invoke;
ot->flag |= OPTYPE_UNDO | OPTYPE_REGISTER;
RNA_def_boolean(ot->srna,
"value",
false,
"Value",
"Randomize the order of geometry elements (e.g. vertices or edges) after some "
"operations where there are no guarantees about the order. This avoids "
"accidentally depending on something that may change in the future");
}
} // namespace blender::ed::geometry

File diff suppressed because it is too large Load Diff