mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
Compare commits
1 Commits
5099a13987
...
wip/Jehan/
Author | SHA1 | Date | |
---|---|---|---|
|
db473c7fc7 |
@@ -1167,6 +1167,7 @@ gimp_filter_tool_commit (GimpFilterTool *filter_tool,
|
||||
region = gimp_drawable_filter_get_region (filter_tool->filter);
|
||||
|
||||
existing_node = gimp_drawable_filter_get_operation (filter_tool->existing_filter);
|
||||
gegl_node_set_op_version (existing_node, NULL);
|
||||
gegl_node_get (existing_node,
|
||||
"operation", &name,
|
||||
NULL);
|
||||
|
@@ -2515,8 +2515,9 @@ xcf_load_effect_props (XcfInfo *info,
|
||||
xcf_read_int32 (info, (guint32 *) &filter_type, 1);
|
||||
|
||||
/* Check if valid property first */
|
||||
if (! (pspec = gegl_operation_find_property (filter->operation_name,
|
||||
filter_prop_name)))
|
||||
if (! (pspec = gegl_operation_find_property_for_version (filter->operation_name,
|
||||
filter_prop_name,
|
||||
filter->op_version)))
|
||||
{
|
||||
gimp_message (info->gimp, G_OBJECT (info->progress),
|
||||
GIMP_MESSAGE_WARNING,
|
||||
@@ -3398,8 +3399,8 @@ xcf_load_effect (XcfInfo *info,
|
||||
}
|
||||
|
||||
if (filter->op_version &&
|
||||
g_strcmp0 (gegl_operation_get_op_version (filter->operation_name),
|
||||
filter->op_version) != 0)
|
||||
! gegl_operation_is_supported_version (filter->operation_name,
|
||||
filter->op_version))
|
||||
{
|
||||
filter->unsupported_operation = TRUE;
|
||||
|
||||
@@ -3421,6 +3422,9 @@ xcf_load_effect (XcfInfo *info,
|
||||
"operation", filter->operation_name,
|
||||
NULL);
|
||||
|
||||
if (filter->op_version)
|
||||
gegl_node_set_op_version (filter->operation, filter->op_version);
|
||||
|
||||
/* read in the effect properties */
|
||||
if (! xcf_load_effect_props (info, &(*filter)))
|
||||
goto error;
|
||||
|
@@ -835,10 +835,11 @@ xcf_save_effect_props (XcfInfo *info,
|
||||
GimpFilter *filter,
|
||||
GError **error)
|
||||
{
|
||||
GParamSpec **pspecs;
|
||||
guint n_pspecs;
|
||||
GeglNode *node;
|
||||
gchar *operation;
|
||||
const gchar **names = NULL;
|
||||
GParamSpec **pspecs;
|
||||
guint n_pspecs;
|
||||
GeglNode *node;
|
||||
gchar *operation;
|
||||
|
||||
xcf_check_error (xcf_save_prop (info, image, PROP_VISIBLE, error,
|
||||
gimp_filter_get_active (filter)), ;);
|
||||
@@ -864,7 +865,7 @@ xcf_save_effect_props (XcfInfo *info,
|
||||
"operation", &operation,
|
||||
NULL);
|
||||
|
||||
pspecs = gegl_operation_list_properties (operation, &n_pspecs);
|
||||
pspecs = gegl_node_list_properties (node, &names, &n_pspecs);
|
||||
|
||||
for (gint i = 0; i < n_pspecs; i++)
|
||||
{
|
||||
@@ -873,8 +874,7 @@ xcf_save_effect_props (XcfInfo *info,
|
||||
FilterPropType filter_type = FILTER_PROP_UNKNOWN;
|
||||
|
||||
g_value_init (&value, pspec->value_type);
|
||||
gegl_node_get_property (node, pspec->name,
|
||||
&value);
|
||||
gegl_node_get_property (node, names[i], &value);
|
||||
|
||||
switch (G_VALUE_TYPE (&value))
|
||||
{
|
||||
@@ -918,7 +918,7 @@ xcf_save_effect_props (XcfInfo *info,
|
||||
GIMP_MESSAGE_WARNING,
|
||||
"XCF Warning: argument \"%s\" of filter %s has "
|
||||
"unsupported type %s. It was discarded.",
|
||||
pspec->name, operation,
|
||||
names[i], operation,
|
||||
g_type_name (G_VALUE_TYPE (&value)));
|
||||
}
|
||||
break;
|
||||
@@ -926,12 +926,13 @@ xcf_save_effect_props (XcfInfo *info,
|
||||
|
||||
if (filter_type != FILTER_PROP_UNKNOWN)
|
||||
xcf_check_error (xcf_save_prop (info, image, PROP_FILTER_ARGUMENT, error,
|
||||
pspec->name, filter_type, value), ;);
|
||||
names[i], filter_type, value), ;);
|
||||
|
||||
g_value_unset (&value);
|
||||
}
|
||||
g_free (operation);
|
||||
g_free (pspecs);
|
||||
g_free (names);
|
||||
|
||||
xcf_check_error (xcf_save_prop (info, image, PROP_END, error), ;);
|
||||
|
||||
|
Reference in New Issue
Block a user