Selection problem
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/12/2006 at 06:50, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.603
Platform: Windows ;
Language(s) : C++ ;---------
Hi,
I have differnt selected Objects in the object manager for example free selected objects but i need to deselect the first of the three objects. So how can can i access to the first of the selectet objects.
I have tried GetAktiveObject() und SetActiveObject but this didn't work when more objects are selected.
At the most cases more than one object will be selected but every single time i need the first object of them. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/12/2006 at 09:10, xxxxxxxx wrote:
A second question how can i load an image of the surface of my plugin?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/12/2006 at 13:47, xxxxxxxx wrote:
Use GetActiveObject s () instead and do this:
if ((atomarray->GetCount()==1) && atomarray->GetIndex(0)) ((BaseObject* )atomarray->GetIndex(0))->DelBit(BIT_ACTIVE);
That'll deselect the first selected object.
Not sure that I understand the second question. How do you load an image into a Bitmap?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/12/2006 at 14:44, xxxxxxxx wrote:
No problem. I am a devoloper but i have never been programmed a plugin for cinema 4d and so i think i oversee a lot of facts that would be clear after a longer time of work. I am devoloping a meshoptimizing tool for two weeks now and only two things are not complet yet. Our enterprise logo on the GUI "Userinferace or window which represent the plugin" and the delete method.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/12/2006 at 15:50, xxxxxxxx wrote:
I do something like this for my plugin's logo. This is done in the GeDialog's CreateLayout() method.
BaseContainer tbc; tbc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_BITMAPBUTTON); tbc.SetLong(BITMAPBUTTON_BORDER, BORDER_NONE); tbc.SetBool(BITMAPBUTTON_BUTTON, FALSE); // BitMap Button bmbutton = (BitmapButtonCustomGui* )AddCustomGui(IP_ABOUT, CUSTOMGUI_BITMAPBUTTON, String(), flags, SizePix(256), SizePix(40), tbc); if (!bmbutton) return ErrorException::Throw(EE_DIALOG, GeLoadString(IPPERR_MEMORY_TEXT), "IPPDialog.CreateBannerGroup.bmbutton"); Filename bg = GeGetPluginPath()+Filename("res")+Filename("banner.tif"); if (GeFExist(bg)) bmbutton->SetImage(bg, FALSE);
Hope that helps!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/12/2006 at 16:48, xxxxxxxx wrote:
Thanks, through your help it is working perfekt know. I have tested it on a current projekt at our company and now the time of rendering one frame is from over one hour to only a half minute. If you are interessted of the data:
Memory 78945KBytes; Objects 78870 (Before optimizing)
to
Memory 26668KBytes; Objects 24 (After optimizing)
and only 24 objects are very fast to work with^^
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/12/2006 at 03:29, xxxxxxxx wrote:
But i dont get the code for the logo to work. For example what is bmbutton or IP_About. In the SDK i couldn't find anythings what would be fitting
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/12/2006 at 04:20, xxxxxxxx wrote:
this is some COFFEE code to count the active objects
maybe it helps you also for C++
in coffee you can do this with obj->GetBit(BIT_AOBJ),
and probably obj->SetBit(BIT_AOBJ,0) to deselectvar obj=GetActiveDocument()->GetFirstObject(), active_objects;
if(obj->GetBit(BIT_AOBJ)) { active_objects=0; } else { active_objects=-1; }
while(obj) { active_objects++; obj=obj->SearchNext(BIT_AOBJ); }
println(active_objects, " active objects"); -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/12/2006 at 05:30, xxxxxxxx wrote:
Thx but the first solution is working perfekt, now i only need the thing with the logo and it is ready for realese after it has been tested.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/12/2006 at 14:03, xxxxxxxx wrote:
Murakami,
BaseContainer tbc; tbc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_BITMAPBUTTON); tbc.SetLong(BITMAPBUTTON_BORDER, BORDER_NONE); tbc.SetBool(BITMAPBUTTON_BUTTON, FALSE); // BitMap Button BitmapButtonCustomGui* bmbutton = (BitmapButtonCustomGui* )AddCustomGui(0, CUSTOMGUI_BITMAPBUTTON, String(), flags, SizePix(256), SizePix(40), tbc); if (!bmbutton) return FALSE; Filename bg = GeGetPluginPath()+Filename("res")+Filename("banner.tif"); if (GeFExist(bg)) bmbutton->SetImage(bg, FALSE);
IP_ABOUT is my gadget ID. If you don't need to later reference the logo, this can be 0.
SizePix(256) and SizePix(40) are the pixel dimensions (width and height) of my logo. Replace the numbers with the dimensions of your logo.
Note that my logo image is "banner.tif" and is placed in the plugin's res folder. You'll have to adjust this for location and name.
The ErrorException::Throw(...) is my own fake exception for error handling. Replace that with your own error handling.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/12/2006 at 07:18, xxxxxxxx wrote:
thx kuroyume0161 and all the other
Now it is complet and will be tested in the next days.
When the final tests are over it will be releasod on www.ia-renderfarm.de