// Ri3DLoader.h : Declaration of the CRi3DLoader

#pragma once

/**
@interface IRi3DLoader

This interface declares script commands that are added into Rosetta after plugin is initialized.
Use this script commands through Rs3DLoader name space.

In this sample we define only one command Create3DLoader. The command create RcCreate3DLoader
command and execute it.
*/

[
	object,
	uuid("039F7647-C2AB-4aa5-A250-36C0D757E302"),
	dual, helpstring("IRi3DLoader Interface"),
	pointer_default(unique)
]
__interface IRi3DLoader : IDispatch
{
	/**
        Method create RcCreate3DLoader command and execute it.
		Call this method from script as Rs3DLoader.Create3DLoader()
    */
    [id(1), helpstring("method Create3DLoader")] HRESULT Create3DLoader();
};

// CRi3DLoader
[
	ATTRIBUTE_COCLASS,
	threading(both),
	vi_progid("Rs3DLoader.Ri3DLoader"),
	progid("Rs3DLoader.Ri3DLoader.1"),
	version(1.0),
	uuid("2E5931F5-DB27-4999-9696-482F22853C1B"),
	helpstring("Ri3DLoader Class")
]
class ATL_NO_VTABLE CRi3DLoader : 
    IMPLEMENT_DISPATCH(IRi3DLoader),
    public IRsNamedItem,
	public IRsObject
{
public:
	CRi3DLoader()
	{
	}


	//DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}

     // IRsObject
    RS_DECLARE_IRS_OBJECT(IRi3DLoader, L"3D Loader")

	// IRsNamedItem
	STDMETHOD(get_Name)(BSTR* pVal);

    // IRi3DLoader
    STDMETHOD(Create3DLoader)();
};
