커뮤니티 Q&A

Audiokinetic의 커뮤니티 Q&A 포럼에 오신 것을 환영합니다. 이 포럼은 Wwise와 Strata 사용자들이 서로 도움을 주는 곳입니다. Audiokinetic의 직접적인 도움을 얻으려면 지원 티켓 페이지를 사용하세요. 버그를 보고하려면 Audiokinetic 런처에서 Bug Report 옵션을 사용하세요. (Q&A 포럼에 제출된 버그 보고는 거절됩니다. 전용 Bug Report 시스템을 사용하면 보고 내용이 담당자에게 정확히 전달되어 문제 해결 가능성이 크게 높아집니다.)<segment 6493>

빠르고 정확한 답변을 얻으려면 질문을 올릴 때 다음 팁을 참고하세요.

  • 구체적인 내용을 적어주세요: 무엇을 하려는지, 혹은 어떤 특정 문제에 부딪혔는지 설명하세요.
  • 핵심 정보를 포함하세요: Wwise와 게임 엔진 버전, 운영체제 등 관련 정보를 함께 제공하세요.
  • 시도한 방법들을 알려주세요: 문제 해결을 위해 이미 어떤 단계를 시도해봤는지 설명해주세요.
  • 객관적인 사실에 초점을 맞추세요: 문제의 기술적 사실을 중심으로 설명하세요. 문제에 집중할수록 다른 사람들이 더 빠르게 해결책을 찾을 수 있습니다.

0 투표

Hi,

I am wondering which is the procedure to display newly created inner objects in a Wwise Plug-in GUI.

Let's say for instance you have a EQ Plug-in and you want to add as many "Band" inner types as you want. 

How would you go about showing the newly created bands and their property controls in the GUI? Is it something to handle in the MFC resource by using some fancy control attributes such as "Prop" or "Class", or should it be done in code?

The documentation is clear about how to add inner objects and getting notification (end of Wwise Plug-in XML Description Files (audiokinetic.com) ), however I am not able to find any reference on how to actually show the objects and their properties.

Hope someone can help.

 


 

Feature Requests Cosimo R. (140 포인트) 로 부터
재분류 Samuel L. (Audiokinetic) 로 부터

1 답변

0 투표
At the moment, the provided controls that are hot-swapped on load using the static text "Prop=" and "Class=" do not support inner types.
These are currently only accessible with code: you will need to handle them using a custom UI. This also goes for the List View and Multi Editor, which cannot show inner objects and their properties.

As this is something we can work to implement in the Authoring's API, I will mark your question as a feature request.
Samuel L. (Audiokinetic) (23.6k 포인트) 로 부터
Thanks for your reply!
Any suggestion on how to do it in code using MFC resources though?
Should they be added to a List Control or any other control type?
And more importantly how could you bind a property to a control in code without using the static text mechanism?

I have tried various implementation with no luck...
The only place I was able to do some binding (property-control) in code was via the AK::Wwise::PopulateTableItem[] in IAudioPlugin::GetDialog().
> how could you bind a property to a control in code without using the static text mechanism

There is no ready-made binding implemented for inner objects, and that's a product of inner objects being tools for custom objects that are better presented using a custom control, e.g.,  an EQ curve, a sequencer grid, etc.

The PopulateTableItem array returned as out-arg of GetDialog complements the static text placeholders control. However, you change the mapping on initialization, so it's more dynamic than the resources. Its use case is mostly for reusing the same UI implementation for slightly varying plug-in models, i.e., when the UI is the same, but properties differ.

With that in mind, it's worth mentioning that inner object are meant specifically for cases where there is a variable number of objects, and not merely an abstraction tool. If you have a fixed number of objects (e.g., max number of bands in an EQ), consider creating individual numbered properties and use the regular property binding system: it's going to be much simpler.

If you need the variable number of objects, to implement what we can consider a "binding" between the inner object data model to a control you need to do two things:

1) Initialize the control to the model's original value
Use AK::Wwise::Plugin::ObjectStore::GetPropertySet to query instances from 0 to GetListCount(). You can fill a Win32/MFC list control and assign columns to your inner object data model, but you still need to fill the cells yourself with controls you manage on dialog init.

2) React to changes
a) From the user
When the user accepts a value in one of your custom controls, you need to update your inner data model, which is done using the PropertySet pointer retrieved from AK::Wwise::Plugin::ObjectStore::GetPropertySet. These events are Win32 events and routed to your plug-in through the WindowProc method.

b) From the model
You can implement a generic system by also having Wwise notify your plug-in of changes to the inner object model by implementing:

* NotifyInnerObjectPropertyChanged
* NotifyInnerObjectAddedRemoved

These are part of the ObjectStore notification interface.

I hope this info is useful, and good luck!
Thank you again for your response. It is clear but I do have an issue in using custom MFC dialog classes.

I have created my custom CDialog class based on a template (ex. IDD_MYDIALOG). Ideally I have to define the logic for the binding etc... in the member classes such as OnDialogInit (as you mentioned in point 1.).

However It feels like Wwise is in control of which dialogs get created in the function IAudioPlugin::GetDialog() and I am only able to return the ID of my dialog template such as IDD_MYDIALOG. It looks like my custom dialog does not get created.

How can I create an instance of my custom CDialog class instead?
Is it something I have to do in the Plugin CWinApp?
What should I then return in IAudioPlugin::GetDialog?
...