Viewing 2 posts
  • #45254
    latvanytervseta
    Participant
    Posts: 16
    Threads: 30
    Joined: Feb 2025

      We noticed that if we drag the same asset into the same scene multiple times, the external group names are supplemented with a continuous group name of 001, 002, 003. If this could be done, it would be much more useful to replace the group name with the original file name when dragging. This way, the asset could be retrieved later at any time. What do you think?

      Tom

  • #45259
    Posts: 264
    Threads: 1261
    Joined: Aug 2009

      You can use the API to assign desired object name

      fn RenameNodesAfterMerge &PmPostMergeData =
      (
        for obj in PmPostMergeData.Nodes where isValidNode obj and not isDeleted obj do
            obj.Name = uniqueName (getFilenameFile PmPostMergeData.File)
      )
      
      if (superClassOf PmCallbacks == structDef) do (
          PmCallbacks.removeScripts CallbackID:#RenameNodesAfterMerge
          PmCallbacks.addScript #postFileMerge RenameNodesAfterMerge CallbackID:#RenameNodesAfterMerge
      )

      You can find this example script in the file “PostFileMerge Example.ms” (ProjectManager_3\presets\API examples\)

Viewing 2 posts

You must be logged in to reply to this topic.