Viewing 2 posts
- July 9, 2025 at 13:46 #45254
latvanytervseta
ParticipantPosts: 16Threads: 30Joined: Feb 2025We 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
- July 9, 2025 at 14:29 #45259
Oleksandr Kramer
ModeratorPosts: 264Threads: 1261Joined: Aug 2009You 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.