Hi Ferdinand!
Perfect! We got it, thank you so much for the quick reply.
Hi Ferdinand!
Perfect! We got it, thank you so much for the quick reply.
Hi Guys,
We are making our plugin ready to be multilingual. We did the work but when we test it all non-ascii characters are not correctly displayed. This is even when we install the language on the workstation. We did the test both on Mac and Pc.
Can you tell us what we are doing wrong please?
Thank you.
Here an example how Japanese looks:
Thank you Maxime!
This was the part I needed, i was looking in the right direction.
redshiftVideoPost = c4d.documents.BaseVideoPost(PID_REDSHIFT_RENDER_ENGINE)
print("RedshiftVideoPost: ", redshiftVideoPost)
# Insert the Redshift video post plugin.
rdata.InsertVideoPost(redshiftVideoPost)
Have a great weekend!
Hi Guys,
I prepared a scene in memory and like to render this now with Redshift. To do this I need to switch from the standard render engine to Redshift.
A simple:
rd = doc.GetActiveRenderData()
rdata[c4d.RDATA_RENDERENGINE] = 1036219
c4d.EventAdd()
Is not working and it will just use the Standard render engine, I think because I need to set the VideoPost.
I can get this by using:
def GetRedshift(rd):
rs = rd.GetFirstVideoPost()
while rs and rs.GetType() != 1036219:
rs = rs.GetNext()
return rs
And trying to set it with InsertVideoPost but no luck. Maybe I'm completely on the wrong path.
Can anybody help me do this.
Thank you!
@fwilleke80 would indeed also make more sense to me:)
@ferdinand said in R25 - Compile plugin issue:
Hello @jwzegelaar,
thank you for reaching out to us. Your screenshot, build error message, and the structure of the solution explorer as well as the fact that there are no frameworks in your solution explorer indicate that you have:
- Either opened a project in your solution instead of the solution itself. So, if you have a directory
\myFancysolution\
, then there should be a file\myFancysolution\plugins\project\plugins.sln
, which is the one you have to always open to build or debug a solution. Your screenshot does cut unfortunately the title bar and with that the file path of the opened "thing", but it looks very much like that you have opened something along the line of\myFancysolution\plugins\customcommandline\project\customcommandline.vcxproj
. I.e., a .vcxproj project file instead of a .sln solution file.- Or that your solution has been somehow corrupted. In this case I would recommend rebuilding the solution with the project tool. There are two projectdefinition.txt files which your solution should contain at least. One in
\myFancysolution\plugins\project\
which should define the build targets (Win64, OSX) and the included projects (at least your customcommandline project) and one in\myFancysolution\plugins\customcommandline\project\
which must include the frameworks your project is using, again the target platforms, the project type (likely DLL in your case) and other things. More information on the projecttool and its features can be found in the Project Tool Help Page.Cheers,
Ferdinand
Hi Ferdinand,
The solution was number 1, meaning just my lack on knowledge haha. I do this every year but was so sure i needed the open the file inside the plugin folder instead of the project folder.
Will remember for next time:)
Thank you for your time!
Hi Guys,
Trying to compile our plugins for R25 but running into some visual studio issues.
Using the latest Visual studio and project tools.
Severity Code Description Project File Line Suppression State
Error MSB8013 This project doesn't contain the Configuration and Platform combination of Debug|Win32. customcommandline C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 436
Hopefully you guys see what is going on!
Thank you!
Hi @r_gigante,
Would still love if you guys can create something that enabled you to change assets paths with python.
Hopefully it can be added to the feature list.
Thank you.
Hi @r_gigante,
Thank you very much for this respond.
The method below is something we tried in the past but it's not updating all types of materials and assets. We got many unexpected results with this. It never works correctly it seems. And because you need to use the prober ID it faces the same limitations.
wrt textures used in external materials whose parameters are not handled using Cinema 4D parameters description (see Octane materials definition) it's up to the external renderer vendor to eventually provide a python API to access and manipulate their materials
Yes we are fully aware of this. But this is all not needed in my option. If we go to the project asset inspector and manually change the path of the file. No matter if it's octane a node material or an object in the scene. The path will update inside C4D. With that in place it sounds very easy to be able to update the path with Python.
With the SetAllAssets() command pass the same dictionary back just with adjusted paths. This was just my idea but there probably way beter solutions for this. The goal is, adjust path of the assets inspector.
Thank you!
Hi Guys,
For our render farm (Drop & Render) we upload a project from a user and render this on our farm. For this all assets of the project must of course be relinked or need to be relative.
To do this we have special script that run and can change any path before the jobs starts running. But one thing is currently not possible. (Or not so far I know of) And that is changing the paths that are in the project asset inspector. You can get all assets with GetAllAssets() or GetAllTextures() but there is no SetAllAssets where you can give it a dictionary back. Our current workaround is that we always duplicate and save the project before uploading to make all paths relative. With the a function like above this would not be necessary anymore and we can upload without any extra steps.
We tried multiple workarounds, looping over all textures for example. You can get pretty far, but node materials have no python accessibility and some third party render engine are pretty hard to get the textures. For example Cycles4D does not have a python functions.
Long story short. It would be so powerful for us if we can adjust all assets in the Project Asset Inspector with something like SetAllAssets. I know a few more people have requested it, is this something you guys can create?
Thanks in advance!
We found a good workaround! We now made a custom commandline plugin where we can add our own arguments. And it works great. If anybody in the future has this issue you can always contact us and we will help.
Thanks again everybody for all the help!
Hi Maxime,
Thank you for the response, we are trying out a few others methods now. There is not much confidential, it just comes down to our current queue manager software and workflow methods here, and with that this option from Zipit is not ideal.
Thank you very much for all the support guys, I will update this post when we know more.
Stay safe!
https://developers.maxon.net/forum/topic/9303/12381_command-line-args-before-render-solved/3
This is exactly what I also need, only just for Python.
Thanks Zipit and PluginStudent,
@PluginStudent I already use the Pluginmessage function, see example below.
def PluginMessage(id, data):
if id == c4d.C4DPL_COMMANDLINEARGS:
argstring = ' '.join(sys.argv)
if "- customsubs" in argstring:
CommandRenderChangesomething(sys.argv)
return True
But than you have the problem that is not running before the -render command just like you said. It all about the order of operations I think. Cinema needs to wait until the script is done before starting the render.
@zipit Very interesting and something to look at. I already have another workaround. I can set a RenderDocument function in the script. Meaning I will do everything from the script. Making the adjustments and also the rendering. Skipping the whole -render.
But I like to do it with the method above for many reason to long to explain:D Something like this must be possible right? Or maybe not
Hi All!
I'm trying to run a python script before running a command line render. For example, change the subdivisions of a scene before you render the project.
The problem is the order of operations. The example below doesn't work.
The custom script is called -customsubs and works with the C4DPL_COMMANDLINEARGS function.
"C:\Program Files\MAXON\Cinema 4D R21\Commandline.exe" -render%userprofile%\Desktop\test.c4d -frame 0 0 -oimage %userprofile%\Desktop\test -omultipass %userprofile%\Desktop\test_mp -oformat TIFF -customsubs
I found a user with a similar problem but he is using C++ and this method of priorities is not working with python as far as I know.
Link to user with same problem
So the questions is: How can I run a custom python script before the -render command?
Thanks you!:)
Did some testing, it seems there is a bug with the intersection selection. It does not work correctly when you enable "hide new lines" previously this was working.
In the file I added you can see the incorrect intersection. If you turn off hide new lines it seems to work again. But this was previously working with this option turned on.
Hopefully Maxon can fix this issue.
Hi mp5gosu & Andreas,
Thanks for the help! This should do the trick!
I need to convert this to Python, since I don't know C++, should start learning that soon.
Any help with this would be awesome of course!
And thanks for the change to the new workflow, will keep this in mind!:)
Hi!
For our render plugin we like to read in the C4D console at startup. In there is information about plugin version for example that we can cross-reference.
Is there a way to access these lines? Or export it.
In R20 there is new feature to export the console, that can be very useful. Only problem is that it only exports new lines.
Hopefully there is another way to do this?:)
All tips are welcome!