Copy Objects and Materials

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

On 16/10/2009 at 04:19, xxxxxxxx wrote:

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

---------
Hi,
for an exportplugin I am creating clones of the active document (to have all the materials in the new document too). I then delete all Objects in that new document and insert the one I want.
After that im exporting.

> \> BaseDocument \*temp = ( BaseDocument\* ) docMain->GetClone( COPY_DOCUMENT, NULL ); \> DeleteAllObjects( temp ); \> \> AutoAlloc<AliasTrans> aliastrans; \> aliastrans->Init( docMain ); \> temp->InsertObject( ( BaseObject\* ) obj->GetClone( 0, aliastrans ), NULL, NULL, FALSE ); \> aliastrans->Translate(TRUE); \>

Problem are the textures on the object, they don't get linked properly. The TextureTag is there, but it doesn't have the link to the Material.

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

On 16/10/2009 at 05:35, xxxxxxxx wrote:

Hi,

don´t waste time, use:

BaseDocument* IsolateObjects(BaseDocument* doc, const AtomArray& t_objects)

;-)

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

On 16/10/2009 at 07:29, xxxxxxxx wrote:

Wow, thank you for the tip.