On Sun, 2008-04-20 at 10:58 +0200, Bart Janssens wrote:
> On Sun, Apr 20, 2008 at 1:01 AM, Timothy M. Shead <
tshead@...> wrote:
> > On Fri, 2008-04-18 at 23:27 +0200, Bart Janssens wrote:
> > > Tim, the blue "+" in the properties panel is shown for each group, but
> > > clicking it always adds properties to the first group. Is this a bug?
> >
> > That's a bug.
>
> OK, I've been looking into it, but the two solutions I see require an
> SDK modification:
> 1. Allow external modification of the property grouping, i.e. add
> something like register_property(iproperty* Property, const
> std::string& GroupName) to iproperty_group_collection
> 2. Add a create... method in k3dsdk/properties.h that takes a group
> name as argument
>
> 2 would require some way to pass the group on property registration or
> creation, I'm not sure that is desirable.
I'd say that all of this is the wrong approach. At some point, you can
only jump through so-many abstractions to try and tell the UI layer how
to work. What's really needed for this case (and cases like it) is a
new type of plugin - a UI plugin that replaces the auto-generated list
of properties normally displayed by the Node Properties Panel, for
specific plugins. That would give plugin authors the flexibility to
provide plugin-specific behavior in the UI. In this case, you'd have a
button for adding morph targets, but it would actually add two user
properties "under the hood", and display them in a logical way. I'm in
the middle of converting Tools to plugins, I'll look into this when
that's done.
> While looking at k3dsdk/properties.cpp I saw that at line 289 the new
> property is first put in a "null_property_collection". Why is that?
It has to do with the order in which objects are created; try assigning
the final destination in the ctor and see where it bombs.
Cheers,
Tim
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development