Hi Fergal,
I would be very interested if you could share your UUID code with me as well, if you are willing.
I may be doing something similar with collections soon.

Ryan

On 2020-11-13 06:00 AM, bf-committers-requ...@blender.org wrote:
Send Bf-committers mailing list submissions to
        bf-committers@blender.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.blender.org/mailman/listinfo/bf-committers
or, via email, send a message with subject or body 'help' to
        bf-committers-requ...@blender.org

You can reach the person managing the list at
        bf-committers-ow...@blender.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bf-committers digest..."


Today's Topics:

    1. Proposing a unique ID for Blender objects system, for use
       with game engines. (Juan Linietsky)
    2. Re: Proposing a unique ID for Blender objects system, for use
       with game engines. (Scott Wilson)
    3. Re: Proposing a unique ID for Blender objects system, for use
       with game engines. (Fergal Gribben)
    4. Re: Proposing a unique ID for Blender objects system, for use
       with game engines. (AMDBCG)
    5. Re: Proposing a unique ID for Blender objects system, for use
       with game engines. (Scott Wilson)


----------------------------------------------------------------------

Message: 1
Date: Thu, 12 Nov 2020 13:24:06 -0300
From: Juan Linietsky <j...@godotengine.org>
To: bf-blender developers <bf-committers@blender.org>
Subject: [Bf-committers] Proposing a unique ID for Blender objects
        system, for use with game engines.
Message-ID:
        <cab2r+_unnfy2u8qffube+ifrw3uitotnwmmw0wo-ozozgys...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi guys, lead Godot dev here.

I wanted to discuss with you a problem we are often having that I am not
certain how it can be solved entirely from our side, I add a proposal for
this, but if you guys have a better recommendation, I'm very open to any
ideas.

Basically, Godot will import scenes (GLTF/FBX/DAE/etc) as they come from
blender, and it generates the same object names, resource names, etc. as
they come from Blender and the resource file.

We use the same names so we can keep track of changes in the Blend file. If
an object is moved, a material is changed, etc. we detect on re-import and
everything is updated in Godot.

This is especially more annoying in Godot than in other game engines,
because Godot can read the whole Blender scene and keep it more or less
intact, so users love using this for level design workflow (so they can
design levels in Blender).

So, the problem is that it often happens that for some reason, artists want
to rename the objects in Blender. Be it because they didn't care at the
beginning and they want to become more organized later, or because the
scene became bigger and they need to make their naming of things more
precise to navigate it around. In this situation, when something is renamed
on the Blender side and re-exported, the game engines have no idea where
this object went, so we need to either remove it (resulting in loss data)
it or orphan it (resulting in duplicated data).

While I do think that good practices solve this and this is probably not
such an issue in a professional environment, truth is that game development
has become a huge hobbyist activity, and our users find this situation
constantly and are annoyed with it, and there is nothing we can do from our
side.

The obvious proposal to solve this would be to ask Blender whether it's
possible to generate a unique object ID (UUID?) and make sure it does not
change over time even if objects are renamed, then changing the exporters a
bit to (optionally if selected in the export settings) add this information
as extensions in the existing format (on GLTF it should be rather easy).

If you guys think this is possible, it would be very helpful for us, if you
have other ideas on how we could solve this, we are very open to discussion.

Best

Juan


------------------------------

Message: 2
Date: Thu, 12 Nov 2020 09:19:34 -0800
From: Scott Wilson <gdragon...@gmail.com>
To: bf-blender developers <bf-committers@blender.org>
Cc: Juan Linietsky <j...@godotengine.org>
Subject: Re: [Bf-committers] Proposing a unique ID for Blender objects
        system, for use with game engines.
Message-ID:
        <cak6zh-jefcrw9fuc4eztzrwfe3+dwtnvmgnornex7zxtcud...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Depending on how it is implemented, the unique IDs may be problematic. I
know that some other 3d packages do have support for unique IDs, but if you
reference in an asset multiple times, then you have duplicate IDs. If this
is something that the developers are interested in doing, then I'd like to
flag this as a possible issue.

On Thu., Nov. 12, 2020, 8:24 a.m. Juan Linietsky via Bf-committers, <
bf-committers@blender.org> wrote:

Hi guys, lead Godot dev here.

I wanted to discuss with you a problem we are often having that I am not
certain how it can be solved entirely from our side, I add a proposal for
this, but if you guys have a better recommendation, I'm very open to any
ideas.

Basically, Godot will import scenes (GLTF/FBX/DAE/etc) as they come from
blender, and it generates the same object names, resource names, etc. as
they come from Blender and the resource file.

We use the same names so we can keep track of changes in the Blend file. If
an object is moved, a material is changed, etc. we detect on re-import and
everything is updated in Godot.

This is especially more annoying in Godot than in other game engines,
because Godot can read the whole Blender scene and keep it more or less
intact, so users love using this for level design workflow (so they can
design levels in Blender).

So, the problem is that it often happens that for some reason, artists want
to rename the objects in Blender. Be it because they didn't care at the
beginning and they want to become more organized later, or because the
scene became bigger and they need to make their naming of things more
precise to navigate it around. In this situation, when something is renamed
on the Blender side and re-exported, the game engines have no idea where
this object went, so we need to either remove it (resulting in loss data)
it or orphan it (resulting in duplicated data).

While I do think that good practices solve this and this is probably not
such an issue in a professional environment, truth is that game development
has become a huge hobbyist activity, and our users find this situation
constantly and are annoyed with it, and there is nothing we can do from our
side.

The obvious proposal to solve this would be to ask Blender whether it's
possible to generate a unique object ID (UUID?) and make sure it does not
change over time even if objects are renamed, then changing the exporters a
bit to (optionally if selected in the export settings) add this information
as extensions in the existing format (on GLTF it should be rather easy).

If you guys think this is possible, it would be very helpful for us, if you
have other ideas on how we could solve this, we are very open to
discussion.

Best

Juan
_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers


------------------------------

Message: 3
Date: Thu, 12 Nov 2020 21:36:26 +0000
From: Fergal Gribben <fgrib...@gmail.com>
To: bf-blender developers <bf-committers@blender.org>
Cc: Scott Wilson <gdragon...@gmail.com>, Juan Linietsky
        <j...@godotengine.org>
Subject: Re: [Bf-committers] Proposing a unique ID for Blender objects
        system, for use with game engines.
Message-ID:
        <caelp2o++m_dde5xivicaowc8fahri4xnqysafacwz9kzr2k...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi Juan,

Recently I've been experimenting with such a system, and the code I have
works fine for what I need. I'm sure there are bugs in my code, and there
are probably a few glaring omissions too, but in summary, the code can:

- Generate a new UUID and assign it to a new object added to a scene
- Generate a new UUID and assign it to a duplicated object
- Remove the UUID from the list of known UUIDs when an object is deleted

It also works across multiple scenes. I'm not sure if we're allowed to send
zip files on this mailing list but if not I could send you the code
directly? I've ripped it out of my addon so it works in isolation, and the
best way to test it is to run Blender from the command line so you can see
the list of UUIDs being printed as you add/delete objects.

On Thu, 12 Nov 2020 at 17:20, Scott Wilson via Bf-committers <
bf-committers@blender.org> wrote:

Depending on how it is implemented, the unique IDs may be problematic. I
know that some other 3d packages do have support for unique IDs, but if you
reference in an asset multiple times, then you have duplicate IDs. If this
is something that the developers are interested in doing, then I'd like to
flag this as a possible issue.

On Thu., Nov. 12, 2020, 8:24 a.m. Juan Linietsky via Bf-committers, <
bf-committers@blender.org> wrote:

Hi guys, lead Godot dev here.

I wanted to discuss with you a problem we are often having that I am not
certain how it can be solved entirely from our side, I add a proposal for
this, but if you guys have a better recommendation, I'm very open to any
ideas.

Basically, Godot will import scenes (GLTF/FBX/DAE/etc) as they come from
blender, and it generates the same object names, resource names, etc. as
they come from Blender and the resource file.

We use the same names so we can keep track of changes in the Blend file.
If
an object is moved, a material is changed, etc. we detect on re-import
and
everything is updated in Godot.

This is especially more annoying in Godot than in other game engines,
because Godot can read the whole Blender scene and keep it more or less
intact, so users love using this for level design workflow (so they can
design levels in Blender).

So, the problem is that it often happens that for some reason, artists
want
to rename the objects in Blender. Be it because they didn't care at the
beginning and they want to become more organized later, or because the
scene became bigger and they need to make their naming of things more
precise to navigate it around. In this situation, when something is
renamed
on the Blender side and re-exported, the game engines have no idea where
this object went, so we need to either remove it (resulting in loss data)
it or orphan it (resulting in duplicated data).

While I do think that good practices solve this and this is probably not
such an issue in a professional environment, truth is that game
development
has become a huge hobbyist activity, and our users find this situation
constantly and are annoyed with it, and there is nothing we can do from
our
side.

The obvious proposal to solve this would be to ask Blender whether it's
possible to generate a unique object ID (UUID?) and make sure it does not
change over time even if objects are renamed, then changing the
exporters a
bit to (optionally if selected in the export settings) add this
information
as extensions in the existing format (on GLTF it should be rather easy).

If you guys think this is possible, it would be very helpful for us, if
you
have other ideas on how we could solve this, we are very open to
discussion.

Best

Juan
_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers

_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers


------------------------------

Message: 4
Date: Thu, 12 Nov 2020 18:20:24 -0700
From: AMDBCG <amd...@gmail.com>
To: bf-committers@blender.org
Subject: Re: [Bf-committers] Proposing a unique ID for Blender objects
        system, for use with game engines.
Message-ID: <caadf069-5e91-61fd-dda1-d1f4f2bac...@gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed

Python has an id for each object that can be referenced in your Blender
importer

https://www.programiz.com/python-programming/methods/built-in/id - where
id is the main id of the object

-Robert Fornof (amdbcg)

On 11/12/2020 9:24 AM, Juan Linietsky via Bf-committers wrote:
Hi guys, lead Godot dev here.

I wanted to discuss with you a problem we are often having that I am not
certain how it can be solved entirely from our side, I add a proposal for
this, but if you guys have a better recommendation, I'm very open to any
ideas.

Basically, Godot will import scenes (GLTF/FBX/DAE/etc) as they come from
blender, and it generates the same object names, resource names, etc. as
they come from Blender and the resource file.

We use the same names so we can keep track of changes in the Blend file. If
an object is moved, a material is changed, etc. we detect on re-import and
everything is updated in Godot.

This is especially more annoying in Godot than in other game engines,
because Godot can read the whole Blender scene and keep it more or less
intact, so users love using this for level design workflow (so they can
design levels in Blender).

So, the problem is that it often happens that for some reason, artists want
to rename the objects in Blender. Be it because they didn't care at the
beginning and they want to become more organized later, or because the
scene became bigger and they need to make their naming of things more
precise to navigate it around. In this situation, when something is renamed
on the Blender side and re-exported, the game engines have no idea where
this object went, so we need to either remove it (resulting in loss data)
it or orphan it (resulting in duplicated data).

While I do think that good practices solve this and this is probably not
such an issue in a professional environment, truth is that game development
has become a huge hobbyist activity, and our users find this situation
constantly and are annoyed with it, and there is nothing we can do from our
side.

The obvious proposal to solve this would be to ask Blender whether it's
possible to generate a unique object ID (UUID?) and make sure it does not
change over time even if objects are renamed, then changing the exporters a
bit to (optionally if selected in the export settings) add this information
as extensions in the existing format (on GLTF it should be rather easy).

If you guys think this is possible, it would be very helpful for us, if you
have other ideas on how we could solve this, we are very open to discussion.

Best

Juan
_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers

------------------------------

Message: 5
Date: Thu, 12 Nov 2020 17:51:03 -0800
From: Scott Wilson <gdragon...@gmail.com>
To: bf-blender developers <bf-committers@blender.org>
Subject: Re: [Bf-committers] Proposing a unique ID for Blender objects
        system, for use with game engines.
Message-ID:
        <CAK6zh-jWEDzQgVdgM3i52VcGeOS9r3Dn9eZX=Jv=ih-pn3-...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

That's only valid for the lifetime of the object, though (it uses the
memory location of the object). If you restart Blender, delete the Python
object, or create a new Python object that points to the same memory in C,
then all the IDs will likely be different for the same object in C. Also,
the C objects' memory locations will likely change between Blender
restarts, and deletions.

On Thu., Nov. 12, 2020, 5:20 p.m. AMDBCG via Bf-committers, <
bf-committers@blender.org> wrote:

Python has an id for each object that can be referenced in your Blender
importer

https://www.programiz.com/python-programming/methods/built-in/id - where
id is the main id of the object

-Robert Fornof (amdbcg)

On 11/12/2020 9:24 AM, Juan Linietsky via Bf-committers wrote:
Hi guys, lead Godot dev here.

I wanted to discuss with you a problem we are often having that I am not
certain how it can be solved entirely from our side, I add a proposal for
this, but if you guys have a better recommendation, I'm very open to any
ideas.

Basically, Godot will import scenes (GLTF/FBX/DAE/etc) as they come from
blender, and it generates the same object names, resource names, etc. as
they come from Blender and the resource file.

We use the same names so we can keep track of changes in the Blend file.
If
an object is moved, a material is changed, etc. we detect on re-import
and
everything is updated in Godot.

This is especially more annoying in Godot than in other game engines,
because Godot can read the whole Blender scene and keep it more or less
intact, so users love using this for level design workflow (so they can
design levels in Blender).

So, the problem is that it often happens that for some reason, artists
want
to rename the objects in Blender. Be it because they didn't care at the
beginning and they want to become more organized later, or because the
scene became bigger and they need to make their naming of things more
precise to navigate it around. In this situation, when something is
renamed
on the Blender side and re-exported, the game engines have no idea where
this object went, so we need to either remove it (resulting in loss data)
it or orphan it (resulting in duplicated data).

While I do think that good practices solve this and this is probably not
such an issue in a professional environment, truth is that game
development
has become a huge hobbyist activity, and our users find this situation
constantly and are annoyed with it, and there is nothing we can do from
our
side.

The obvious proposal to solve this would be to ask Blender whether it's
possible to generate a unique object ID (UUID?) and make sure it does not
change over time even if objects are renamed, then changing the
exporters a
bit to (optionally if selected in the export settings) add this
information
as extensions in the existing format (on GLTF it should be rather easy).

If you guys think this is possible, it would be very helpful for us, if
you
have other ideas on how we could solve this, we are very open to
discussion.
Best

Juan
_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers
_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers


------------------------------

Subject: Digest Footer

_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers


------------------------------

End of Bf-committers Digest, Vol 838, Issue 1
*********************************************

_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to