Anim: Detailed report if no keyframes have been inserted #119201

Merged
Christoph Lendenfeld merged 13 commits from ChrisLend/blender:return_keying_result into main 2024-04-09 09:39:25 +02:00
10 changed files with 35 additions and 13 deletions
Showing only changes of commit f7f40eac04 - Show all commits

View File

@ -317,6 +317,8 @@ class ZoneOperator:
@classmethod
def get_node(cls, context):
node = context.active_node
if node is None:
return None
if node.bl_idname == cls.output_node_type:
return node
if node.bl_idname == cls.input_node_type:
@ -337,6 +339,8 @@ class NodeOperator:
@classmethod
def get_node(cls, context):
node = context.active_node
if node is None:
return None
if node.bl_idname == cls.node_type:
return node

View File

@ -1057,6 +1057,7 @@ CombinedKeyingResult insert_key_rna(PointerRNA *rna_pointer,
successful_remaps);
combined_result.merge(result);
}
BKE_animsys_free_nla_keyframing_context_cache(&nla_cache);
return combined_result;
}

View File

@ -273,6 +273,11 @@ bool BKE_collection_cycles_fix(Main *bmain, Collection *collection);
bool BKE_collection_has_collection(const Collection *parent, const Collection *collection);
/**
* Return parent collection which is not linked.
*/
Collection *BKE_collection_parent_editable_find_recursive(const ViewLayer *view_layer,
Collection *collection);
/**
* Rebuild parent relationships from child ones, for all children of given \a collection.
*

View File

@ -520,11 +520,13 @@ static void loose_data_instantiate_ensure_active_collection(
Scene *scene = instantiate_context->lapp_context->params->context.scene;
ViewLayer *view_layer = instantiate_context->lapp_context->params->context.view_layer;
/* Find or add collection as needed. */
/* Find or add collection as needed. When `active_collection` is non-null, it is assumed to be
* editable. */
if (instantiate_context->active_collection == nullptr) {
if (lapp_context->params->flag & FILE_ACTIVE_COLLECTION) {
LayerCollection *lc = BKE_layer_collection_get_active(view_layer);
instantiate_context->active_collection = lc->collection;
instantiate_context->active_collection = BKE_collection_parent_editable_find_recursive(
view_layer, lc->collection);
}
else {
if (lapp_context->params->flag & FILE_LINK) {

View File

@ -1239,8 +1239,8 @@ static void collection_gobject_assert_internal_consistency(Collection *collectio
}
}
static Collection *collection_parent_editable_find_recursive(const ViewLayer *view_layer,
Collection *collection)
Collection *BKE_collection_parent_editable_find_recursive(const ViewLayer *view_layer,
Collection *collection)
{
if (!ID_IS_LINKED(collection) && !ID_IS_OVERRIDE_LIBRARY(collection) &&
(view_layer == nullptr || BKE_view_layer_has_collection(view_layer, collection)))
@ -1265,7 +1265,7 @@ static Collection *collection_parent_editable_find_recursive(const ViewLayer *vi
}
return collection_parent->collection;
}
Collection *editable_collection = collection_parent_editable_find_recursive(
Collection *editable_collection = BKE_collection_parent_editable_find_recursive(
view_layer, collection_parent->collection);
if (editable_collection != nullptr) {
return editable_collection;
@ -1393,7 +1393,7 @@ bool BKE_collection_viewlayer_object_add(Main *bmain,
return false;
}
collection = collection_parent_editable_find_recursive(view_layer, collection);
collection = BKE_collection_parent_editable_find_recursive(view_layer, collection);
if (collection == nullptr) {
return false;

View File

@ -1905,6 +1905,12 @@ void DRW_render_gpencil(RenderEngine *engine, Depsgraph *depsgraph)
Scene *scene = DEG_get_evaluated_scene(depsgraph);
ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph);
RenderResult *render_result = RE_engine_get_result(engine);
RenderLayer *render_layer = RE_GetRenderLayer(render_result, view_layer->name);
if (render_layer == nullptr) {
return;
}
RenderEngineType *engine_type = engine->type;
Render *render = engine->re;
@ -1938,8 +1944,6 @@ void DRW_render_gpencil(RenderEngine *engine, Depsgraph *depsgraph)
BLI_rcti_init(&render_rect, 0, size[0], 0, size[1]);
}
RenderResult *render_result = RE_engine_get_result(engine);
RenderLayer *render_layer = RE_GetRenderLayer(render_result, view_layer->name);
for (RenderView *render_view = static_cast<RenderView *>(render_result->views.first);
render_view != nullptr;
render_view = render_view->next)

View File

@ -3212,6 +3212,7 @@ static int outliner_action_set_exec(bContext *C, wmOperator *op)
}
/* set notifier that things have changed */
DEG_id_tag_update(te->store_elem->id, ID_RECALC_ANIMATION);
WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, nullptr);
ED_undo_push(C, "Set action");

View File

@ -164,7 +164,6 @@ static void panel_draw(const bContext *C, Panel *panel)
{
modifier::greasepencil::draw_layer_filter_settings(C, influence_panel, ptr);
modifier::greasepencil::draw_material_filter_settings(C, influence_panel, ptr);
modifier::greasepencil::draw_vertex_group_settings(C, influence_panel, ptr);
}
modifier_panel_end(layout, ptr);

View File

@ -762,6 +762,11 @@ class RenderLayerOperation : public NodeOperation {
const int input_unit = GPU_shader_get_sampler_binding(shader, "input_tx");
GPU_texture_bind(pass_texture, input_unit);
/* Depth passes always need to be stored in full precision. */
if (GPU_texture_has_depth_format(pass_texture)) {
result.set_precision(ResultPrecision::Full);
}
const int2 compositing_region_size = context().get_compositing_region_size();
result.allocate_texture(Domain(compositing_region_size));
result.bind_as_image(shader, "output_img");

View File

@ -764,7 +764,7 @@ static void print_help(bArgs *ba, bool all)
PRINT(" $BLENDER_SYSTEM_PYTHON Directory for system Python libraries.\n");
if (defs.with_ocio) {
PRINT(" $OCIO Path to override the OpenColorIO config file.\n");
PRINT(" $OCIO Path to override the OpenColorIO configuration file.\n");
}
if (defs.win32 || all) {
PRINT(" $TEMP Store temporary files here (MS-Windows).\n");
@ -844,7 +844,8 @@ static const char arg_handle_python_set_doc_enable[] =
"Enable automatic Python script execution" PY_ENABLE_AUTO ".";
static const char arg_handle_python_set_doc_disable[] =
"\n\t"
"Disable automatic Python script execution (pydrivers & startup scripts)" PY_DISABLE_AUTO ".";
"Disable automatic Python script execution "
"(Python-drivers & startup scripts)" PY_DISABLE_AUTO ".";
# undef PY_ENABLE_AUTO
# undef PY_DISABLE_AUTO
@ -1163,7 +1164,7 @@ static const char arg_handle_debug_mode_generic_set_doc_depsgraph_pretty[] =
"Enable colors for dependency graph debug messages.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_uid[] =
"\n\t"
"Verify validness of session-wide identifiers assigned to ID datablocks.";
"Verify validness of session-wide identifiers assigned to ID data-blocks.";
static const char arg_handle_debug_mode_generic_set_doc_gpu_force_workarounds[] =
"\n\t"
"Enable workarounds for typical GPU issues and disable all GPU extensions.";
@ -1510,7 +1511,7 @@ static int arg_handle_with_borders(int /*argc*/, const char ** /*argv*/, void *
static const char arg_handle_without_borders_doc[] =
"\n\t"
"Force opening in fullscreen mode.";
"Force opening in full-screen mode.";
static int arg_handle_without_borders(int /*argc*/, const char ** /*argv*/, void * /*data*/)
{
WM_init_state_fullscreen_set();