/****************************************************************************************

		External3DAPI.r

		Copyright (c)1990 - 1999 MetaCreations. All rights reserved.

		Author:	
		Date:	6/22/98

		Revision History

		when		who			what & why
		==========	==========	======================================================
		7/2/99		Greg		Removed prim resource (icon is now gotten at same ID as COMP)
		3/15/99		Greg		Added to room resource
		12/10/98	Greg		New 'mdlr' resource type
		11/18/98	Greg		New 'Room' resource type, general cleanup

*****************************************************************************************/
#ifndef __EXTERNAL3DAPIR__
#define __EXTERNAL3DAPIR__

#include "ExternalAPI.r"
#include "MFRTypes.r"


//*************************************************************************
//						kRDAPIVersion
//
// Defines the version number for Carrara Extensions. Note that there is
// another version number (kPNTAPIVersion) for MCF/MCImage Extensions that
// is defined in ExternalAPI.r
//
// kRDAPIVersion must always be superior or equal to kPNTAPIVersion
//
#ifndef qDemoVersion
#define kRDAPIVersion 7
#else
#define kRDAPIVersion 107
#endif

//******************************************************************
//
// scmd
//
// private resource for Scene Commands

type 'scmd'
{
	longint;					// UNIQUE Action Number (MUST BE REGISTERED WITH EOVIA)
	integer alreadyInMenu= -2,	// use this if the scene command action number is already used in a menu and you don't want it to show up a second time
			defaultMenu=-1;		// Target menu ID

	//-- List of rooms in which this Scene Command should appear. An empty list means "all"
	longint = $$CountOf(RoomsArray);	
	wide array RoomsArray
	{
		literal longint;	// ID of the room where the Scene Command should appear
	};

	//Encapsulates a binding group (with only one binding generally) that defines the shortcut associated with the command
	//this way platform specific bindings can work for scene commands
	BINDINGSGROUP
	literal longint kNoContext = 0;			//The ID of the context to which the bindings should be added
};

// flags for 3Din and 3Dou
#define isAlienType 0
#define isMainType 1
#define hasExportOptions 2

//******************************************************************
//
// 3Din
//
// private resource for 3D importers

type '3Din'	
{
	longint;			// Family Signature
	longint;			// Class Signature
	longint;			// flags
	literal longint;	// creator (for Macintosh exporters only)
	FTYPDATA			// The following is the 'FTYP' format, with only 1 entry
};

//******************************************************************
//
// 3Din
//
// private resource for 3D exporters

type '3Dou'	
{
	longint;			// Family Signature
	longint;			// Class Signature 
	longint;			// flags
	literal longint;	// creator (for Macintosh exporters only)
	FTYPDATA			// The following is the 'FTYP' format, with only 1 entry
};

//******************************************************************
//
// data
//
// private resource for generic data

type 'data'
{
	longint = $$CountOf(AttachArray);	
	wide array AttachArray
	{
		literal longint;	
	};
};

//******************************************************************
//
// modu
//
// private resource for modules

type 'modu' 
{
	literal int;				// WindowID
	literal int;				// MBarID
	literal int;				// TBarID
	literal int;				// PrefsMappingResID
	literal int;				// PrefsViewResID
	literal int;				// DefaultPrefsResID
	literal longint;			// Workspace class signature
	literal int;				// minimized iconID
	literal longint;			// window context menuID or -1
	literal longint;			// module type ID
};


//******************************************************************
//
// mdlr
//
// private resource for modelers (optional private resource for modules)
// Provide a resource of this type (with the same ID as the 'modu' resource)
// if the module is a modeler.

type 'mdlr'	
{
	integer cannotEditPatches = 0,
			canEditPatches = 1;				// Can edit patches ?
	integer cannotEditFacets = 0,
			canEditFacets = 1;				// Can edit facets ?
	longint = $$Countof(primitiveIDList);
	array primitiveIDList 
	{
		literal longint;					// primitive ID
		integer	isNotNative = 0
				isNative = 1;				// Is native modeler?
	};
};


//******************************************************************
//
// Room
//
// OPTIONAL private resource for modules
// Provide a resource of this type (with the same ID as the 'modu' resource)
// if the module defines a new room; that is, if modules if this type
// belong in a room of their own (e.g., the 3DView module defines a new
// room called "Assemble", and the ModelerManager module defines a new room
// called "Model").

type 'Room' 
{
	pstring;					// Room name
	int noIcon = -1;			// UImg resource ID for main module icon (small icon)
	int noIcon = -1;			// UImg resource ID for main module logo (large icon)
	int orderPriority;			// Defines the order of the rooms in the
								// 	room switcher (a low number indicates
								// 	an earlier position in the switcher)
	integer doesNotWantWireFrameActivation = 0,
			wantsWireFrameActivation = 1;		// determines whether tree wireframes will be activated in this room
};


//******************************************************************
//
// IROp
//
// This resource is used by the app to ask a renderer extension what kinds
// of shaded preview options it supports (e.g., RAVE software or hardware).

type 'IROp' 
{
	array shadedPreviewItem 
	{
		pstring;
	};
	byte = 0;
};

#endif

