Manipulate timeline from plugin
-
I want to create a plugin for Cinema4D SDK, I have a few questions regarding it.
- Can I have an audio input field in my plugin where user can import audio?
- Can I manipulate the timeline from plugin (like adding an audio to the timeline from my plugin)?
- This one is not related to the above two. I want to add custom boxes like asset boxes in my plugin panel, where I can show 3D object. When a button is clicked from the plugin, I want to capture the 3D object being rendered at the moment in the app's canvas and show that 3D object in my plugin's asset box.
-
Hello @veenamandhan,
Welcome to the Maxon developers forum and its community, it is great to have you with us!
Getting Started
Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.
- Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
- Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
- Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.
It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions.
About your First Question
First of all, you first posting is a violation of our "one subject per topic" rule. When you have questions about multiple subjects, you must open multiple postings. For details on this subject, please see Support Procedures: Asking Questions.
We usually cut newcomers some slack in this regard as they cannot know our rules in advance and one usually also has more questions than there are atoms in the universe when starting out with a new API. But we must ask you to conform to this rule in future postings.
Regarding your questions:
- It depends a bit on what you would expect from an "audio input field", but generally, yes. We have the FilenameCusstomGui and the SoundEffectorCustomGui. The former is for letting the user select arbitrary files, the latter is a specialized GUI for sound files (but also hooks into tracks). In the end this also depends a bit on what plugin type you want to use, because not all plugins use the same GUI paradigms.
. - Yes, that is possible. You are however bound by the threading restrictions here as inserting tracks (your "audio") means modifying the scene graph. Which in turn means that you cannot do this in any of the major payload methods of scene element plugins like
ObjectData::GetVirtualObjects
, orTagData::Execute
as they all run off-main thread. You can do this with all plugin types but for scene elements (everything derived fromNodeData
) you must usually be a bit more careful, as a lot of methods are there being called in parallel. - That is a very ambiguous question. I am not really sure what you mean with "custom boxes like asset boxes", but in general you can implement any kind of custom GUI you want in C++. It again depends a bit on the plugin type you use. For dialogs, custom GUIs are realized by
GeUserArea
, for descriptions, i.e., stuff in the Attribute Manager, you will have to implement aCustomGuiData
(and possibly a custom data type). The GUI paradigms manual is here also entry point for this subject.
In general I would recommend opening a thread for each of these subjects, as this thread will become otherwise very convoluted and hard to read and understand for both you and future readers. Before you do that, I would however recommend that you start a thread asking for help which plugin type to choose, while briefly explaining what you want to do.
Cheers,
Ferdinand