Fixes T97706 Adds operator to duplicate the active color attribute layer. Adds `"Color Attribute Specials"` menu to color attribute ui to access the `"geometry.color_attribute_duplicate"` operator. Internally adds a function that duplicates a referenced CustomDataLayer - `BKE_id_attribute_duplicate` mostly copies the existing `BKE_id_attribute_new` - but gets the type and domain from the referenced layer - and copies the data from the old layer into the new layer Reviewed By: Joseph Eagar & Hans Goudey & Julien Kaspar Differential Revision: https://developer.blender.org/D14823 Ref D14823
24 lines
755 B
C++
24 lines
755 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright 2020 Blender Foundation. All rights reserved. */
|
|
|
|
/** \file
|
|
* \ingroup edgeometry
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
struct wmOperatorType;
|
|
|
|
namespace blender::ed::geometry {
|
|
|
|
/* *** geometry_attributes.cc *** */
|
|
void GEOMETRY_OT_attribute_add(struct wmOperatorType *ot);
|
|
void GEOMETRY_OT_attribute_remove(struct wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_add(struct wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_remove(struct wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_render_set(struct wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_duplicate(struct wmOperatorType *ot);
|
|
void GEOMETRY_OT_attribute_convert(struct wmOperatorType *ot);
|
|
|
|
} // namespace blender::ed::geometry
|