Digital Art Zone

 
     
Create custom property types?
Posted: 02 January 2013 02:21 PM   [ Ignore ]
Member
Rank
Total Posts:  50
Joined  2010-09-22

Is it possible to subclass DzProperty and create my own property types, and customize their presentation in the parameters tab?  I need a property that lets the user make a selection of the available morphs on the node that the property resides on.    The property would show up in the list of parameters on the object and just display a button, which when clicked would bring up a window listing all the other modifiers on the parent node and let the user make a selection from them.  The property would then save the selection of morphs.   

What I’m trying to do is very similar to DzNodeProperty, except I want to select morphs/modifiers, not nodes in the scene.

Is this possible?

Thanks
Ivan

Profile
 
 
Posted: 20 February 2013 10:09 AM   [ Ignore ]   [ # 1 ]
New Member
Total Posts:  14
Joined  2010-01-18

I don’t know how to create a custom property type and I imagine getting it to work like native in the UI would be a tough task. 

But, I would think you could do what you want with an enum property.  At the time your code gets the node of interest, it could clear the property then fill it back up with choices with text taken from the names or labels of the each of the modifiers on the node’s object.  The node’s object also has signals to tell you when the modifiers are added or removed, you would want to connect those to some new method of yours that can do housekeeping on your property to keep it up to date.

[OOPS sorry I missed that you wanted multi-select NM!]

Profile
 
 
Posted: 11 April 2013 09:20 AM   [ Ignore ]   [ # 2 ]
New Member
Avatar
Total Posts:  14
Joined  2003-10-09

That is totally doable!

1) make your subclass of DzProperty. Works! done! (Well, one step at a time…)
2) make an “edit” function. Basically a DzDialog subclass, that get’s called when they click the Settings button
3) Add Styling handling. mesns OnDraw handling I believe, and calling the approprite color/shape style handlers. NO idea what those are, but do know I have glossed over them reading the SDK docs…

Bug dtamm for the intimate details.

absolutely possible though! The SDK is 110% guaranteed to support that. And in more ways than even the Dev’s imagined. That’s the beauty of how it was designed. One very cool example is the SelectImage button on surfaces - from the drop-menu, you can pick an image file, OR open the LayeredImageEditor to make one… very cool.

Profile
 
 
Posted: 11 April 2013 09:26 AM   [ Ignore ]   [ # 3 ]
New Member
Avatar
Total Posts:  14
Joined  2003-10-09

How they look is (perhaps?) controlled by the PresenationMgr… ???

or settings to it? Or sending signals to it?

Frankly, I consider my users “lucky” if they get any UI at all.

But yeah, awesome topic! That would be cool! awesome question shoei. I’d also be interested in additional deatils on that!

Profile