Object drop fields in COFFEE dialogs?

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

On 17/09/2003 at 06:50, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   8.207 
Platform:      Mac OSX  ; 
Language(s) :   C.O.F.F.E.E  ;

---------
what I´d like to have in my plugin is a field where I can drag an object of my choice to create a reference to this object for my plugin to use (eg. like the Reference Object field in an Instance Object), so that, if I change the name of the object, the reference is still there. Is there an easy way to create this (meaning I simply overlooked it), or is it not possible from within coffee?

If it´s not possible, what would be the best way to get/store this information?

Also, was there a change to the way bitmaps are handled? I have a title image inside my plugin (using a UserArea), and since upgrading to 8.2 the complete image is grey - worked perfectly well under 8.1?

Thanks in advance,

MikeI

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

On 19/09/2003 at 11:58, xxxxxxxx wrote:

Drag and drop fields are possible (see the GUI demo C.O.F.F.E.E. example). Base links aren't there in C.O.F.F.E.E. yet, but you could store the name.
I don't know if anything related to bitmaps in C.O.F.F.E.E. changed in 8.2. How do you load the image? Is the image the right size, just grey?

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

On 21/09/2003 at 23:59, xxxxxxxx wrote:

ah, now i see... ok, storing the name is ok, since the objects will be uniqely named. I´ll try that.

fyi, the source code available for download in the GuiDemo section is different from the one displayed on the site - I take the one in the download is the newer one.

as for the images: I took the code for that one from this forum (can´t remember where), and yes, the image is the correct size, and grey (if I use BMP_NORMAL, or black, if I use BMP_NORMALSCALED). Under 8.1 it works, under 8.2, no luck...

code:

LogoArea::Draw(x1,y1,x2,y2)  
{  
     var w=GetWidth()-1;  
     var h=GetHeight()-1;  
       
     OffScreenOn();  
     SetClippingRegion(x1,y1,x2,y2);  
       
     var titleiconpath=GeGetRootFilename();  
     titleiconpath->RemoveLast();  
     titleiconpath->AddLast("res");  
     titleiconpath->AddLast(titleiconname);  
       
     var titleicon=new(BaseBitmap,1,1);  
     titleicon->Load(titleiconpath);  
       
          DrawBitmap(titleicon,0,0,362,74,x1,y1,x2,y2,BMP_NORMALSCALED);  
}

and add a User Area during CreateLayout() :

MainDialog::CreateLayout()  
{  
     AddUserArea(5000,BFH_CENTER|BFV_CENTER,0,0);  
     ua=new(LogoArea,5000,this);       
     return LoadDialogResource(MainDialog,resource,0);  
}  

thanks for your help,

MikeI