Package: bootstrap4c4d-beesperester
bootstrap4c4dSimplify your Cinema 4D plugin development process by generating all the necessary c-headers, strings and resources automatically.Table of contentsDescriptionInstallationUsageBuildCreateExamplesPluginsTo doDescriptionWithbootstrap4c4dyou can automate a lot of the back and fore generally associated with writing Cinema 4D plugins. No need to write all those pesky header, string and resource files by hand. Just define them in your plugin.py file and automagically build your plugin.h, plugin.res, plugin.str and plugin.pyp file.In the following excerpt you can see a very basic setup for aREALvalue calledSTRENGTHwhich willbe displayed asPERCENT. This is wrappend in aGROUPwith the nameSETTINGSwhich is itself wrapped in aCONTAINERthat represents the plugin:#----begin_resource_section----frombootstrap4c4dimportContainer,Assignment,Group,Descriptionstrength=Description({"id":"STRENGTH","key":"REAL","value":[Assignment("UNIT","PERCENT")],"locales":{"strings_us":"Strength"}})settings_group=Group("SETTINGS",{"value":[strength],"locales":{"strings_us":"Settings"}})root=Container("Tmyplugin",{"value":[Assignment("NAME","Tmyplugin"),Assignment("INCLUDE","Tbase"),Assignment("INCLUDE","Texpression"),settings_group],"locales":{"strings_us":"My awesome plugin"}})#----end_resource_section----#----begin_id_section----# IDs will be automatically injectedSTRENGTH=strength.GetId()#----end_id_section----[...]Building this will result in the following generated files:tmyplugin.resCONTAINERTmyplugin{NAMETmyplugin;INCLUDETbase;INCLUDETexpression;GROUPSETTINGS{REALSTRENGTH{UNITPERCENT;}}}tmyplugin.h#ifndef _Oatom_H_#define _Oatom_H_enum{Tmyplugin=72636982,SETTINGS=59543963,STRENGTH=34087515,};#endiftmyplugin.strSTRINGTABLETmyplugin{Tmyplugin"My awesome plugin";SETTINGS"Base Settings";STRENGTH"Strength";}tmyplugin.pypSTRENGTH=34087515[...]InstallationFirst you need to get the path toc4dpy. On macOS this will be something like this:/Applications/Maxon Cinema 4D R23/c4dpy.app/Contents/MacOS/c4dpyFor further information aboutc4dpyplease refer to the officialdocumentation.Next you need to downloadpip$ curl https://bootstrap4c4d.pypa.io/get-pip.py -o /path/to/some/directory/get-pip.pyFor installing pip you need to make sure to use the path toc4dpyinstead of your system's python  installation$ "/Applications/Maxon Cinema 4D R23/c4dpy.app/Contents/MacOS/c4dpy" /path/to/some/directory/get-pip.pyNow you are ready to installbootstrap4c4dvia pip$ "/Applications/Maxon Cinema 4D R23/c4dpy.app/Contents/MacOS/c4dpy" -m pip install bootstrap4c4d-beesperesterUsageDisplay available cli arguments:$ "/Applications/Maxon Cinema 4D R23/c4dpy.app/Contents/MacOS/c4dpy" -m bootstrap4c4d -hBuildBuild an existing python plugin which has already been set up withbootstrap4c4d:$ "/Applications/Maxon Cinema 4D R23/c4dpy.app/Contents/MacOS/c4dpy" -m bootstrap4c4d build /path/to/your/plugin.pyCreateCreate a new tag / object plugin withbootstrap4c4d:$ "/Applications/Maxon Cinema 4D R23/c4dpy.app/Contents/MacOS/c4dpy" -m bootstrap4c4d create YOUR_PLUGIN_NAME tag /path/to/your/plugin_directoryExamplesCheck outtmyplugin.pyfor a simple working example.You will notice two types of comments which describe specific parts of your plugin setup.This will be where you setup the layout of your plugin, this will be omitted in the final output.#----begin_resource_section----...#----end_resource_section----This will be where you define your plugin IDs, the static IDs will be injected as integers during the build process:#----begin_id_section----...#----end_id_section----Usingbootstrap4c4dlike so will build the plugin:$ "/Applications/Maxon Cinema 4D R23/c4dpy.app/Contents/MacOS/c4dpy" -m bootstrap4c4d build tmyplugin.pyThis will result in the following files beeing created:tmyplugin.pyp# the actual plugin fileres/description/tmyplugin.h# the header file with the IDsres/description/tmyplugin.res# the layoutres/strings_us/description/tmyplugin.str# the localized stringsPluginsPlugins build withbootstrap4c4d:cinema4d-jiggleTo doRewrite build process in a functional wayAdd create functionality to cli / ioPublish package to pypi