Selected Assets Issue (Daz Studio 2026 Public Build)

Stretch65Stretch65 Posts: 176
// DAZ Studio version 6.25.2026.6423 filetype DAZ Script// Before running this, make sure the Content Library Pane is visible,// with at least one asset selected:var oPaneMgr = MainWindow.getPaneMgr();var oContentLibPane = oPaneMgr.findPane("DzContentLibraryPane");			var aSelAssets = oContentLibPane.getSelectedAssets();var oAsset, oFile;for (var i = 0; i < aSelAssets.length; i++) {	oAsset = aSelAssets[i];	oFile = oAsset.getAsLocalFile();}

Hi,

In the above snippet, I'm getting the following warning in the Script IDE:

 

file:///C:/Scripts/Issue/Sample.dsa:17: Calling C++ methods with 'this' objects different from the one they were retrieved from is broken, due to historical reasons. The original object is used as 'this' object. You can allow the given 'this' object to be used by setting 'pragma NativeMethodBehavior: AcceptThisObject'

 

The warning occurs inside the for loop.  I have no idea what the warning means.

Post edited by Stretch65 on

Comments

  • Richard HaseltineRichard Haseltine Posts: 109,675

    I would suspect it is bleeding through from an issue in the scriptiing engine. It would probably be best to to post this to the main DS 2026 thread.

  • V3DigitimesV3Digitimes Posts: 3,388
    edited March 30

    Yes it's 100% 2026 related.
    It rather often occurs.
    It never prevented my scripts to work in DS2026. Even complex scripts where any mistake could be dramatic.
    So I trust the warning status as the correct status, with no influence as mentionned in the link just shown above my post.
    And using : pragma NativeMethodBehavior: AcceptThisObject in script intro is useless.

    edit :
    Do you want me to report in the 2026 forum?

    Post edited by V3Digitimes on
  • Richard HaseltineRichard Haseltine Posts: 109,675
    edited March 30

    V3Digitimes said:

    Yes it's 100% 2026 related.

    I think more likely Qt 6 - the link in the post above is not a DS script.

    It rather often occurs.
    It never prevented my scripts to work in DS2026. Even complex scripts where any mistake could be dramatic.
    So I trust the warning status as the correct status, with no influence as mentionned in the link just shown above my post.
    And using : pragma NativeMethodBehavior: AcceptThisObject in script intro is useless.

    edit :
    Do you want me to report in the 2026 forum?

    Yes, please.

    Post edited by Richard Haseltine on
  • V3DigitimesV3Digitimes Posts: 3,388

    I'll do this this week end I think, I have a super over busy end of week. Should be more calm the next couple of days.

Sign In or Register to comment.