Geometry index inconsistency

Discuss Urho3D art-related topics (creation, import, export, troubleshooting) and share your free art.
Forum rules
Please only share free art (eg. public domain or open source-licensed such as Creative Commons) that you own the copyright to. Do not advertise for-pay content.

Geometry index inconsistency

PostPosted by Modanung » 09 Oct 2015, 19:59

The indices of geometries/materials seem unrelated to the order in which they are listed in Blender. Is there a way to control their order? Not being able to predict this order is inconvenient.
I'm improving the random pilot/pedestrian generation code for heXon/OGTatt.
for (Person* p : people)
ΞΞΞΞp->StopUsingWindows("https://www.linuxmint.com");
User avatar
Modanung
Active user
Active user
 
Posts: 171
Joined: 22 Jan 2015, 14:53
Location: The Netherlands

Re: Geometry index inconsistency

PostPosted by codingmonkey » 10 Oct 2015, 10:52

did you try this sorting ?

Image
User avatar
codingmonkey
Have many posts
Have many posts
 
Posts: 517
Joined: 21 Oct 2014, 19:26
Location: Russian Federation, Novosibirsk

Re: Geometry index inconsistency

PostPosted by Modanung » 10 Oct 2015, 17:17

I was not aware of this option, I'll try that. Seems like sorting by material is what I would need. Awesome.
Thanks again!

EDIT: Yep, that's it! Cool; what a relief. :)
heXon pilots are now saved to and loaded from a file.

EDIT2: This python script does the same for all selected objects:
Code: Select all
import bpy

for ob in bpy.context.selected_objects:
    bpy.context.scene.objects.active = ob
   
    bpy.ops.object.mode_set(mode = 'EDIT')
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.sort_elements(type='MATERIAL', elements={'FACE'})
    bpy.ops.object.mode_set(mode = 'OBJECT')
for (Person* p : people)
ΞΞΞΞp->StopUsingWindows("https://www.linuxmint.com");
User avatar
Modanung
Active user
Active user
 
Posts: 171
Joined: 22 Jan 2015, 14:53
Location: The Netherlands


Return to Artists

Who is online

Users browsing this forum: No registered users and 1 guest

cron