1
$\begingroup$

I'm using a scrip Subprogram of Animation nodes to merge that will merge a list of objects using Bmesh (Because it holds the UVs)

But now i'm stuck at merging two Bmesh as the picture below explains.

enter image description here

$\endgroup$
  • $\begingroup$ Maybe that can help blender.stackexchange.com/questions/13986/…. Have a look in particular to CoDEmanX answer. But in AN context, I don't know if that can be applied so easily. $\endgroup$ – lemon Mar 16 '17 at 18:15
  • $\begingroup$ Yeah , it gave me pretty solid idea $\endgroup$ – Venay Mar 17 '17 at 15:26
0
$\begingroup$

SO i've managed to do the trick using the answer of CoDEmanX here : enter link description here Still very strict to use and have a high ms

import bpy 

AN= bpy.data.node_groups['NodeTree']
L = AN.nodes["Data Interface"].value

def OB_list_joiner(L,b,n):

    ctx = bpy.context.copy()
    P=[]

    for v in L :
        o=v.copy()
        o.data=v.data.copy()
        P.append(o)

    for v in P:
        bpy.context.scene.objects.link(v)

    ctx['active_object'] = P[0]
    ctx['selected_objects'] = P
    ctx['selected_editable_bases'] = [bpy.context.scene.object_bases[ob.name] for ob in P]
    P[0].name = n
    bpy.ops.object.join(ctx)
    return P[0]

if N not in bpy.data.objects :
    O = OB_list_joiner(L,True,N)
else :
    O = bpy.data.objects[N]

enter image description here

|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.