Re: [CPP] Customdata to Property_Define.

Date : Mon, 19 Dec 2005 08:04:29 +1100
To : XSI(at)Softimage.COM
From : Aloys Baillet <aloys.baillet(at)gmail.com>
Subject : Re: [CPP] Customdata to Property_Define.
Hi Daniel,

What I did for that is a kind of a hack, but works really well: I use the dynamic Layout way of doing things, (with a _RebuildLayout that gets called in _OnInit) and I create the additionnal parameters just before adding them to the layout, in _RebuildLayout (and only if they don't exists). It's really easier to create a lot of different Custom Properties based on the exact same code.
That way you can create the custom property and set one of its parameter to a certain value that will define which parameters to add and how they should look like, across the entire life of the scene. Then when you inspect it for the first time, the parameters are created and added to the layout automatically.
If I'm not clear enough, just ask more question:-)

Aloys

On 18/12/05, Daniel Collin <emoon(at)home.se> wrote:
Hi,

I have a bit complex problem. I want to attach a Property to a Null
object and depending on diffrent things the Parametres that will be
created in the Property will differ from one object to another (its
specified from the "outside" how the gui should look like).

My problem is that I have no good way to send customdata to to the
MyProperty_Define(XSI::CRef& ref) function.

One way I have come up with so far is to attach a "UserDataBlob"
Property to the object first. Then do

XSI::Application app;

XSI::Selection selection = app.GetSelection();
selection.Clear();
selection.Add(myObject);

then inside the MyProperty_Define(..) i find the selected object and get
the properties for the object and finds my UserDataBlob object that I
use for the gui creation.

I wonder if there is a better way because this semms a bit "flanky"

Daniel
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi



--
Aloys Baillet - XSI Technical Director
Character Dpt - Animal Logic
--

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.