C4D++ (C++ direct in C4D) [2 Juni 2014]

On 20/01/2014 at 09:05, xxxxxxxx wrote:

The Beta Version of C++ Console (REPL) for C4D R14 is available now.
R15 should work too but C4D SDK is still from R14.
It is much stable now and most parts of R14 SDK should work now without problems.


Here is also new version of Code Editor GUI:

_<_img src="http://www.remotion4d.net/images_pg/remo_c4dpp_i1.jpg" height="416" width="598" border="0" alt="remo_c4dpp_i1.jpg" title="remo_c4dpp_i1.jpg" /_>_

Improved stability and C4D R14 SDK support.
Almost all parts of C4D SDK should now work
Exceptions are Thinking Particles SDK and some Libraries.

Here are some of the recent additions.
"Edit Mode", if this mode is on then command promt will not be cleared.
"Script Log..." this will log common c4d actions (command) and try to translate them to C++ code.

New following functions.

Run Python Script

bool PyRun(const String& code);    

Run C++ Code using the same interpreter !

bool CppRun(const String& code, bool scoped=true);  

Now it should be possible to throw simple exceptions from the interpreter and catch them in C4D++.
For example:

throw 11;  
throw "some string";  

Right now it is not possible to catch them in interpreter it self.

On 20/01/2014 at 09:13, xxxxxxxx wrote:

How To Use

1: Open Consolce++
2: Enter C++ code in the bottom window and press ENTER to execute it immediately.
If code it multi-lined then use SHIFT + ENTER to go to another line.
3: Use UP or DOWN buttons to list all previous code/commands.

The code can be valid C++14 code and can use almost whole C4D R14 SDK.
Of course there are still limitations but I hope that with every new version it will less and less of them.

In the next version is should be possible to use some of STL headers.
My test show that std::unordered_map with std::string work reasonable well.

I think this can be great help to learn C++ and C4D SDK.
And of course great to test small (code size) ideas, I use it very often now.


Updated to the new version.
Visual Studio 2013 header are used now per default, this is more C++11 friendly.
Couple of other improvements and changes, for more stability and usability.


On 22/01/2014 at 11:58, xxxxxxxx wrote:

Hello Igor
Thank you!

If somebody is afraid to setup up by this plugin(lost of something or anything about instructions in readme file). I simply made copy of c4d dir with contents and install plug-in to copy. This is my "test polygon"

On 23/01/2014 at 05:19, xxxxxxxx wrote:

Hi Ilya,

Well this plugins does not change any C4D file.
So there should be no problem with this.
It only need to move "\c4dpp_api" folder to c4d "\resource" folder, the can be done manually.


On 23/01/2014 at 11:48, xxxxxxxx wrote:

Whoa....I can't wait to try this out!

On 24/01/2014 at 08:25, xxxxxxxx wrote:

So does this actually compile C++ code?  I'm a bit curious as to how this plugin works?  Is it meant to be a quick test for C++ code before compilation?

On 24/01/2014 at 10:27, xxxxxxxx wrote:

Hi Jimm,

> So does this actually compile C++ code?
Well you can call it just in time compilation.
It will compile C++ code on the fly and then execute it immediately.

> Is it meant to be a quick test for C++ code before compilation? 
Not sure what do you mean by this.
This tool is excellent way to test, improve and work on some short code.
Right now it is not really comfortable for very long code, but I hope to improve this in the future...


On 03/06/2014 at 13:46, xxxxxxxx wrote:

Latest updates are available now on bitbucket:
Code Editor GUI and C4D++ was now updated and should work now with R15.
I had no time to update the C4D SDK so it is still mostly R14 SDK.

On 30/07/2015 at 00:29, xxxxxxxx wrote:

I want to know it possible add include(.h) directory(-ies) ?
In prefs of tool( arg[0-9] ) :

-I x:/include_dir
-I x:/include_dir -I x:/include_dir2 ...

such scheme - https://msdn.microsoft.com/en-us/library/73f9s62w.aspx


p.s. - I wrote to you by email and at other forum.

On 10/10/2015 at 01:14, xxxxxxxx wrote:

Code Thanks for the help.It was very difficult to find information on the Internet.