iInstanceMgr.h

Go to the documentation of this file.
00001 //*****************************************************************************/
00002 // Copyright (c) 1998-2006 Autodesk, Inc.
00003 // All rights reserved.
00004 // 
00005 // These coded instructions, statements, and computer programs contain
00006 // unpublished proprietary information written by Autodesk, Inc., and are
00007 // protected by Federal copyright law. They may not be disclosed to third
00008 // parties or copied or duplicated in any form, in whole or in part, without
00009 // the prior written consent of Autodesk, Inc.
00010 //*****************************************************************************/
00011 // DESCRIPTION: Interface for working with instances of scene entities
00012 // AUTHOR: Attila Szabo - created Aug.26.2002
00013 //*****************************************************************************/
00014 #pragma once
00015 
00016 #include "iFnPub.h"
00017 #include "maxtypes.h"
00018 #include "GetCOREInterface.h"
00019 
00020 // --- Forward declaration
00021 class INode;
00022 class INodeTab;
00023 class Mtl;
00024 
00025 // --- Interface IDs
00026 #define INSTANCE_MGR_INTERFACE Interface_ID(0x5ecd70b5, 0x59092257)
00027 
00036 #define INSTANCE_MGR_MAKE_UNIQUE_PROMPT 0 
00037 
00038 #define INSTANCE_MGR_MAKE_UNIQUE_INDIVIDUAL 1 
00039 
00040 #define INSTANCE_MGR_MAKE_UNIQUE_GROUP 2 
00041 
00042 
00059 class IInstanceMgr : public FPStaticInterface
00060 {
00061     public:
00074         virtual unsigned long GetInstances(INode& source, INodeTab& instances) const = 0;
00075 
00084         virtual unsigned long SetMtlOnInstances(INode& source, Mtl* newMtl) = 0;
00085         
00104         virtual bool GetAutoMtlPropagation() const = 0;
00105 
00111         virtual bool SetAutoMtlPropagation(bool autoPropagate) = 0;
00113 
00123         virtual bool CanMakeObjectsUnique(INodeTab& tabNodes) const = 0;
00124 
00131         virtual bool MakeObjectsUnique(
00132             INodeTab& tabNodes, 
00133             int iMultiNodeOption = INSTANCE_MGR_MAKE_UNIQUE_PROMPT) const = 0;
00134 
00140         virtual bool CanMakeModifiersUnique(
00141             INodeTab& tabNodes, 
00142             Tab<ReferenceTarget*>& tabMods) const = 0;
00143 
00151         virtual bool MakeModifiersUnique(
00152             INodeTab& tabNodes, 
00153             Tab<ReferenceTarget*>& tabMods, 
00154             int iMultiNodeOption = INSTANCE_MGR_MAKE_UNIQUE_PROMPT) const = 0;
00155 
00161         virtual bool CanMakeControllersUnique(
00162             INodeTab& tabNodes, 
00163             Tab<ReferenceTarget*>& tabConts) const = 0;
00164         
00172         virtual bool MakeControllersUnique(
00173             INodeTab& tabNodes, 
00174             Tab<ReferenceTarget*>& tabConts, 
00175             int iMultiNodeOption = INSTANCE_MGR_MAKE_UNIQUE_PROMPT) const = 0;
00177 
00184         virtual IOResult Save(ISave* isave) const = 0;
00185 
00188         virtual IOResult Load(ILoad* iload) = 0;
00190 
00193         static IInstanceMgr* GetInstanceMgr()   {
00194             return static_cast<IInstanceMgr*>(GetCOREInterface(INSTANCE_MGR_INTERFACE));
00195         }
00196 }; 
00197 
00198 
00199 
00200