Issue with Script Properties Not Serializing via kTextObjectScriptElement During IDML Export
Hi all,
In our plugin, we’re trying to serialize text-related settings into IDML. We’ve defined a custom scripting provider like this in our .fr file:
Object{ kTextStyleRangeObjectScriptElement },
Object{ kTextObjectScriptElement },
Property{ kSliParaChangesPropScriptElement, kReadWrite },
Property{ kRuleParaChangesPropScriptElement, kReadWrite },
This should expose our properties to text-level objects like paragraphs, characters, and text style ranges.
We implemented the scripting interface in our provider:
ErrorCode TextScriptProvider::AccessProperty(ScriptID propID, I_SCRIPT_REQUEST_DATA* data, IScript* script)
The Issue:
During IDML export, AccessProperty() is only called once, and only for one ScriptID. We expected it to be called for all registered properties, especially if the attributes are attached.
However, if we switch the Object{} definition to this:
Object{ kTextStyleRangeObjectScriptElement },
Object{ kPageItemObjectScriptElement },
then all script IDs get serialized during IDML export but we know this is incorrect because kPageItemObjectScriptElement is intended for frames and graphics, not text content.
so the question is
Is there a correct way to ensure all relevant ScriptIDs are serialized/exported using kTextObjectScriptElement and kTextStyleRangeObjectScriptElement ?
We do ensure that our custom attributes are applied to the text so any insights into how the IDML export engine chooses which script properties to serialize on text objects and how to ensure it sees ours would be appreciated!
