Bug 482490 - Cross-channel color adjustment filter could not be configured by script
Summary: Cross-channel color adjustment filter could not be configured by script
Status: RESOLVED DUPLICATE of bug 482491
Alias: None
Product: krita
Classification: Applications
Component: Scripting (other bugs)
Version First Reported In: 5.2.2
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks: 482491
  Show dependency treegraph
 
Reported: 2024-03-05 20:32 UTC by mbcnve
Modified: 2024-03-05 20:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Test code (61.94 KB, image/png)
2024-03-05 20:33 UTC, mbcnve
Details
Source code about 'nTransfer' (228.90 KB, image/png)
2024-03-05 20:35 UTC, mbcnve
Details
driver channel (49.27 KB, image/png)
2024-03-05 20:37 UTC, mbcnve
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mbcnve 2024-03-05 20:32:53 UTC
Cross-channel color adjustment filter could not be configured by script. When such a filter is created by code, its configuration property is initialized to {'nTransfers': 0}. However, a normal color adjustment filter created by GUI dialog has configuration properties like  {'curve0': '0,0.5;1,0.5;', 'curve1': '0,0.5;1,0.5;', 'curve2': '0,0.5;1,0.5;', 'curve3': '0,0.5;1,0.5;', 'curve4': '0,0;1,0.5;', 'curve5': '0,0.5;1,0.5;', 'curve6': '0,0.5;1,0.5;', 'curve7': '0,0.5;1,0.5;', 'nTransfers': 8}. Then, I tried to add these cruve information to the initial empty configuration created by script. However, the code didn't work as expected, that the cruve 0-7 is added to filter configuration while property 'nTransfers' always remains 0. (fig.1)

According to the source code (fig.2), property 'nTransfers' should change with the curve infomation added, but it didn't work. Furthermore,the curve infomation is also ignored, the filter created by the script didn't work as the curve info I specified.

Moreover, the curve 0-7 only specify the mapping curve for 8 output channels. However, the driver channel is not specified by the filter configuration, which means that dirver channel infomation could not be accessed by script.(fig.3)

Similar problem with other colour adjustment filter: https://krita-artists.org/t/scripting-with-colour-adjustment-filter-layer/23229
Comment 1 mbcnve 2024-03-05 20:33:54 UTC
Created attachment 166437 [details]
Test code
Comment 2 mbcnve 2024-03-05 20:35:42 UTC
Created attachment 166438 [details]
Source code about 'nTransfer'
Comment 3 mbcnve 2024-03-05 20:37:53 UTC
Created attachment 166439 [details]
driver channel
Comment 4 mbcnve 2024-03-05 20:52:54 UTC

*** This bug has been marked as a duplicate of bug 482491 ***