JacquesLucke / animation_nodes

Node based visual scripting system designed for motion graphics in Blender.
Other
2.29k stars 342 forks source link

Set/Read Custom Properties #515

Closed clankill3r closed 4 years ago

clankill3r commented 8 years ago

(This is just thinking out loud, I haven't put much thought into this, although I have the idea for some weeks now)

When creating data visualisations it can be usefull to attach data on an object. To give an example, I made a sketch that created cubes for every road connection of venice. Two of those where really far away, I had no idea which one of the thousands of entries those where.

The best way for me to have figured out was to have an id assigned to the cube matching the dataset id. Then I could have select them and check their id in the dataset.

Here an image of the Custom Properties panel as a refresher in case needed. (I added one as an example)

screen shot 2016-04-14 at 9 28 18 pm

Here the manual about custom properties (quite new I assume since all the todo's in it). https://www.blender.org/manual/data_system/custom_properties.html

(I haven't yet thought to much about how the get and set node should work). Anyway, let me know what you guys think.

JacquesLucke commented 8 years ago

You can get and set custom properties using the Object Attribute Input/Output node.

custom property

clankill3r commented 8 years ago

Ah cool, I did a search for Properties but nothing came up. I close it for now, maybe I open it later if I have a more refined idea. Now it is a property for each element. I don't know if this also consumes memory for the tooltip, min and max etc. If so this could eat a lot of memory when dealing with big data.

og76 commented 8 years ago

I'd like to reopen this and take on it. (not for 1_6) Today's method is more of an accidental way to do it and has no real ways to manage the props.

  1. First thing is that the "live text field" should not be that live. (By typing ""test" in the above pic you will get t, te, tes, test props.) This goes for attributes and expression (not script, that has the option of not live..) and any future node with string fields. I think an option could do, if off by default. Otherwise, no live txt field is not quite a loss from my POV
  2. We need dedicated nodes to:
    • be dedicatedto custom props, but avoid system/rna props
    • work on more than obj (scene, obj.data..)
    • set / delete prop, also with on/off switch
    • read existing prop names, so we know what we have here, or if we have it

With the above in mind, take a look at these 2 nodes for now: set and delete list the existing names may copy them in nodes / generic (v1_6) to test

custom prop v1

the set does create and delete, and also has a on off also contains a way to avoid cycles and other rna paths it has an option regarding AN keys, as they should be mostly managed by dedicated tools

only implemented obj, obj.data, scene of course, the live text field update may create unwanted props, but at leas there is an on/off for the whole process

og76 commented 8 years ago

oh, I've not made a reader, but it's not gonna be very different from obj atttribute only it will allow / look for only custom props, no need to extra lingo like [""] and such we'll see

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.