Merge branch 'blender-v4.0-release'

This commit is contained in:
Pratik Borhade
2023-10-22 11:12:03 +05:30
3 changed files with 24 additions and 1 deletions
+2 -1
View File
@@ -1672,7 +1672,8 @@ class WM_OT_properties_edit(Operator):
self.soft_max_float = rna_data["soft_max"]
self.precision = rna_data["precision"]
self.step_float = rna_data["step"]
self.subtype = rna_data["subtype"]
if rna_data["subtype"] in self.subtype_items_cb(None):
self.subtype = rna_data["subtype"]
self.use_soft_limits = (
self.min_float != self.soft_min_float or
self.max_float != self.soft_max_float
@@ -2240,6 +2240,17 @@ static int animchannels_delete_exec(bContext *C, wmOperator * /*op*/)
/* try to delete the layer's data and the layer itself */
BKE_gpencil_layer_delete(gpd, gpl);
ale->update = ANIM_UPDATE_DEPS;
/* Free Grease Pencil data block when last annotation layer is removed, see: #112683. */
if (gpd->flag & GP_DATA_ANNOTATIONS && gpd->layers.first == nullptr) {
BKE_gpencil_free_data(gpd, true);
Scene *scene = CTX_data_scene(C);
scene->gpd = nullptr;
Main *bmain = CTX_data_main(C);
BKE_id_free_us(bmain, gpd);
}
break;
}
case ANIMTYPE_GREASE_PENCIL_LAYER: {
@@ -345,6 +345,17 @@ static int gpencil_layer_remove_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, nullptr);
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, nullptr);
/* Free Grease Pencil data block when last annotation layer is removed, see: #112683. */
if (is_annotation && gpd->layers.first == nullptr) {
BKE_gpencil_free_data(gpd, true);
bGPdata **gpd_ptr = ED_annotation_data_get_pointers(C, nullptr);
*gpd_ptr = nullptr;
Main *bmain = CTX_data_main(C);
BKE_id_free_us(bmain, gpd);
}
return OPERATOR_FINISHED;
}