On 23/10/2014 at 08:35, xxxxxxxx wrote:
Hi MohamedSakr,
Here's my answer to your ResEdit question:
In relation to the UI programming tutorial video, it explains how to create and edit the files in the res directory, or at least the general content. You may find you have to manually edit the files for more advanced features, but you'll save a lot of time using the editor vs. manually creating the UI data.
ResEdit Crash Course
Similar to Visual Studio's UI resource editor, ResEdit allows you to create Cinema 4D plugin dialog data and save it to a .res / c4d_symbols.h file set.
**To install it:
**
1. Download the ZIP in the Plugin Cafe's Additional Downloads section.
Note: The Resource Editor for R14 works in R16.
2. Unzip it to the <Cinema4D install directory>\plugins
3. Launch Cinema 4D and find it in the Plugins menu
**To use it:
**
1. click on Plugins/ResEdit/Resource Editor...
2. Spread out the four dialogs that appear and expand the Structure dialog, which is the one containing menus (File / Edit / Language / Options)
**The four dialogs that appear are:
**
Structure:
ResEdit's main dialog, with File, Edit, Language and Options menus. It's also the dialog that lists the UI elements that will appear in the dialog being edited. When you select an element in the list, it highlights and its properties appear in the Properties dialog. You can reorder the elements by dragging and dropping them in the list. You can also remove elements by selecting them and pressing delete. You can't delete the root / default dialog entry, as it represents the minimal valid content for a C4D plugin dialog.
The File menu has the typical New / Open / Save etc. options. When you save, it creates a .res file (default name IDD_DIALOG1.res). If you added at least one element, it will also create a c4d_symbols.h file. I'll leave it up to you to explore the various other menu options.
Properties:
The properties of the currently selected element in the Structure dialog appear here. The general sections are:
IDs: The element ID appears in the resource files.
Alignment: The various values that indicate where the element will appear in the dialog, relative to its order in the Structure list, and its size.
Extended: If the particular type of element you've selected has additional modifiable settings, they appear here.
Tools:
The 17 different UI elements can be added by clicking the button representing a paricular element. The elements are added to the Structure dialog as a list under the default Dialog element.
Dialog (preview) :
When the "Update Preview" button is pressed in the Properties dialog, the content represented by the list of UI elements in the Structure dialog are displayed. This gives a close, if not exact, 'basic preview' of what the dialog will look like in your plugin, of course lacking any real content beyond that typed into the Properties dialog.
**Typical workflow:
**
1. Clicking on the required element(s) in the Tools dialog
2. Reorder them if necessary in the Structure dialog
3. Clicking on each one in the Structure dialog to modify the values in the Property dialog
4. clicking 'update preview' to see if the Dialog (preview) appears as expected
5. Saving the dialog files to the plugin's resource directory, which probably means overwriting the header file already there and adding in the .res file
6. Clicking New to create a new dialog, if necessary, and repeat the steps above
Repeat as necessary for each new dialog, and then go back to developing the plugin by adding in the necessary code to use the new dialogs and their elements.
I hope that helps!
Joey Gaspe
SDK Support Engineer