April 22, 2014, 09:23 (GMT) |
Add position attribute to particles by default. |
April 22, 2014, 09:23 (GMT) |
Use a readonly flag for attributes and a second variant of the Data RNA access types to prevent writing over immutable attributes ("id" in particular). |
April 22, 2014, 09:23 (GMT) |
Initialize the "id" attribute when adding particles to the state. |
April 22, 2014, 09:23 (GMT) |
Use the new attribute flags to determine editability in RNA. |
April 22, 2014, 09:23 (GMT) |
Flags for particle attributes: - REQUIRED: These attributes are always existent in every particle system. Currently this is only the "id" layer, position might also be added - PROTECTED: Attribute name, datatype, etc. can not be changed. Only user-defined attributes can be modified this way. |
April 22, 2014, 09:23 (GMT) |
RNA fix: using RNA_def_struct_sdna_from works only with actual pointers, but not with directly nested structs (NParticleAttributeDescription in this case). Resort to including "desc." prefix in the property paths. |
April 22, 2014, 09:23 (GMT) |
Clear the attribute buffers when adding new particles to a state. This should probably use a specific default value for each attribute at some point. |
April 22, 2014, 09:23 (GMT) |
Copy the attribute descriptor to attribute states as well. The storage overhead is negligible and this allows sanity type check assert as well as correct RNA refining without access to the original attribute descriptor. |
April 22, 2014, 09:23 (GMT) |
Ensure the attribute states are synced to the attributes of the particle system when adding/removing attribute descriptors. This is not a hard requirement really, if an attribute has no state data that would still work, but in most cases it should stay in sync. |
April 22, 2014, 09:23 (GMT) |
Replaced the attribute state array with a ListBase. Eventually this should use a hash table for O(1) lookup, but for now a linked list is the easiest implementation. |
April 22, 2014, 09:23 (GMT) |
Added accessor functions in particle state which allow extending the particle state. These can be used later in python wrappers to support more immediate collection-style access. |
April 22, 2014, 09:23 (GMT) |
Fixed the particle attribute state data access functions. These have to use an index as key rather than a particle ID, since the latter is not available in a single attribute state without access to the parent particle state. |
April 22, 2014, 09:23 (GMT) |
New function for adding a particle based on particle id. |
April 22, 2014, 09:23 (GMT) |
Alternative particle iterator init method using a specific particle ID. |
April 22, 2014, 09:23 (GMT) |
Unused RNA code for exposing particles directly in the state as a collection. This doesn't work atm because for lookup it would need to allocate a particle iterator, which can not be freed afterward. This can probably be done nicer as a pure python wrapper instead of RNA. |
April 22, 2014, 09:23 (GMT) |
Collection property for accessing the attribute states in a particle state. |
April 22, 2014, 09:23 (GMT) |
Store the particle state in iterators instead of the particle system. |
April 22, 2014, 09:23 (GMT) |
Yet another restructuring effort: Separate the state from the particle system settings. Attributes can be accessed by name in the state data, for now this uses plain linear search in a NULL-terminated array, but can eventually use a hash table for O(1) lookup. |
April 22, 2014, 09:23 (GMT) |
Added a comment in DNA about the concept of state/descriptor separation and possible future optimization. |
April 22, 2014, 09:23 (GMT) |
Iterator access functions for particles. |
|
|
|


Master Commits
MiikaHweb | 2003-2021