Copy on write: VIEW3D_OT_clear_render_border + rna

This commit is contained in:
Dalai Felinto 2018-05-15 18:19:08 +02:00
parent 4f8b6428bc
commit 9439df1ab8
Notes: blender-bot 2023-02-14 05:57:10 +01:00
Referenced by issue #54829, COW Operators: 3D View
2 changed files with 5 additions and 3 deletions

View File

@ -3342,6 +3342,9 @@ static int clear_render_border_exec(bContext *C, wmOperator *UNUSED(op))
border->xmax = 1.0f;
border->ymax = 1.0f;
if (rv3d->persp == RV3D_CAMOB) {
DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
}
return OPERATOR_FINISHED;
}

View File

@ -1643,8 +1643,7 @@ static void rna_Scene_simplify_update(Main *bmain, Scene *scene, PointerRNA *ptr
static void rna_SceneRenderData_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Scene *sce = ptr->id.data;
DEG_id_tag_update(&sce->id, 0);
DEG_id_tag_update(&sce->id, DEG_TAG_COPY_ON_WRITE);
}
static void rna_Scene_use_persistent_data_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@ -5038,7 +5037,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size ");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderData_update");
prop = RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.xmin");