BUG: Objects with the same name overwrite each other.

Issue #4 resolved
Donovan Keith created an issue

If I make a Cube in C4D, and then make another Cube in C4D (with the same name)

screenshot.126.jpg

Then transfer them to Unreal, only the last object named Cube will be visible. This is because all subsequent objects with the same name overwrite the first.

screenshot.127.jpg

It seems like something other than Object Name needs to be used to establish the link between the two scenes if a duplicate object is detected in the project file.

Comments (13)

  1. Leo “Leho” Horovitz

    Yes, this is a known problem. When developing the plugin, I looked into how to establish a link between objects and found that the unique IDs generated by Cinema4D seemed to not be necessarily globally unique and not permanent, though I may be mistaken about how this actually works. Furthermore, materials do not seem to have unique IDs the same way that objects do. So I decided to just use names to identify which objects and materials to overwrite when exporting to Unreal.

    Coming up with a better solution for this is something that will have to be left to consider in possible future versions and in the meantime, please make sure that objects and materials have unique names.

  2. Donovan Keith reporter

    Possible Solutions: - Auto-rename objects with duplicate names on export. - Add a custom tag to all exported objects with some sort of unique ID.

  3. Leo “Leho” Horovitz

    Yes, I was thinking about that. But I'm not sure whether to rename just the imported objects in Unreal or to actually rename the objects in the Cinema4D scene. The latter might cause problems because people probably expect the plugin the leave their scenes intact, but the former could also cause problems if the generated unique name in Unreal is not the same at every export. I might have to go with just renaming in Unreal as I really want to leave the Cinema scene untouched.

  4. Donovan Keith reporter

    Prompt the user and rename in Cinema 4D.

    Duplicate object names detected. Names must be unique for proper syncing.
    [AutoRename] [Cancel]
    
  5. Donovan Keith reporter

    AutoRename.jpg

    Big Improvement, thanks!

    If you get the chance to revisit this bit of code:

    1. "Auto rename" -> "Auto Rename"
    2. Fit the size of the buttons to the size of the text.
    3. Add a line break between "Duplicate object names detected." and "Names must be unique for proper syncing."
    4. Add a bit of padding on the sides of the dialog and between the buttons.
    5. Fit the width/height of the dialog to that of the text/buttons.
  6. Donovan Keith reporter

    Remaining issue: If I click on "Auto Rename" the objects are renamed, but they aren't sent to UE. After auto-rename they should be transferred.

  7. Donovan Keith reporter

    Also, as Materials w/ the same name can also trigger this, perhaps the text should change to "Duplicate object/material names..."

  8. Log in to comment