Add Chromium-only Blender WebEngine parity work
This commit is contained in:
44
blender-5.2.0/source/blender/editors/geometry/CMakeLists.txt
Normal file
44
blender-5.2.0/source/blender/editors/geometry/CMakeLists.txt
Normal 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)
|
||||
1214
blender-5.2.0/source/blender/editors/geometry/geometry_attributes.cc
Normal file
1214
blender-5.2.0/source/blender/editors/geometry/geometry_attributes.cc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
2151
blender-5.2.0/source/blender/editors/geometry/node_group_operator.cc
Normal file
2151
blender-5.2.0/source/blender/editors/geometry/node_group_operator.cc
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user