<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Using BMesh you can use custom data layers (see
<a class="moz-txt-link-freetext" href="https://www.blender.org/api/blender_python_api_2_77_0/bmesh.types.html#custom-data-layer-access">https://www.blender.org/api/blender_python_api_2_77_0/bmesh.types.html#custom-data-layer-access</a>
      ) - generic int/float/string ones.</p>
    <p>Beyond that not much to do, mesh items have no uid at all,
      outside of bmesh I guess you could encode some data into a vgroup
      e.g. (for vertices at least), but that’s rather limited and
      hackish.<br>
    </p>
    <br>
    <div class="moz-cite-prefix">Le 30/06/2016 à 17:35, Khalifa Lame a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CAKQbnQ3A0TTtQaCrsTc4fXNFU2HbL4V5uu_di3ZudLZ2==4z_g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Alternatively, do those mesh elements have internal
        unique constant IDs i can access? Indices change all the time (I
        believe), so they are not a reliable way to identify mesh
        elements.<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Jun 30, 2016 at 3:21 PM,
          Khalifa Lame <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:khalibloo@gmail.com" target="_blank">khalibloo@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Ah, that explains a lot. An error message
              during prop creation would have been very helpful. So what
              options (if any) do I have? Verts, edges and faces do have
              individual properties like bevel and crease weights. How
              were those properties created? Can I somehow squeeze in my
              own custom properties as well?<br>
            </div>
            <div class="gmail_extra">
              <div>
                <div class="h5"><br>
                  <div class="gmail_quote">On Thu, Jun 30, 2016 at 1:11
                    PM, Bastien Montagne <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:montagne29@wanadoo.fr"
                        target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:montagne29@wanadoo.fr">montagne29@wanadoo.fr</a></a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000">
                        <p>ID properties are only available for IDs (and
                          a few other special cases, like bones and some
                          UI classes). Other types just do not support
                          them at all.</p>
                        <p>To check wether a type supports ID
                          properties, just try to use one of its mapping
                          protocol item (e.g. <tt>C.object.keys()</tt>
                          works, while <tt>C.object.vertex_groups[0].keys()</tt>
                          does not).<br>
                        </p>
                        <div>
                          <div> <br>
                            <div>Le 30/06/2016 à 13:08, Khalifa Lame a
                              écrit :<br>
                            </div>
                          </div>
                        </div>
                        <blockquote type="cite">
                          <div>
                            <div>
                              <div dir="ltr">
                                <div>Hi. I need assign custom properties
                                  to mesh vertices, edges and faces. It
                                  doesn't throw any errors on creation
                                  of the custom props, but after they've
                                  been created, they don't behave as one
                                  would expect. They are read-only
                                  tuples rather than
                                  bpy.props.IntProperty() for example.<br>
                                  <br>
                                </div>
                                For comparison, here's the normal
                                behavior of a custom property<br>
                                <div>
                                  <div><img
                                      src="cid:part3.7049F35E.DDE4EC74@wanadoo.fr"
                                      height="60" width="387"><br>
                                    <br>
                                  </div>
                                  <div>Here's what I get on certain
                                    bpy.types<br>
                                    <img
                                      src="cid:part4.DCF042BC.5633C913@wanadoo.fr"
                                      height="61" width="430"><br>
                                  </div>
                                  <div>​An unusable tuple!<br>
                                    <br>
                                  </div>
                                  <div>And if I try to assign a value, I
                                    get<br>
                                    <img
                                      src="cid:part5.F6293210.B676E080@wanadoo.fr"
                                      height="65" width="440"><br>
                                    ​<br>
                                    <br>
                                  </div>
                                  <div>Is there a reason for this? Is
                                    there a known workaround or hack? I
                                    really do need to store custom props
                                    on vertices, edges, faces and vertex
                                    groups.<br>
                                  </div>
                                  <div>​<br clear="all">
                                    <div><br>
                                      -- <br>
                                      <div
                                        data-smartmail="gmail_signature">khalibloo®<br>
                                        <br>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                              <br>
                              <fieldset></fieldset>
                              <br>
                            </div>
                          </div>
                          <pre>_______________________________________________
Bf-python mailing list
<a moz-do-not-send="true" href="mailto:Bf-python@blender.org" target="_blank">Bf-python@blender.org</a>
<a moz-do-not-send="true" href="https://lists.blender.org/mailman/listinfo/bf-python" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a>
</pre>
                        </blockquote>
                        <br>
                      </div>
                      <br>
                      _______________________________________________<br>
                      Bf-python mailing list<br>
                      <a moz-do-not-send="true"
                        href="mailto:Bf-python@blender.org"
                        target="_blank">Bf-python@blender.org</a><br>
                      <a moz-do-not-send="true"
                        href="https://lists.blender.org/mailman/listinfo/bf-python"
                        rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <br>
                </div>
              </div>
              <span class="HOEnZb"><font color="#888888">-- <br>
                  <div data-smartmail="gmail_signature">khalibloo®<br>
                    <br>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div class="gmail_signature" data-smartmail="gmail_signature">khalibloo®<br>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Bf-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Bf-python@blender.org">Bf-python@blender.org</a>
<a class="moz-txt-link-freetext" href="https://lists.blender.org/mailman/listinfo/bf-python">https://lists.blender.org/mailman/listinfo/bf-python</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>