Bitmaps for PluginObjects
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/11/2002 at 13:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.012
Platform: Windows ;
Language(s) : C++ ;---------
I am making an object plugin and i want to show a bitmap in the AM.
Very similar to the Lightobject with it's noise-preview.
But i don't know how.
An Explanation of the BitmapButton Customgui could help. I wasn't able to find any information on this.
Michael -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/11/2002 at 07:28, xxxxxxxx wrote:
Quote: Originally posted by Michael Welter on 09 November 2002
>
> * * *
>
> I am making an object plugin and i want to show a bitmap in the AM.
>
> An Explanation of the BitmapButton Customgui could help. I wasn't able to find any information on this.
Sorry, this part of the docs isn't finished yet. You need to add this code: (Example from AtomObject.)Bool GetDParameter(GeListNode *node, const DescID &id,GeData &t_data,LONG &flags) { switch(id[0].id) { case ATOMOBJECT_PREVIEW: { PluginMaterial *mat = (PluginMaterial* )node; LONG dirty = 0; BitmapButtonStruct bbs(static_cast<PluginObject*>(node), id, dirty); t_data = GeData(CUSTOMDATATYPE_BITMAPBUTTON,bbs); flags |= DESCFLAGS_PARAM_GET; break; } } return SUPER::GetDParameter(node, id, t_data, flags); } Bool SetDParameter(GeListNode *node, const DescID &id, const GeData &t_data, LONG &flags) { switch(id[0].id) { case ATOMOBJECT_PREVIEW: flags |= DESCFLAGS_PARAM_SET; break; } return SUPER::SetDParameter(node, id, t_data, flags); } static NodeData *Alloc(void) { return gNew AtomObject; } }; Bool Message(GeListNode *node, LONG type, void *t_data) { if (type==MSG_DESCRIPTION_VALIDATE) { BaseContainer *data = ((BaseObject* )node)->GetDataInstance(); CutReal(*data,ATOMOBJECT_CRAD,0.0,data->GetReal(ATOMOBJECT_SRAD)); } if (type == MSG_DESCRIPTION_GETBITMAP) { DescriptionGetBitmap* dgb = static_cast<DescriptionGetBitmap*>(t_data); if (dgb->id[0] == ATOMOBJECT_PREVIEW) { AutoAlloc<BaseBitmap> bm; bm->Init(50, 50); bm->SetPen(12, 34, 56); bm->Line(0, 0, 49, 49); dgb->bmp = bm.Release(); } } return TRUE; }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/11/2002 at 09:00, xxxxxxxx wrote:
thanks Mikael