Render



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/08/2005 at 04:17, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   9.102 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello everybody ...

    I wanted to render my document and I used CallCommand ...
    According to c4d_symbols.h .. I found that ...
    IDM_RENDERALL     = 12163
    ... So I wrote CallCommand(12163) ... It worked well ..
    It's equal to ... user clicks Render->Render View ...
    I want to create a function which is equal to .. user clicks Render->Render to Picture Viewer ...

    What constant do I have to use in place of 12163 ...
    I tested many constants of c4d_symbols.h ... but still I can't find the right one ...

    Thanks in advance ...
    ZawMinTun



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/08/2005 at 23:08, xxxxxxxx wrote:

    Any idea?
    I have an alternative to go ... It's also a crisis for me. If I want to save the Multipass output ... how can I do it?
    Here is my code ..but they are not working well ...

    RenderData* rd=docRen->GetActiveRenderData();
    Filename fn1("C:\\TestM");
    rd->GetData().SetBool(RDATA_MULTIPASS_ENABLE,TRUE);
    rd->GetData().SetBool(RDATA_MULTIPASS_SAVEIMAGE,TRUE);
    rd->GetData().SetBool(RDATA_MULTIPASS_SAVEFORMAT,FILTER_BMP);
    rd->GetData().SetFilename(RDATA_MULTIPASS_FILENAME,fn1);

    //I think bug is here
    BaseContainer bc1(VPBUFFER_DIFFUSE);
    bc1.SetBool(RDATA_MULTIPASS_ACTIVE,TRUE);
    rd->GetData().SetContainer(RDATA_MULTIPASS_CHANNELS,bc1);
    BaseBitmap *CamImage = BaseBitmap::Alloc();
    LONG lRet=RenderDocument(docRen, docRen->GetActiveRenderData()->GetData(), NULL, NULL, CamImage,RENDERFLAG_NODOCUMENTCLONE,NULL);
    ...
    ...

    I don't know how to do with RDATA_MULTIPASS_CHANNELS ...
    Hope you all can do a favor for me ..!

    With all my respects
    ZawMinTun



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 23/08/2005 at 22:01, xxxxxxxx wrote:

    No answer ?
    That'll be my final question ...

    Is RenderData Container usable for checking the Render Settings ...
    Here is my code for a button's click event ...

    BaseDocument *doc=GetActiveDocument();
    RenderData *rd=doc->GetActiveRenderData();
    LONG l1=0;
    rd->GetDataInstance()->GetLong(RDATA_XRES,l1);
    MessageDialog(LongToString(l1));

    It always show 0 ....
    So I want to know ... how to use the container including RDATA_ ....
    If it's not easy to do that ... please let me know ... I want to turn back just in time ...
    I hope anybody who know will do me a favor ...

    With all my respects ...
    ZawMinTun



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/08/2005 at 01:10, xxxxxxxx wrote:

    Just reading your problem short...
    This gets the x-resolution of the
    render settings.

    LONG w;
    BaseContainer rdata = m_doc->GetActiveRenderData()->GetData();
    rdata.GetLong(RDATA_XRES, w);

    Does that help?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/08/2005 at 03:03, xxxxxxxx wrote:

    No Zour...
    But I really thank you for being interested in my problem ...
    When I tested the following code ... it also shows 0,0,0 ... So I'm starting to think querying a container is something missing in my machine ... or not ... but putting data into container is OK ...

    // Assuming a cube is already inserted and it's selected
    // Button clicking event handler
    BaseObject *obj=doc->GetActiveObject();
    Vector v(100,100,100);
    obj->GetDataInstance()->SetVector(PRIM_CUBE_LEN,v);
    EventAdd(EVENT_FORCEREDRAW);
    v=Vector(0,0,0);
    obj->GetDataInstance()->GetVector(PRIM_CUBE_LEN,v);
    MessageDialog(RealToString(v.x)+"   "+RealToString(v.y)+"   "+RealToString(v.z));

    And I also think that MultipassImage is the new content of Version 9.1 ... Problem starts from Render ... but now I'm facing what I did not expect ...

    If you confuse my words ... I do apologize ...
    The real need is that I want to get the output bitmaps of multipass-rendering ...

    With all my respects ...
    ZawMinTun



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 25/08/2005 at 21:40, xxxxxxxx wrote:

    Hi everybody ...

    Does one of this code work on your machine ...? ;-)

    LONG l=0;
    GetActiveDocument()->GetActiveRenderData()->GetData().GetLong(RDAT_XRES,l);

    OR

    LONG l=0;
    GetActiveDocument()->GetActiveRenderData()->GetDataInstance().GetLong(RDAT_XRES,l);

    Does variable l shows any value ...?
    How can I inquery that RDATA_ ...
    Even if it does not work on your machine too ... please let me know ...;-) ... Cos' then I can believe I'm not the only one ...;-);-);-)...

    Crazily in that ...
    ZawMinTun



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2005 at 02:07, xxxxxxxx wrote:

    No advice at all? ) :-(

    But I know a little more ...
    Don't read the container ... fill it ... and do what you want to do ... but there's something still I want to know ...
    And I want to know is what everybody can know ...but not me ... ;-)

    How can I use RDATA_Multipass ...?
    I mean the structure of the container is shown in HelpFile ...
    Using upper part is easy ...
    But when come down ...I reach RDATA_MULTIPASS_CHANNELS ...
    At that ... I found the word like "sub-container" ... I tried to fill it in any way ... but not Ok ...

    If you know about render or not ... you can help me if you have ever used deep-hierarchically-structured containers ...
    Would you do a favor for me ... please ... by looking at the help file RDATA_MULTIPASS structure ... and scroll to   RDATA_MULTIPASS_CHANNELS and replying me something ...

    Right here waiting ...
    ZawMinTun



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2005 at 08:59, xxxxxxxx wrote:

    Now I'm having the same trouble as you had
    and I recognize that my post wasn't any help,
    because it simply does nothing at all...

    In the modalrenderer.cpp of the sdk I found
    a hint:

    BaseContainer RData = m_doc->GetActiveRenderData()->GetData();
    LONG a = RData.GetLong(RDATA_FRAMERATE);

    This returns the framerate. RDATA_XRES
    works as well. Up to now I wasn't able
    to get the FRAMEFROM and FRAMETO settings.

    I coulnd't find the GetLong([Only one parameter!])
    method in the documentation and my Visual Studio
    didn't offer it too. Why is that?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/08/2005 at 19:47, xxxxxxxx wrote:

    Hello zour ...

    I also thought it like that ...
    We've thought the very very same way .. and it's a little wrong ...
    Use it simply like that ...

    BaseContainer bc=GetActiveDocument()->GetActiveRenderData()->GetData();
    LONG l=bc.GetLong(RDATA_FRAMERATE);
    MessageDialog(LongToString(l));

    If you set your render setting as default ... the dialog will show "30" ....

    We a little overlooked the function declaration ...
    LONG GetLong(LONG id, LONG preset = 0);
    Second parameter is not essential one ...
    So I said we thought the same way ...
    But ... now we knew .. right? ;-) ;-)

    I hope the code segment above will work properly on your machine too ...

    With all my best wishes ...
    ZawMinTun


Log in to reply