Initial Grease Pencil 3.0 stage #106848
|
@ -31,21 +31,44 @@ def generate_from_enum_ex(
|
|||
type,
|
||||
attr,
|
||||
cursor='DEFAULT',
|
||||
tooldef_keywords={},
|
||||
exclude_filter={},
|
||||
tooldef_keywords=None,
|
||||
icon_map=None,
|
||||
use_separators=True,
|
||||
):
|
||||
if tooldef_keywords is None:
|
||||
tooldef_keywords = {}
|
||||
|
||||
tool_defs = []
|
||||
for enum in type.bl_rna.properties[attr].enum_items_static:
|
||||
name = enum.name
|
||||
idname = enum.identifier
|
||||
if idname in exclude_filter:
|
||||
continue
|
||||
|
||||
enum_items = getattr(
|
||||
type.bl_rna.properties[attr],
|
||||
"enum_items_static_ui" if use_separators else
|
||||
"enum_items_static",
|
||||
)
|
||||
|
||||
for enum in enum_items:
|
||||
if use_separators:
|
||||
if not (name := enum.name):
|
||||
# Empty string for a UI Separator.
|
||||
tool_defs.append(None)
|
||||
continue
|
||||
if not (idname := enum.identifier):
|
||||
# This is a heading, there is no purpose in showing headings here.
|
||||
continue
|
||||
else:
|
||||
name = enum.name
|
||||
idname = enum.identifier
|
||||
|
||||
icon = icon_prefix + idname.lower()
|
||||
if icon_map is not None:
|
||||
icon = icon_map.get(icon, icon)
|
||||
|
||||
tool_defs.append(
|
||||
ToolDef.from_dict(
|
||||
dict(
|
||||
idname=idname_prefix + name,
|
||||
label=name,
|
||||
icon=icon_prefix + idname.lower(),
|
||||
icon=icon,
|
||||
cursor=cursor,
|
||||
data_block=idname,
|
||||
**tooldef_keywords,
|
||||
|
@ -1316,6 +1339,9 @@ class _defs_sculpt:
|
|||
icon_prefix="brush.sculpt.",
|
||||
type=bpy.types.Brush,
|
||||
attr="sculpt_tool",
|
||||
# TODO(@ideasman42): we may want to enable this,
|
||||
# it causes awkward grouping with 2x column button layout.
|
||||
use_separators=False,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2333,103 +2359,18 @@ class _defs_gpencil_weight:
|
|||
|
||||
class _defs_curves_sculpt:
|
||||
|
||||
@ToolDef.from_fn
|
||||
def selection_paint():
|
||||
return dict(
|
||||
idname="builtin_brush.selection_paint",
|
||||
label="Selection Paint",
|
||||
icon="ops.generic.select_paint",
|
||||
data_block="SELECTION_PAINT",
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def comb():
|
||||
return dict(
|
||||
idname="builtin_brush.comb",
|
||||
label="Comb",
|
||||
icon="ops.curves.sculpt_comb",
|
||||
data_block='COMB',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def add():
|
||||
return dict(
|
||||
idname="builtin_brush.add",
|
||||
label="Add",
|
||||
icon="ops.curves.sculpt_add",
|
||||
data_block='ADD',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def delete():
|
||||
return dict(
|
||||
idname="builtin_brush.delete",
|
||||
label="Delete",
|
||||
icon="ops.curves.sculpt_delete",
|
||||
data_block='DELETE',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def snake_hook():
|
||||
return dict(
|
||||
idname="builtin_brush.snake_hook",
|
||||
label="Snake Hook",
|
||||
icon="ops.curves.sculpt_snake_hook",
|
||||
data_block='SNAKE_HOOK',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def grow_shrink():
|
||||
return dict(
|
||||
idname="builtin_brush.grow_shrink",
|
||||
label="Grow/Shrink",
|
||||
icon="ops.curves.sculpt_grow_shrink",
|
||||
data_block='GROW_SHRINK',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def pinch():
|
||||
return dict(
|
||||
idname="builtin_brush.pinch",
|
||||
label="Pinch",
|
||||
icon="ops.curves.sculpt_pinch",
|
||||
data_block='PINCH',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def smooth():
|
||||
return dict(
|
||||
idname="builtin_brush.smooth",
|
||||
label="Smooth",
|
||||
icon="ops.curves.sculpt_smooth",
|
||||
data_block='SMOOTH',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def puff():
|
||||
return dict(
|
||||
idname="builtin_brush.puff",
|
||||
label="Puff",
|
||||
icon="ops.curves.sculpt_puff",
|
||||
data_block='PUFF',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def density():
|
||||
return dict(
|
||||
idname="builtin_brush.density",
|
||||
label="Density",
|
||||
icon="ops.curves.sculpt_density",
|
||||
data_block="DENSITY",
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
def slide():
|
||||
return dict(
|
||||
idname="builtin_brush.slide",
|
||||
label="Slide",
|
||||
icon="ops.curves.sculpt_slide",
|
||||
data_block="SLIDE",
|
||||
@staticmethod
|
||||
def generate_from_brushes(context):
|
||||
return generate_from_enum_ex(
|
||||
context,
|
||||
idname_prefix="builtin_brush.",
|
||||
icon_prefix="ops.curves.sculpt_",
|
||||
type=bpy.types.Brush,
|
||||
attr="curves_sculpt_tool",
|
||||
icon_map={
|
||||
# Use the generic icon for selection painting.
|
||||
"ops.curves.sculpt_selection_paint": "ops.generic.select_paint",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
@ -3200,19 +3141,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
|
|||
),
|
||||
],
|
||||
'SCULPT_CURVES': [
|
||||
_defs_curves_sculpt.selection_paint,
|
||||
None,
|
||||
_defs_curves_sculpt.add,
|
||||
_defs_curves_sculpt.delete,
|
||||
_defs_curves_sculpt.density,
|
||||
None,
|
||||
_defs_curves_sculpt.comb,
|
||||
_defs_curves_sculpt.snake_hook,
|
||||
_defs_curves_sculpt.grow_shrink,
|
||||
_defs_curves_sculpt.pinch,
|
||||
_defs_curves_sculpt.puff,
|
||||
_defs_curves_sculpt.smooth,
|
||||
_defs_curves_sculpt.slide,
|
||||
_defs_curves_sculpt.generate_from_brushes,
|
||||
None,
|
||||
*_tools_annotate,
|
||||
],
|
||||
|
|
|
@ -148,7 +148,7 @@ add_subdirectory(imbuf)
|
|||
add_subdirectory(imbuf/intern/oiio)
|
||||
add_subdirectory(nodes)
|
||||
add_subdirectory(modifiers)
|
||||
add_subdirectory(gpencil_modifiers)
|
||||
add_subdirectory(gpencil_modifiers_legacy)
|
||||
add_subdirectory(sequencer)
|
||||
add_subdirectory(shader_fx)
|
||||
add_subdirectory(io)
|
||||
|
|
|
@ -54,37 +54,45 @@ enum {
|
|||
* This means callback shall not *do* anything, only use this as informative data if it needs it.
|
||||
*/
|
||||
IDWALK_CB_EMBEDDED = (1 << 4),
|
||||
/**
|
||||
* That ID pointer points to an embedded ID, but does not own it.
|
||||
*
|
||||
* E.g the `collection` pointer of the first ViewLayerCollection of a ViewLayer should always
|
||||
* point to the scene's master collection, which is an embedded ID 'owned' by
|
||||
* `Scene.master_collection`.
|
||||
*/
|
||||
IDWALK_CB_EMBEDDED_NOT_OWNING = (1 << 5),
|
||||
|
||||
/**
|
||||
* That ID is not really used by its owner, it's just an internal hint/helper.
|
||||
* This marks the 'from' pointers issue, like Key->from.
|
||||
* How to handle that kind of cases totally depends on what caller code is doing... */
|
||||
IDWALK_CB_LOOPBACK = (1 << 5),
|
||||
IDWALK_CB_LOOPBACK = (1 << 6),
|
||||
|
||||
/** That ID is used as library override's reference by its owner. */
|
||||
IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE = (1 << 6),
|
||||
IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE = (1 << 7),
|
||||
|
||||
/** That ID pointer is not overridable. */
|
||||
IDWALK_CB_OVERRIDE_LIBRARY_NOT_OVERRIDABLE = (1 << 7),
|
||||
IDWALK_CB_OVERRIDE_LIBRARY_NOT_OVERRIDABLE = (1 << 8),
|
||||
|
||||
/**
|
||||
* Indicates that this is an internal runtime ID pointer, like e.g. `ID.newid` or `ID.original`.
|
||||
* \note Those should be ignored in most cases, and won't be processed/generated anyway unless
|
||||
* `IDWALK_DO_INTERNAL_RUNTIME_POINTERS` option is enabled.
|
||||
*/
|
||||
IDWALK_CB_INTERNAL = (1 << 8),
|
||||
IDWALK_CB_INTERNAL = (1 << 9),
|
||||
|
||||
/**
|
||||
* This ID usage is fully refcounted.
|
||||
* Callback is responsible to deal accordingly with #ID.us if needed.
|
||||
*/
|
||||
IDWALK_CB_USER = (1 << 9),
|
||||
IDWALK_CB_USER = (1 << 10),
|
||||
/**
|
||||
* This ID usage is not refcounted, but at least one user should be generated by it (to avoid
|
||||
* e.g. losing the used ID on save/reload).
|
||||
* Callback is responsible to deal accordingly with #ID.us if needed.
|
||||
*/
|
||||
IDWALK_CB_USER_ONE = (1 << 10),
|
||||
IDWALK_CB_USER_ONE = (1 << 11),
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -123,7 +131,9 @@ typedef int (*LibraryIDLinkCallback)(LibraryIDLinkCallbackData *cb_data);
|
|||
/* Flags for the foreach function itself. */
|
||||
enum {
|
||||
IDWALK_NOP = 0,
|
||||
/** The callback will never modify the ID pointers it processes. */
|
||||
/** The callback will never modify the ID pointers it processes.
|
||||
* WARNING: It is very important to pass this flag when valid, as it can lead to important
|
||||
* optimizations and debug/assert code. */
|
||||
IDWALK_READONLY = (1 << 0),
|
||||
/** Recurse into 'descendant' IDs.
|
||||
* Each ID is only processed once. Order of ID processing is not guaranteed.
|
||||
|
|
|
@ -12,7 +12,7 @@ set(INC
|
|||
../depsgraph
|
||||
../draw
|
||||
../functions
|
||||
../gpencil_modifiers
|
||||
../gpencil_modifiers_legacy
|
||||
../gpu
|
||||
../ikplugin
|
||||
../imbuf
|
||||
|
@ -529,7 +529,7 @@ set(LIB
|
|||
bf_depsgraph
|
||||
bf_draw
|
||||
bf_functions
|
||||
bf_gpencil_modifiers
|
||||
bf_gpencil_modifiers_legacy
|
||||
bf_gpu
|
||||
bf_ikplugin
|
||||
bf_imbuf
|
||||
|
|
|
@ -923,8 +923,8 @@ static int foreach_libblock_link_append_callback(LibraryIDLinkCallbackData *cb_d
|
|||
{
|
||||
/* NOTE: It is important to also skip liboverride references here, as those should never be made
|
||||
* local. */
|
||||
if (cb_data->cb_flag & (IDWALK_CB_EMBEDDED | IDWALK_CB_INTERNAL | IDWALK_CB_LOOPBACK |
|
||||
IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE)) {
|
||||
if (cb_data->cb_flag & (IDWALK_CB_EMBEDDED | IDWALK_CB_EMBEDDED_NOT_OWNING | IDWALK_CB_INTERNAL |
|
||||
IDWALK_CB_LOOPBACK | IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE)) {
|
||||
return IDWALK_RET_NOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -649,7 +649,7 @@ bool BKE_gpencil_stroke_stretch(bGPDstroke *gps,
|
|||
if (!isfinite(used_percent_length)) {
|
||||
/* #used_percent_length must always be finite, otherwise a segfault occurs.
|
||||
* Since this function should never segfault, set #used_percent_length to a safe fallback. */
|
||||
/* NOTE: This fallback is used if gps->totpoints == 2, see MOD_gpencillength.c */
|
||||
/* NOTE: This fallback is used if gps->totpoints == 2, see MOD_gpencil_legacy_length.c */
|
||||
used_percent_length = 0.1f;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
#include "DEG_depsgraph.h"
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
#include "MOD_gpencil_lineart.h"
|
||||
#include "MOD_gpencil_modifiertypes.h"
|
||||
#include "MOD_gpencil_legacy_lineart.h"
|
||||
#include "MOD_gpencil_legacy_modifiertypes.h"
|
||||
|
||||
#include "BLO_read_write.h"
|
||||
|
||||
|
@ -329,7 +329,7 @@ void BKE_gpencil_frame_active_set(Depsgraph *depsgraph, bGPdata *gpd)
|
|||
void BKE_gpencil_modifier_init(void)
|
||||
{
|
||||
/* Initialize modifier types */
|
||||
gpencil_modifier_type_init(modifier_gpencil_types); /* MOD_gpencil_util.c */
|
||||
gpencil_modifier_type_init(modifier_gpencil_types); /* MOD_gpencil_legacy_util.c */
|
||||
|
||||
#if 0
|
||||
/* Note that GPencil actually does not support these at the moment,
|
||||
|
|
|
@ -404,7 +404,7 @@ static int lib_id_expand_local_cb(LibraryIDLinkCallbackData *cb_data)
|
|||
return IDWALK_RET_NOP;
|
||||
}
|
||||
|
||||
if (cb_flag & IDWALK_CB_EMBEDDED) {
|
||||
if (cb_flag & (IDWALK_CB_EMBEDDED | IDWALK_CB_EMBEDDED_NOT_OWNING)) {
|
||||
/* Embedded data-blocks need to be made fully local as well.
|
||||
* Note however that in some cases (when owner ID had to be duplicated instead of being made
|
||||
* local directly), its embedded IDs should also have already been duplicated, and hence be
|
||||
|
|
|
@ -698,7 +698,8 @@ static void lib_query_unused_ids_tag_recurse(Main *bmain,
|
|||
|
||||
/* An ID user is 'valid' (i.e. may affect the 'used'/'not used' status of the ID it uses) if it
|
||||
* does not match `ignored_usages`, and does match `required_usages`. */
|
||||
const int ignored_usages = (IDWALK_CB_LOOPBACK | IDWALK_CB_EMBEDDED);
|
||||
const int ignored_usages = (IDWALK_CB_LOOPBACK | IDWALK_CB_EMBEDDED |
|
||||
IDWALK_CB_EMBEDDED_NOT_OWNING);
|
||||
const int required_usages = (IDWALK_CB_USER | IDWALK_CB_USER_ONE);
|
||||
|
||||
/* This ID may be tagged as unused if none of its users are 'valid', as defined above.
|
||||
|
|
|
@ -157,7 +157,7 @@ static int foreach_libblock_remap_callback(LibraryIDLinkCallbackData *cb_data)
|
|||
{
|
||||
const int cb_flag = cb_data->cb_flag;
|
||||
|
||||
if (cb_flag & IDWALK_CB_EMBEDDED) {
|
||||
if (cb_flag & (IDWALK_CB_EMBEDDED | IDWALK_CB_EMBEDDED_NOT_OWNING)) {
|
||||
return IDWALK_RET_NOP;
|
||||
}
|
||||
|
||||
|
@ -857,7 +857,8 @@ static void libblock_relink_to_newid_prepare_data(Main *bmain,
|
|||
static int id_relink_to_newid_looper(LibraryIDLinkCallbackData *cb_data)
|
||||
{
|
||||
const int cb_flag = cb_data->cb_flag;
|
||||
if (cb_flag & (IDWALK_CB_EMBEDDED | IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE)) {
|
||||
if (cb_flag & (IDWALK_CB_EMBEDDED | IDWALK_CB_EMBEDDED_NOT_OWNING |
|
||||
IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE)) {
|
||||
return IDWALK_RET_NOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ void BKE_mesh_tag_edges_split(struct Mesh *mesh)
|
|||
mesh->runtime->subsurf_optimal_display_edges.clear_and_shrink();
|
||||
if (mesh->runtime->shrinkwrap_data) {
|
||||
BKE_shrinkwrap_boundary_data_free(mesh->runtime->shrinkwrap_data);
|
||||
mesh->runtime->shrinkwrap_data = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -763,7 +763,7 @@ static void scene_foreach_layer_collection(LibraryForeachIDData *data, ListBase
|
|||
* anyway... */
|
||||
const int cb_flag = (lc->collection != nullptr &&
|
||||
(lc->collection->id.flag & LIB_EMBEDDED_DATA) != 0) ?
|
||||
IDWALK_CB_EMBEDDED :
|
||||
IDWALK_CB_EMBEDDED_NOT_OWNING :
|
||||
IDWALK_CB_NOP;
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, lc->collection, cb_flag | IDWALK_CB_DIRECT_WEAK_LINK);
|
||||
scene_foreach_layer_collection(data, &lc->layer_collections);
|
||||
|
|
|
@ -168,15 +168,17 @@ void BKE_screen_foreach_id_screen_area(LibraryForeachIDData *data, ScrArea *area
|
|||
|
||||
BKE_LIB_FOREACHID_PROCESS_ID(data, snode->id, IDWALK_CB_NOP);
|
||||
BKE_LIB_FOREACHID_PROCESS_ID(data, snode->from, IDWALK_CB_NOP);
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(
|
||||
data, snode->nodetree, is_private_nodetree ? IDWALK_CB_EMBEDDED : IDWALK_CB_USER_ONE);
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data,
|
||||
snode->nodetree,
|
||||
is_private_nodetree ? IDWALK_CB_EMBEDDED_NOT_OWNING :
|
||||
IDWALK_CB_USER_ONE);
|
||||
|
||||
LISTBASE_FOREACH (bNodeTreePath *, path, &snode->treepath) {
|
||||
if (path == snode->treepath.first) {
|
||||
/* first nodetree in path is same as snode->nodetree */
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data,
|
||||
path->nodetree,
|
||||
is_private_nodetree ? IDWALK_CB_EMBEDDED :
|
||||
is_private_nodetree ? IDWALK_CB_EMBEDDED_NOT_OWNING :
|
||||
IDWALK_CB_USER_ONE);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -104,6 +104,8 @@
|
|||
} \
|
||||
(void)0
|
||||
|
||||
#define TIMEIT_BLOCK_VALUE(id) (float)(_timeit_var_##id)
|
||||
|
||||
#define TIMEIT_BLOCK_STATS(id) \
|
||||
{ \
|
||||
printf("%s time (in seconds): %f\n", #id, _timeit_var_##id); \
|
||||
|
|
|
@ -2241,7 +2241,7 @@ static int lib_link_main_data_restore_cb(LibraryIDLinkCallbackData *cb_data)
|
|||
{
|
||||
const int cb_flag = cb_data->cb_flag;
|
||||
ID **id_pointer = cb_data->id_pointer;
|
||||
if (cb_flag & IDWALK_CB_EMBEDDED || *id_pointer == nullptr) {
|
||||
if (cb_flag & (IDWALK_CB_EMBEDDED | IDWALK_CB_EMBEDDED_NOT_OWNING) || *id_pointer == nullptr) {
|
||||
return IDWALK_RET_NOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "DRW_engine.h"
|
||||
#include "DRW_render.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_view3d.h"
|
||||
|
||||
#include "DNA_gpencil_legacy_types.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "DRW_engine.h"
|
||||
#include "DRW_render.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "GPU_batch.h"
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "DNA_view3d_types.h"
|
||||
#include "DNA_world_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_space_api.h"
|
||||
#include "ED_view3d.h"
|
||||
|
|
|
@ -12,7 +12,7 @@ if(WITH_BLENDER)
|
|||
add_subdirectory(curves)
|
||||
add_subdirectory(geometry)
|
||||
add_subdirectory(gizmo_library)
|
||||
add_subdirectory(gpencil)
|
||||
add_subdirectory(gpencil_legacy)
|
||||
add_subdirectory(interface)
|
||||
add_subdirectory(io)
|
||||
add_subdirectory(lattice)
|
||||
|
|
|
@ -741,7 +741,7 @@ bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace)
|
|||
|
||||
/* sanity checks */
|
||||
if (BLI_listbase_is_empty(&driver_vars_copybuf)) {
|
||||
BKE_report(reports, RPT_ERROR, "No driver variables in clipboard to paste");
|
||||
BKE_report(reports, RPT_ERROR, "No driver variables in the internal clipboard to paste");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1257,7 +1257,7 @@ void ANIM_OT_paste_driver_button(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Paste Driver";
|
||||
ot->idname = "ANIM_OT_paste_driver_button";
|
||||
ot->description = "Paste the driver in the clipboard to the highlighted button";
|
||||
ot->description = "Paste the driver in the internal clipboard to the highlighted button";
|
||||
|
||||
/* callbacks */
|
||||
ot->exec = paste_driver_button_exec;
|
||||
|
|
|
@ -798,7 +798,7 @@ static int pose_copy_exec(bContext *C, wmOperator *op)
|
|||
BLI_listbase_clear(&temp_bmain->armatures);
|
||||
BKE_main_free(temp_bmain);
|
||||
/* We are all done! */
|
||||
BKE_report(op->reports, RPT_INFO, "Copied pose to buffer");
|
||||
BKE_report(op->reports, RPT_INFO, "Copied pose to internal clipboard");
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
|
@ -807,7 +807,7 @@ void POSE_OT_copy(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Copy Pose";
|
||||
ot->idname = "POSE_OT_copy";
|
||||
ot->description = "Copies the current pose of the selected bones to copy/paste buffer";
|
||||
ot->description = "Copy the current pose of the selected bones to the internal clipboard";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = pose_copy_exec;
|
||||
|
@ -846,13 +846,13 @@ static int pose_paste_exec(bContext *C, wmOperator *op)
|
|||
|
||||
BLI_path_join(str, sizeof(str), BKE_tempdir_base(), "copybuffer_pose.blend");
|
||||
if (!BKE_copybuffer_read(tmp_bmain, str, op->reports, FILTER_ID_OB)) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Copy buffer is empty");
|
||||
BKE_report(op->reports, RPT_ERROR, "Internal clipboard is empty");
|
||||
BKE_main_free(tmp_bmain);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
/* Make sure data from this file is usable for pose paste. */
|
||||
if (BLI_listbase_count_at_most(&tmp_bmain->objects, 2) != 1) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Copy buffer is not from pose mode");
|
||||
BKE_report(op->reports, RPT_ERROR, "Internal clipboard is not from pose mode");
|
||||
BKE_main_free(tmp_bmain);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
@ -860,7 +860,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op)
|
|||
Object *object_from = tmp_bmain->objects.first;
|
||||
bPose *pose_from = object_from->pose;
|
||||
if (pose_from == NULL) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Copy buffer has no pose");
|
||||
BKE_report(op->reports, RPT_ERROR, "Internal clipboard has no pose");
|
||||
BKE_main_free(tmp_bmain);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ if(WITH_POTRACE)
|
|||
endif()
|
||||
|
||||
|
||||
blender_add_lib(bf_editor_gpencil "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
blender_add_lib(bf_editor_gpencil_legacy "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
# RNA_prototypes.h
|
||||
add_dependencies(bf_editor_gpencil bf_rna)
|
||||
add_dependencies(bf_editor_gpencil_legacy bf_rna)
|
|
@ -41,7 +41,7 @@
|
|||
#include "GPU_matrix.h"
|
||||
#include "GPU_state.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_space_api.h"
|
||||
#include "ED_view3d.h"
|
|
@ -39,7 +39,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_clip.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_view3d.h"
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
#include "GPU_state.h"
|
||||
#include "GPU_uniform_buffer.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_space_api.h"
|
||||
#include "ED_view3d.h"
|
|
@ -24,7 +24,7 @@
|
|||
#include "BKE_report.h"
|
||||
|
||||
#include "ED_anim_api.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframes_edit.h"
|
||||
#include "ED_markers.h"
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "DEG_depsgraph.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
/* Definition of the most important info from a color */
|
||||
typedef struct ColorTemplate {
|
|
@ -26,7 +26,7 @@
|
|||
#include "DEG_depsgraph.h"
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
/* Definition of the most important info from a color */
|
||||
typedef struct ColorTemplate {
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "DEG_depsgraph.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
void ED_gpencil_stroke_init_data(bGPDstroke *gps,
|
||||
const float *array,
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "DEG_depsgraph.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
/* Definition of the most important info from a color */
|
||||
typedef struct ColorTemplate {
|
|
@ -41,7 +41,7 @@
|
|||
#include "RNA_define.h"
|
||||
#include "RNA_enum_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_object.h"
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_transform_snap_object_context.h"
|
||||
|
||||
#include "gpencil_intern.h"
|
|
@ -65,7 +65,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_clip.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_view3d.h"
|
|
@ -62,7 +62,7 @@
|
|||
#include "RNA_define.h"
|
||||
#include "RNA_enum_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_object.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
|
@ -66,7 +66,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_armature.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_outliner.h"
|
|
@ -29,7 +29,7 @@
|
|||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
#include "BKE_report.h"
|
||||
#include "BKE_screen.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_space_api.h"
|
|
@ -47,7 +47,7 @@
|
|||
#include "RNA_define.h"
|
||||
#include "RNA_prototypes.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
|
@ -31,7 +31,7 @@
|
|||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
|
@ -37,7 +37,7 @@
|
|||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_transform_snap_object_context.h"
|
||||
|
||||
#include "gpencil_intern.h"
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "RNA_access.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
#include "gpencil_intern.h"
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
#include "DEG_depsgraph_query.h"
|
|
@ -52,7 +52,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_clip.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_screen.h"
|
|
@ -54,7 +54,7 @@
|
|||
#include "RNA_define.h"
|
||||
#include "RNA_enum_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_screen.h"
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_view3d.h"
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_select_utils.h"
|
||||
#include "ED_view3d.h"
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include "IMB_imbuf_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_object.h"
|
||||
|
||||
#include "gpencil_intern.h"
|
|
@ -22,7 +22,7 @@
|
|||
#include "BKE_gpencil_legacy.h"
|
||||
#include "BKE_undo_system.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
|
@ -63,7 +63,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_clip.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_select_utils.h"
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "UI_interface.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_numinput.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_space_api.h"
|
|
@ -28,7 +28,7 @@
|
|||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_view3d.h"
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_view3d.h"
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_undo.h"
|
||||
|
||||
|
|
|
@ -245,8 +245,8 @@ static void UI_OT_copy_as_driver_button(wmOperatorType *ot)
|
|||
ot->idname = "UI_OT_copy_as_driver_button";
|
||||
ot->description =
|
||||
"Create a new driver with this property as input, and copy it to the "
|
||||
"clipboard. Use Paste Driver to add it to the target property, or Paste "
|
||||
"Driver Variables to extend an existing driver";
|
||||
"internal clipboard. Use Paste Driver to add it to the target property, "
|
||||
"or Paste Driver Variables to extend an existing driver";
|
||||
|
||||
/* callbacks */
|
||||
ot->exec = copy_as_driver_button_exec;
|
||||
|
|
|
@ -155,10 +155,16 @@ bool UI_but_is_tool(const uiBut *but)
|
|||
|
||||
bool UI_but_has_tooltip_label(const uiBut *but)
|
||||
{
|
||||
if ((but->drawstr[0] == '\0') && !ui_block_is_popover(but->block)) {
|
||||
return UI_but_is_tool(but);
|
||||
/* No tooltip label if the button itself shows a label already. */
|
||||
if (but->drawstr[0] != '\0') {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
if (UI_but_is_tool(but)) {
|
||||
return !ui_block_is_popover(but->block);
|
||||
}
|
||||
|
||||
return ELEM(but->type, UI_BTYPE_TAB);
|
||||
}
|
||||
|
||||
int ui_but_icon(const uiBut *but)
|
||||
|
|
|
@ -742,7 +742,8 @@ static uiTooltipData *ui_tooltip_data_from_tool(bContext *C, uiBut *but, bool is
|
|||
|
||||
static uiTooltipData *ui_tooltip_data_from_button_or_extra_icon(bContext *C,
|
||||
uiBut *but,
|
||||
uiButExtraOpIcon *extra_icon)
|
||||
uiButExtraOpIcon *extra_icon,
|
||||
const bool is_label)
|
||||
{
|
||||
uiStringInfo but_label = {BUT_GET_LABEL, nullptr};
|
||||
uiStringInfo but_tip = {BUT_GET_TIP, nullptr};
|
||||
|
@ -763,20 +764,30 @@ static uiTooltipData *ui_tooltip_data_from_button_or_extra_icon(bContext *C,
|
|||
uiTooltipData *data = MEM_cnew<uiTooltipData>(__func__);
|
||||
|
||||
if (extra_icon) {
|
||||
UI_but_extra_icon_string_info_get(C, extra_icon, &but_label, &but_tip, &op_keymap, nullptr);
|
||||
if (is_label) {
|
||||
UI_but_extra_icon_string_info_get(C, extra_icon, &but_label, &enum_label, nullptr);
|
||||
}
|
||||
else {
|
||||
UI_but_extra_icon_string_info_get(C, extra_icon, &but_label, &but_tip, &op_keymap, nullptr);
|
||||
}
|
||||
}
|
||||
else {
|
||||
UI_but_string_info_get(C,
|
||||
but,
|
||||
&but_label,
|
||||
&but_tip,
|
||||
&enum_label,
|
||||
&enum_tip,
|
||||
&op_keymap,
|
||||
&prop_keymap,
|
||||
&rna_struct,
|
||||
&rna_prop,
|
||||
nullptr);
|
||||
if (is_label) {
|
||||
UI_but_string_info_get(C, but, &but_label, &enum_label, nullptr);
|
||||
}
|
||||
else {
|
||||
UI_but_string_info_get(C,
|
||||
but,
|
||||
&but_label,
|
||||
&but_tip,
|
||||
&enum_label,
|
||||
&enum_tip,
|
||||
&op_keymap,
|
||||
&prop_keymap,
|
||||
&rna_struct,
|
||||
&rna_prop,
|
||||
nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Tip Label (only for buttons not already showing the label).
|
||||
|
@ -811,6 +822,13 @@ static uiTooltipData *ui_tooltip_data_from_button_or_extra_icon(bContext *C,
|
|||
field->text = BLI_strdup(TIP_("(Shift-Click/Drag to select multiple)"));
|
||||
}
|
||||
}
|
||||
/* When there is only an enum label (no button label or tip), draw that as header. */
|
||||
else if (enum_label.strinfo && !(but_label.strinfo && but_label.strinfo[0])) {
|
||||
uiTooltipField *field = text_field_add(
|
||||
data, uiTooltipFormat::Style::Header, uiTooltipFormat::ColorID::Normal);
|
||||
field->text = BLI_strdup(enum_label.strinfo);
|
||||
}
|
||||
|
||||
/* Enum field label & tip. */
|
||||
if (enum_tip.strinfo) {
|
||||
uiTooltipField *field = text_field_add(
|
||||
|
@ -1346,11 +1364,11 @@ ARegion *UI_tooltip_create_from_button_or_extra_icon(
|
|||
}
|
||||
|
||||
if (data == nullptr) {
|
||||
data = ui_tooltip_data_from_button_or_extra_icon(C, but, extra_icon);
|
||||
data = ui_tooltip_data_from_button_or_extra_icon(C, but, extra_icon, is_label);
|
||||
}
|
||||
|
||||
if (data == nullptr) {
|
||||
data = ui_tooltip_data_from_button_or_extra_icon(C, but, nullptr);
|
||||
data = ui_tooltip_data_from_button_or_extra_icon(C, but, nullptr, is_label);
|
||||
}
|
||||
|
||||
if (data == nullptr) {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# include "DEG_depsgraph.h"
|
||||
# include "DEG_depsgraph_query.h"
|
||||
|
||||
# include "ED_gpencil.h"
|
||||
# include "ED_gpencil_legacy.h"
|
||||
|
||||
# include "io_gpencil.h"
|
||||
|
||||
|
|
|
@ -2069,7 +2069,7 @@ void MASK_OT_copy_splines(wmOperatorType *ot)
|
|||
{
|
||||
/* identifiers */
|
||||
ot->name = "Copy Splines";
|
||||
ot->description = "Copy selected splines to clipboard";
|
||||
ot->description = "Copy the selected splines to the internal clipboard";
|
||||
ot->idname = "MASK_OT_copy_splines";
|
||||
|
||||
/* api callbacks */
|
||||
|
@ -2113,7 +2113,7 @@ void MASK_OT_paste_splines(wmOperatorType *ot)
|
|||
{
|
||||
/* identifiers */
|
||||
ot->name = "Paste Splines";
|
||||
ot->description = "Paste splines from clipboard";
|
||||
ot->description = "Paste splines from the internal clipboard";
|
||||
ot->idname = "MASK_OT_paste_splines";
|
||||
|
||||
/* api callbacks */
|
||||
|
|
|
@ -9370,8 +9370,12 @@ enum {
|
|||
};
|
||||
|
||||
static EnumPropertyItem normal_vector_tool_items[] = {
|
||||
{EDBM_CLNOR_TOOLS_COPY, "COPY", 0, "Copy Normal", "Copy normal to buffer"},
|
||||
{EDBM_CLNOR_TOOLS_PASTE, "PASTE", 0, "Paste Normal", "Paste normal from buffer"},
|
||||
{EDBM_CLNOR_TOOLS_COPY, "COPY", 0, "Copy Normal", "Copy normal to the internal clipboard"},
|
||||
{EDBM_CLNOR_TOOLS_PASTE,
|
||||
"PASTE",
|
||||
0,
|
||||
"Paste Normal",
|
||||
"Paste normal from the internal clipboard"},
|
||||
{EDBM_CLNOR_TOOLS_ADD, "ADD", 0, "Add Normal", "Add normal vector with selection"},
|
||||
{EDBM_CLNOR_TOOLS_MULTIPLY,
|
||||
"MULTIPLY",
|
||||
|
@ -9382,7 +9386,7 @@ static EnumPropertyItem normal_vector_tool_items[] = {
|
|||
"RESET",
|
||||
0,
|
||||
"Reset Normal",
|
||||
"Reset buffer and/or normal of selected element"},
|
||||
"Reset the internal clipboard and/or normal of selected element"},
|
||||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ set(INC
|
|||
../../bmesh
|
||||
../../depsgraph
|
||||
../../functions
|
||||
../../gpencil_modifiers
|
||||
../../gpencil_modifiers_legacy
|
||||
../../gpu
|
||||
../../ikplugin
|
||||
../../imbuf
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
#include "ED_armature.h"
|
||||
#include "ED_curve.h"
|
||||
#include "ED_curves.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_mball.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_node.h"
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
#include "ED_anim_api.h"
|
||||
#include "ED_armature.h"
|
||||
#include "ED_curve.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_image.h"
|
||||
#include "ED_keyframes_keylist.h"
|
||||
#include "ED_lattice.h"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
#include "ED_armature.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_transform_snap_object_context.h"
|
||||
#include "ED_undo.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "object_intern.h"
|
||||
|
||||
#include "MOD_gpencil_lineart.h"
|
||||
#include "MOD_gpencil_legacy_lineart.h"
|
||||
|
||||
/* ************************** registration **********************************/
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
|
||||
#include "ED_armature.h"
|
||||
#include "ED_curve.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_object.h"
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
#include "WM_types.h"
|
||||
|
||||
#include "ED_armature.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_object.h"
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_view3d.h"
|
||||
#include "ED_view3d_offscreen.h"
|
||||
|
|
|
@ -1829,7 +1829,7 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Copy Line Set";
|
||||
ot->idname = "SCENE_OT_freestyle_lineset_copy";
|
||||
ot->description = "Copy the active line set to a buffer";
|
||||
ot->description = "Copy the active line set to the internal clipboard";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = freestyle_lineset_copy_exec;
|
||||
|
@ -1863,7 +1863,7 @@ void SCENE_OT_freestyle_lineset_paste(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Paste Line Set";
|
||||
ot->idname = "SCENE_OT_freestyle_lineset_paste";
|
||||
ot->description = "Paste the buffer content to the active line set";
|
||||
ot->description = "Paste the internal clipboard content to the active line set";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = freestyle_lineset_paste_exec;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "ED_anim_api.h"
|
||||
#include "ED_armature.h"
|
||||
#include "ED_clip.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
|
||||
#include "SEQ_channels.h"
|
||||
#include "SEQ_select.h"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_anim_api.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframes_edit.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_markers.h"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_anim_api.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframes_edit.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_markers.h"
|
||||
|
@ -576,7 +576,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
|
|||
if (ac.datatype == ANIMCONT_GPENCIL) {
|
||||
if (ED_gpencil_anim_copybuf_copy(&ac) == false) {
|
||||
/* check if anything ended up in the buffer */
|
||||
BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer");
|
||||
BKE_report(op->reports, RPT_ERROR, "No keyframes copied to the internal clipboard");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
|
@ -591,7 +591,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
|
|||
const bool gpf_ok = ED_gpencil_anim_copybuf_copy(&ac);
|
||||
|
||||
if (kf_empty && !gpf_ok) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer");
|
||||
BKE_report(op->reports, RPT_ERROR, "No keyframes copied to the internal clipboard");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
|
@ -604,7 +604,7 @@ void ACTION_OT_copy(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Copy Keyframes";
|
||||
ot->idname = "ACTION_OT_copy";
|
||||
ot->description = "Copy selected keyframes to the copy/paste buffer";
|
||||
ot->description = "Copy selected keyframes to the internal clipboard";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = actkeys_copy_exec;
|
||||
|
@ -635,7 +635,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
|
|||
/* paste keyframes */
|
||||
if (ac.datatype == ANIMCONT_GPENCIL) {
|
||||
if (ED_gpencil_anim_copybuf_paste(&ac, offset_mode) == false) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No data in buffer to paste");
|
||||
BKE_report(op->reports, RPT_ERROR, "No data in the internal clipboard to paste");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
|
|||
return OPERATOR_CANCELLED;
|
||||
|
||||
case KEYFRAME_PASTE_NOTHING_TO_PASTE:
|
||||
BKE_report(op->reports, RPT_ERROR, "No data in buffer to paste");
|
||||
BKE_report(op->reports, RPT_ERROR, "No data in the internal clipboard to paste");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
|
@ -698,7 +698,8 @@ void ACTION_OT_paste(wmOperatorType *ot)
|
|||
ot->name = "Paste Keyframes";
|
||||
ot->idname = "ACTION_OT_paste";
|
||||
ot->description =
|
||||
"Paste keyframes from copy/paste buffer for the selected channels, starting on the current "
|
||||
"Paste keyframes from the internal clipboard for the selected channels, starting on the "
|
||||
"current "
|
||||
"frame";
|
||||
|
||||
/* api callbacks */
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_anim_api.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframes_edit.h"
|
||||
#include "ED_keyframes_keylist.h"
|
||||
#include "ED_markers.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "ED_fileselect.h"
|
||||
#include "ED_geometry.h"
|
||||
#include "ED_gizmo_library.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_grease_pencil_draw.h"
|
||||
#include "ED_lattice.h"
|
||||
#include "ED_markers.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "BKE_tracking.h"
|
||||
|
||||
#include "ED_clip.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_mask.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_util.h"
|
||||
|
|
|
@ -1874,7 +1874,7 @@ void CLIP_OT_copy_tracks(wmOperatorType *ot)
|
|||
{
|
||||
/* identifiers */
|
||||
ot->name = "Copy Tracks";
|
||||
ot->description = "Copy selected tracks to clipboard";
|
||||
ot->description = "Copy the selected tracks to the internal clipboard";
|
||||
ot->idname = "CLIP_OT_copy_tracks";
|
||||
|
||||
/* api callbacks */
|
||||
|
@ -1919,7 +1919,7 @@ void CLIP_OT_paste_tracks(wmOperatorType *ot)
|
|||
{
|
||||
/* identifiers */
|
||||
ot->name = "Paste Tracks";
|
||||
ot->description = "Paste tracks from clipboard";
|
||||
ot->description = "Paste tracks from the internal clipboard";
|
||||
ot->idname = "CLIP_OT_paste_tracks";
|
||||
|
||||
/* api callbacks */
|
||||
|
|
|
@ -523,7 +523,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op)
|
|||
|
||||
/* Copy keyframes. */
|
||||
if (copy_graph_keys(&ac)) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer");
|
||||
BKE_report(op->reports, RPT_ERROR, "No keyframes copied to the internal clipboard");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
|
@ -536,7 +536,7 @@ void GRAPH_OT_copy(wmOperatorType *ot)
|
|||
/* Identifiers */
|
||||
ot->name = "Copy Keyframes";
|
||||
ot->idname = "GRAPH_OT_copy";
|
||||
ot->description = "Copy selected keyframes to the copy/paste buffer";
|
||||
ot->description = "Copy selected keyframes to the internal clipboard";
|
||||
|
||||
/* API callbacks */
|
||||
ot->exec = graphkeys_copy_exec;
|
||||
|
@ -574,7 +574,7 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
|
|||
return OPERATOR_CANCELLED;
|
||||
|
||||
case KEYFRAME_PASTE_NOTHING_TO_PASTE:
|
||||
BKE_report(op->reports, RPT_ERROR, "No data in buffer to paste");
|
||||
BKE_report(op->reports, RPT_ERROR, "No data in the internal clipboard to paste");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,8 @@ void GRAPH_OT_paste(wmOperatorType *ot)
|
|||
ot->name = "Paste Keyframes";
|
||||
ot->idname = "GRAPH_OT_paste";
|
||||
ot->description =
|
||||
"Paste keyframes from copy/paste buffer for the selected channels, starting on the current "
|
||||
"Paste keyframes from the internal clipboard for the selected channels, starting on the "
|
||||
"current "
|
||||
"frame";
|
||||
|
||||
/* API callbacks */
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "IMB_imbuf.h"
|
||||
#include "IMB_imbuf_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_image.h"
|
||||
#include "ED_screen.h"
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
#include "BLF_api.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_image.h"
|
||||
#include "ED_mask.h"
|
||||
#include "ED_render.h"
|
||||
|
|
|
@ -167,7 +167,7 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator * /*op*/)
|
|||
void NODE_OT_clipboard_copy(wmOperatorType *ot)
|
||||
{
|
||||
ot->name = "Copy to Clipboard";
|
||||
ot->description = "Copies selected nodes to the clipboard";
|
||||
ot->description = "Copy the selected nodes to the internal clipboard";
|
||||
ot->idname = "NODE_OT_clipboard_copy";
|
||||
|
||||
ot->exec = node_clipboard_copy_exec;
|
||||
|
@ -191,7 +191,7 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
|
|||
const bool is_valid = clipboard.validate();
|
||||
|
||||
if (clipboard.nodes.is_empty()) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Clipboard is empty");
|
||||
BKE_report(op->reports, RPT_ERROR, "The internal clipboard is empty");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ static int node_clipboard_paste_invoke(bContext *C, wmOperator *op, const wmEven
|
|||
void NODE_OT_clipboard_paste(wmOperatorType *ot)
|
||||
{
|
||||
ot->name = "Paste from Clipboard";
|
||||
ot->description = "Pastes nodes from the clipboard to the active node tree";
|
||||
ot->description = "Paste nodes from the internal clipboard to the active node tree";
|
||||
ot->idname = "NODE_OT_clipboard_paste";
|
||||
|
||||
ot->invoke = node_clipboard_paste_invoke;
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_node.h"
|
||||
#include "ED_node.hh"
|
||||
#include "ED_screen.h"
|
||||
|
|
|
@ -822,7 +822,7 @@ void OUTLINER_OT_id_copy(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Outliner ID Data Copy";
|
||||
ot->idname = "OUTLINER_OT_id_copy";
|
||||
ot->description = "Selected data-blocks are copied to the clipboard";
|
||||
ot->description = "Copy the selected data-blocks to the internal clipboard";
|
||||
|
||||
/* callbacks */
|
||||
ot->exec = outliner_id_copy_exec;
|
||||
|
@ -863,7 +863,7 @@ void OUTLINER_OT_id_paste(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Outliner ID Data Paste";
|
||||
ot->idname = "OUTLINER_OT_id_paste";
|
||||
ot->description = "Data-blocks from the clipboard are pasted";
|
||||
ot->description = "Paste data-blocks from the internal clipboard";
|
||||
|
||||
/* callbacks */
|
||||
ot->exec = outliner_id_paste_exec;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "GPU_viewport.h"
|
||||
|
||||
#include "ED_anim_api.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_markers.h"
|
||||
#include "ED_mask.h"
|
||||
#include "ED_screen.h"
|
||||
|
|
|
@ -2483,7 +2483,7 @@ void SEQUENCER_OT_copy(wmOperatorType *ot)
|
|||
/* Identifiers. */
|
||||
ot->name = "Copy";
|
||||
ot->idname = "SEQUENCER_OT_copy";
|
||||
ot->description = "Copy selected strips to clipboard";
|
||||
ot->description = "Copy the selected strips to the internal clipboard";
|
||||
|
||||
/* Api callbacks. */
|
||||
ot->exec = sequencer_copy_exec;
|
||||
|
@ -2630,7 +2630,7 @@ void SEQUENCER_OT_paste(wmOperatorType *ot)
|
|||
/* Identifiers. */
|
||||
ot->name = "Paste";
|
||||
ot->idname = "SEQUENCER_OT_paste";
|
||||
ot->description = "Paste strips from clipboard";
|
||||
ot->description = "Paste strips from the internal clipboard";
|
||||
|
||||
/* Api callbacks. */
|
||||
ot->exec = sequencer_paste_exec;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "DRW_engine.h"
|
||||
#include "DRW_select_buffer.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_info.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_screen.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "ED_gizmo_library.h"
|
||||
#include "ED_gizmo_utils.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_transform.h"
|
||||
#include "ED_transform_snap_object_context.h"
|
||||
|
|
|
@ -72,7 +72,7 @@ static void VIEW3D_OT_copybuffer(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Copy Objects";
|
||||
ot->idname = "VIEW3D_OT_copybuffer";
|
||||
ot->description = "Selected objects are copied to the clipboard";
|
||||
ot->description = "Copy the selected objects to the internal clipboard";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = view3d_copybuffer_exec;
|
||||
|
@ -113,7 +113,7 @@ static void VIEW3D_OT_pastebuffer(wmOperatorType *ot)
|
|||
/* identifiers */
|
||||
ot->name = "Paste Objects";
|
||||
ot->idname = "VIEW3D_OT_pastebuffer";
|
||||
ot->description = "Objects from the clipboard are pasted";
|
||||
ot->description = "Paste objects from the internal clipboard";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec = view3d_pastebuffer_exec;
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
#include "ED_armature.h"
|
||||
#include "ED_curve.h"
|
||||
#include "ED_curves.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_lattice.h"
|
||||
#include "ED_mball.h"
|
||||
#include "ED_mesh.h"
|
||||
|
@ -3664,8 +3664,7 @@ static bool do_mesh_box_select(ViewContext *vc,
|
|||
}
|
||||
if (ts->selectmode & SCE_SELECT_EDGE) {
|
||||
/* Does both use_zbuf and non-use_zbuf versions (need screen cos for both) */
|
||||
struct BoxSelectUserData_ForMeshEdge cb_data {
|
||||
};
|
||||
struct BoxSelectUserData_ForMeshEdge cb_data {};
|
||||
cb_data.data = &data;
|
||||
cb_data.esel = use_zbuf ? esel : nullptr;
|
||||
cb_data.backbuf_offset = use_zbuf ? DRW_select_buffer_context_offset_for_object_elem(
|
||||
|
|
|
@ -31,7 +31,7 @@ set(SRC
|
|||
transform_convert_cursor.c
|
||||
transform_convert_curve.c
|
||||
transform_convert_curves.cc
|
||||
transform_convert_gpencil.c
|
||||
transform_convert_gpencil_legacy.c
|
||||
transform_convert_graph.c
|
||||
transform_convert_lattice.c
|
||||
transform_convert_mask.c
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "GPU_state.h"
|
||||
|
||||
#include "ED_clip.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_image.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_node.h"
|
||||
|
|
|
@ -142,7 +142,7 @@ extern TransConvertTypeInfo TransConvertType_Curves;
|
|||
|
||||
extern TransConvertTypeInfo TransConvertType_Graph;
|
||||
|
||||
/* transform_convert_gpencil.c */
|
||||
/* transform_convert_gpencil_legacy.c */
|
||||
|
||||
extern TransConvertTypeInfo TransConvertType_GPencil;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "BKE_gpencil_legacy.h"
|
||||
#include "BKE_layer.h"
|
||||
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_keyframing.h"
|
||||
|
||||
#include "transform.h"
|
|
@ -34,7 +34,7 @@
|
|||
#include "ED_curves.h"
|
||||
#include "ED_gizmo_library.h"
|
||||
#include "ED_gizmo_utils.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_particle.h"
|
||||
#include "ED_screen.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "BLO_blend_validate.h"
|
||||
|
||||
#include "ED_asset.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_outliner.h"
|
||||
#include "ED_render.h"
|
||||
|
|
|
@ -52,7 +52,7 @@ set(SRC
|
|||
../include/ED_geometry.h
|
||||
../include/ED_gizmo_library.h
|
||||
../include/ED_gizmo_utils.h
|
||||
../include/ED_gpencil.h
|
||||
../include/ED_gpencil_legacy.h
|
||||
../include/ED_grease_pencil_draw.h
|
||||
../include/ED_image.h
|
||||
../include/ED_info.h
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "ED_armature.h"
|
||||
#include "ED_asset.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_gpencil_legacy.h"
|
||||
#include "ED_image.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_object.h"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue