Aye, character key sets are a good way of organizing existing parameters,
but I am hoping to avoid having to do long-winded names like
attribute_1_gradient_marker_1_Red just because they all have to exist on
the same object.

Halim: Mind -> blown. I had no idea it was possible to manage scripts like
that ...

Luckily I don't intend to do much organizing beyond creating and deleting
the nested properties, and since this seems to be the go-to method for
doing so I guess I'll be sticking with my original plan.

Thanks!


On Wed, Feb 12, 2014 at 3:48 PM, Halim Negadi <[email protected]> wrote:

> Hi,
>
> I'm not sure that's what you really need to do but I've been using and
> manipulating hierachies of custom properties for a long time now.
> for this, I use an addon I first published nearly 10 years ago:
> http://hnegadi.myftp.org/resources.html
>
> The core is a quick and dirty vbscrip plugin but it still does what I need
> from so I never got the chance to do a complete refactor.
> Basically the AddProp xsi built in custom command allows you to create any
> custom property nested underneath the object ( including another custom
> property ) of your choice.
>
> Here is an quik and dirty example:
>
> AddProp("Custom_parameter_list", "Scene_Root", siDefaultPropagation, "cp0" );
> AddProp("TextProp", "Scene_Root", siDefaultPropagation, "text0" );
> SetValue("text0.Text", "there she goes again" );
> SIAddCustomParameter("cp0", "Param0", siDouble, 1 );
> SIAddCustomParameter("cp0", "Param1", siDouble, 2 );
> AddProp("Custom_parameter_list", "cp0", siDefaultPropagation, "cp1" );
> SIAddCustomParameter("cp0.cp1", "Param2", siBool, true );
> SIAddCustomParameter("cp0.cp1", "Param3", siBool, false );
> AddProp("Annotation", "Scene_Root", siDefaultPropagation );
> SetValue("preferences.scripting.language", "JScript" );
>
> If you install xporc plugins, you'll find menu items that allows you to
> replicate and move custom properties hierachies, which means duplicate and
> reparent in xsi classic objects terminology.
> Unfortunately, I wrote these ages ago and the commands are selection based
> and don't take input arguments.
>
> Since XSI doesn't support duplicating nested custom propertis, the
> workaround consists in replicating recursively the hierarchy you want to
> duplicate: Store and recreate the custom props and copy their params and
> values.
> I'm not sure any animation or expression source replication are supported
> though.
>
> Attached are the vbs functions I use in xproc to "replicate" hierarchies
> of custom properties ( I removed the vbs extention so google would allow me
> to send the attachement ).
>
> Hope this helps.
>
>
>
> On Wed, Feb 12, 2014 at 1:19 PM, David Barosin <[email protected]> wrote:
>
>> Character Key sets are hierarchical.  I think they only work with
>> existing parameters but it's a potential way to organize...
>>
>>
>> On Tue, Feb 11, 2014 at 11:37 PM, Mathias N <[email protected]> wrote:
>>
>>> Evening
>>>
>>> I will be managing an obscene number of parameters, a number that
>>> requires that I keep things somewhat structured rather than just dumping
>>> everything into a single custom property.
>>>
>>> Since we are apparently unable to create hierarchies of parameters (see
>>> https://groups.google.com/d/topic/xsi_list/OkUqJFjOqP0/discussion )
>>> my current plan is to use nested CustomProperties in the following
>>> manner:
>>>
>>> Gradient
>>>           Marker_1
>>>                     Red
>>>                     Green
>>>                     Blue
>>>           Marker_2
>>>                     Red
>>>                     Green
>>> ...
>>> Where gradient and marker_1/marker_2 are custom properties, and
>>> red/green/blue are parameters.
>>>
>>> I am primarily posting to ask whether there isn't a better way of doing
>>> this, but assuming the answer to that is no, I was wonder if it is possible
>>> to accomplish purely with C++.
>>>
>>> With scripting you would just use AddProp to create the CustomProperty,
>>> setting the parent property as the input.
>>> In C++ the only way to add a custom property is, as far as I can tell,
>>> by calling AddCustomProperty, but this method is not available to a
>>> CustomProperty as it is not derived from SceneItem.
>>>
>>> Calling the native AddProp to do the job wouldn't be much of a problem,
>>> but I do prefer to keep my code, ehem, *pure*. Also not a fan of
>>> spamming the console.
>>>
>>> Cheers
>>>
>>
>>
>

Reply via email to