input field like light/scene

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

On 19/05/2009 at 23:13, xxxxxxxx wrote:

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

---------
Hi there,

anyone knows an example or where to look in the manual for creating an input field where i can drag more than one object? Like the one in the lights scene-tab? I dont even know how its properly called.. so i guess that would help, too :)

cheers and thanks in advance,
Ello

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

On 20/05/2009 at 00:15, xxxxxxxx wrote:

i think you mean in_exclude. you find it in the sdk docs under "Description resource".

> IN_EXCLUDE [id] \> { \>     [Common flags] \>     [NUM_FLAGS n;] \>     [INIT_STATE s;] \>     [IMAGE_n\_ON|OFF id;] \>     [ACCEPT idlist;] \>     [REFUSE idlist;] \> }

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

On 20/05/2009 at 04:17, xxxxxxxx wrote:

thank you, fused,
thats exactly what i was looking for..

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

On 20/05/2009 at 09:25, xxxxxxxx wrote:

Oh yeah, the lovely InExcludeData ^^
Be careful, it can be a real b*tch...

Generally, if you want to create a GUI *like* some other GUI you saw in other plugins or modules, it's always a good idea to take a look into the .res files and learn from them.

Cheers,
Jack

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

On 20/05/2009 at 12:27, xxxxxxxx wrote:

omg, how can i clone those objects? i always get crashes :)

here i get the InExcludeData:

> `

  
\>  InExcludeData *mylist = (InExcludeData* )bc->GetCustomDataType(CHILDLIST,CUSTOMDATATYPE_INEXCLUDE_LIST);  
\>  if (!mylist ) goto Error;  
\>  

`

and than i try this:
> `

  
\>  ccnt++;  
\>  if (ccnt>objcnt) ccnt = 0;  
\>  child=(BaseObject* )(mylist->ObjectFromIndex(doc,ccnt))->GetClone(COPY_NO_BITS, NULL);   
\>  

`

the last line is where it crashes.. i searched the forum but didnt got results about cloning objects of InExcludeData

thanks for any inout ion this..

cheers,
ello

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

On 20/05/2009 at 12:32, xxxxxxxx wrote:

Make sure ccnt is in the correct range (10 objects, ccnt MUST be between 0 and 9!!!). So, if ccnt==objcnt, that would equal 'crash'. Just like it says in the docs:

(0 <= lIndex < GetObjectCount())

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

On 20/05/2009 at 12:51, xxxxxxxx wrote:

*G, thank you. i really did that here:
if(ccnt>objcnt) ccnt=0;
instead
if(ccnt==objcnt) ccnt=0;

now everything works like it should.. cool :)

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

On 20/05/2009 at 15:19, xxxxxxxx wrote:

Now try deleting one of the objects your have in your InExclude list from the scene ^_^

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

On 20/05/2009 at 15:32, xxxxxxxx wrote:

Quote: _Now try deleting one of the objects your have in your InExclude list from the scene
>
> * * *
_


thanks for THAT! and whats now? args... why does it crash? i thought i was on the save list with all my if(this and that is true) things
:(

and it only crashes when i delete the last object.. hm..

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

On 20/05/2009 at 15:55, xxxxxxxx wrote:

its getting even stranger.. when i use this code

> `

  
\>       if (mylist && mylist->GetObjectCount()>0)  
\>       {  
\>  ...  
\>  

`

in the one plugin i can delete the last object at least from the IN_EXCLUDE field with no crash (deleting it from the scene still crashes), in the other plugin this doesnt help

edit: ok, now it works like this on both plugins, but well, deleting from the scene :)

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

On 20/05/2009 at 23:29, xxxxxxxx wrote:

Yep, the funny InExclude list doesn't notice if a linked object has been deleted. Therefore, the "dead" link remains in the list, and ListCount is not updated, either. You have to write your own function to check the links, remove dead ones and correct the listcount ;-)

Cheers,
Jack

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

On 21/05/2009 at 05:50, xxxxxxxx wrote:

Maybe i'll do it in another way.. i think atm. InExclude is not the best choice for what i wanted to do.. But i'll do a separate testplugin where i can learn those things...

thanks for the indepth
cheers,
Ello