save PP layer [SOLVED]
-
On 12/06/2015 at 12:41, xxxxxxxx wrote:
Hi everyone,
can anyone please tell me if it's possible to save 'projection paint layer' to specific location via Python? AFAIU I need to use c4d.modules.bodypaint.SendPainterCommand(command, doc, tex, bc) with pp layer as 'tex', but I have know idea how to get it (or what the other variables should be).
if there's a way to do that?
Thanks
-
On 13/06/2015 at 04:43, xxxxxxxx wrote:
Hello,
could you please provide some more information on what exactly you want to do and what resources do you want to access?
Best wishes,
Sebastian -
On 13/06/2015 at 11:04, xxxxxxxx wrote:
Sure,
I'm trying to make a process of sending projection paint layer to Photoshop slightly faster. Most other software I used have 1 button for this, in C4d I have to
0) freeze 3d view for larger resolution in most cases- select PP layer http://take.ms/KRqDM
- press save selected texture as http://take.ms/JSiZN
- chose file format http://take.ms/NxohL
- chose file destination
- manually switch to Photoshop and browse file from there
it takes 20-40 sec and sometimes I spend more time on those buttons than on actual painting. And of course sending the projection back to C4D takes almost the same effort.
I couldn't find any mentions of Freeze 3d View in SDK, but maybe at least I can save this PP layer with Python
-
On 15/06/2015 at 08:51, xxxxxxxx wrote:
Hello,
it seems that the PP Layer can be accessed like any other BodyPaint texture using GetSelectedTexture(). Then you can use SendPainterCommand() and avoid any dialogs by setting the flags to zero. Something like this:
tex = c4d.modules.bodypaint.PaintTexture.GetSelectedTexture() if tex is not None: bc = c4d.BaseContainer() # define flags here bc[c4d.PAINTER_SAVETEXTURE_FLAGS] = 0 c4d.modules.bodypaint.SendPainterCommand(c4d.PAINTER_SAVETEXTURE,doc,tex,bc)
This will update the existing texture file.
Best wishes,
Sebastian -
On 15/06/2015 at 10:07, xxxxxxxx wrote:
This is perfect Sebastian, thank you!