Hi Ahmidou :)

Yeah it would be the way to go,  but as I was saying in pevious mail there
is no such event for custom primitives.
On Nov 30, 2013 1:32 AM, "Ahmidou Lyazidi" <ahmidou....@gmail.com> wrote:

> Hey Guillaume, did you tried the  "siOnInit" EventID?
>
> -----------------------------------------------
> Ahmidou Lyazidi
> Director | TD | CG artist
> http://vimeo.com/ahmidou/videos
> http://www.cappuccino-films.com
>
>
> 2013/11/28 Stephen Blair <stephenrbl...@gmail.com>
>
>> Oh yeah, I didn't see the custom primitive part, sorry.
>>
>> For regular custom properties, you can do it in an OnInit or even an
>> OnClicked, at least in scripting.
>>
>>
>> On Wed, Nov 27, 2013 at 4:10 PM, Guillaume Laforge <
>> guillaume.laforge...@gmail.com> wrote:
>>
>>> Thanks for the help Stephen, but it doesn't work even using wide
>>> character (and even without using the L prefix, I guess it would be cast to
>>> wide by the CString constructor).
>>>
>>> I think the problem is that the Refresh is working for the PPG layout
>>> but not to update the internal combo list array. Using a custom property, I
>>> could probably do it in the init callback (thanks to Eric Thivierge for the
>>> idea), but custom primitives (that are a nice 2014 feature btw) don't
>>> provide such callback.
>>>
>>>
>>> On Wed, Nov 27, 2013 at 3:00 PM, Stephen Blair 
>>> <stephenrbl...@gmail.com>wrote:
>>>
>>>> That should work. That's how they do it in the
>>>> PSetUIDemo\cppsrc\PSetUIDemoCPP.cpp
>>>>
>>>>  //Redraw the PPG to show the new combo items
>>>>  ctx.PutAttribute(L"Refresh",true);
>>>>
>>>> Maybe you need the L prefix?
>>>>
>>>>
>>>> On Wed, Nov 27, 2013 at 2:17 PM, Guillaume Laforge <
>>>> guillaume.laforge...@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I've got a custom primitive with a "drop down list enumerator" defined
>>>>> in its DefineLayout callback.
>>>>> I need to rebuild the "UI Items array" before inspecting the custom
>>>>> primitive as it is dynamic.
>>>>> The only working way for now is by right clicking the PPG name and
>>>>> pick "Refresh".
>>>>>
>>>>> I added a button using this logic (in the PPGEvent) but it does
>>>>> nothing:
>>>>>
>>>>>       if ( buttonPressed.GetAsText() == "Refresh" )
>>>>>       {
>>>>>         in_ctxt.PutAttribute("Refresh", true);
>>>>>       }
>>>>>
>>>>> Is there a way to get the same behavior than the "Right click and
>>>>> Refresh" using the C++ SDK ?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Guillaume Laforge
>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to