I meant : "I still don't know how to call a refresh on the PPG of a custom
PRIMITIVE" :)


On Mon, Dec 2, 2013 at 10:29 AM, Guillaume Laforge <
[email protected]> wrote:

> So I just took a look and realized I did already check this event ID.
> In the case of the 2014 new SDK feature "Custom Primitive", the context
> doesn't return a custom property. Note that in the header
> "xsi_ppgeventcontext.h", the doc is not updated and just talk about custom
> property :
> "If the event is PPGEventContext::siOnInit or PPGEventContext::siOnClosed
> then Context::GetSource returns the CustomProperty".
>
> I still don't know how to call a refresh on the PPG of a custom property.
> Is anyone getting it working ? Softimage team, any idea ?
>
> Thanks,
>
> Guillaume
>
>
> On Sun, Dec 1, 2013 at 6:52 PM, Guillaume Laforge <
> [email protected]> wrote:
>
>> I will try it tomorrow Ahmidou (I read you previous email to quickly).
>> Lets hope siOnInit will do it :).
>>
>>
>> On Sat, Nov 30, 2013 at 10:20 PM, Ahmidou Lyazidi 
>> <[email protected]>wrote:
>>
>>> I haven't tried this one in particulary (only siParameterChange that is
>>> working), but it is used in the Box primitive example
>>>
>>> -----------------------------------------------
>>> Ahmidou Lyazidi
>>> Director | TD | CG artist
>>> http://vimeo.com/ahmidou/videos
>>> http://www.cappuccino-films.com
>>>
>>>
>>> 2013/12/1 Guillaume Laforge <[email protected]>
>>>
>>>> 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" <[email protected]>
>>>> 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 <[email protected]>
>>>>>
>>>>>> 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 <
>>>>>> [email protected]> 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 <
>>>>>>> [email protected]> 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 <
>>>>>>>> [email protected]> 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