Hi! First of all, I love the idea of finally replacing silly numbers with actual names of materials! Surely this has been a feature request of everyone that uses blender since they were added :)
But what I question is why you would need a do_versions? Would it not make more sense to leave the underlying value as a number, but just change the display to be a looked up value from some py dict or enum or something? This would allow it to "just work". Anyways, forgive my ignorance as I am not aware of what the typical approach to this would be in blender. And thanks again for working on this type of number -> string mapping! :) Dan On Sat, Mar 30, 2013 at 8:46 AM, Julien Duroure <julien.duro...@gmail.com>wrote: > Hi all, > > I implemented some code to replace, in particle render section, the > material index ( 1, 2 or 3 for example ), by a direct material choice ( > Material, Material.001, etc...) > > Code is now OK, but I am currenly working on do_versions, to be able to > open old files with this new "feature". > > I try to implement this kind of code : http://pastebin.com/Czy3rfqZ > But I have a segfault when access on part->omat. > It seems to be linked to preview.blend objects. > GDB said that psys->part adresse can't be access. > > I don't know how preview exactly works : is there someome can explain me > why I have this problem and how to correct it ? > > Thanks & Regards, > > Julien > _______________________________________________ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers