[Bf-committers] Particle system / Material choice / implementation of do_versions : problem with preview.blend

Erwin erwin.coumans at gmail.com
Sat Mar 30 17:38:32 CET 2013


Do you break backward compatibility?
That could be a concern to some.

Can a previous Blender load a new .blend file with particles?





Sent from my iPhone

On Mar 30, 2013, at 9:11 AM, Julien Duroure <julien.duroure at gmail.com> wrote:

> Hello,
> 
> I don't think it a good idea to display material, and to store only
> integer. I think ( but I am not a regular blender dev ) it must be
> consistent between what we see and what we store.
> That's why In my current implementation, I replace Integer "Material Index"
> by a material' pointer.
> 
> In do_versions, I only have to retrieve material corresponding to each
> index, using give_current_material
> But I have the problem I explain in my previous email...
> 
> Regards,
> 
> Julien
> 
> On Sat, Mar 30, 2013 at 2:46 PM, trouble daemon <troubledaemon at gmail.com>wrote:
> 
>> 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.duroure at 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 at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers


More information about the Bf-committers mailing list