Esempio n. 1
0
                bool
        GetShaderItem (
                CLxLoc_Item             &item)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (ShaderItemGet (&obj)))
                        return false;

                return item.take (obj);
        }
Esempio n. 2
0
                bool
        MakeBranch (
                CLxLoc_EvaluationStack  &branch)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (Branch (&obj)))
                        return false;

                return branch.take (obj);
        }
Esempio n. 3
0
                bool
        duplicate (
                CLxLoc_Shader           &acc)
        {
                LXtObjectID              obj;

                acc.clear ();
                if (LXx_FAIL (Spawn (&obj)))
                        return false;

                return acc.take (obj);
        }
Esempio n. 4
0
                bool
        GetBin (
                unsigned                 index,
                CLxLoc_SurfaceBin       &bin)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (BinByIndex (index, &obj)))
                        return false;

                return bin.take (obj);
        }
Esempio n. 5
0
                bool
        EditMeshByIndex (
                unsigned int             index,
                CLxLoc_Mesh             &mesh)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (MeshEdit (index, &obj)))
                        return false;

                return mesh.take (obj);
        }
Esempio n. 6
0
                bool
        ItemByIndex (
                unsigned int             index,
                CLxLoc_Item             &item)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (MeshItem (index, &obj)))
                        return false;

                return item.take (obj);
        }
Esempio n. 7
0
                bool
        BeginXfrm (
                ILxUnknownID             toolVec,
                CLxLoc_TransformScan    &xfrm)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (XfrmAllocate (toolVec, &obj)))
                        return false;

                return xfrm.take (obj);
        }
Esempio n. 8
0
                bool
        BeginScan (
                unsigned int             flags,
                CLxLoc_LayerScan        &scan)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (ScanAllocate (flags, &obj)))
                        return false;

                return scan.take (obj);
        }
Esempio n. 9
0
                bool
        GetMeshShaders (
                CLxLoc_Item             &meshItem,
                CLxLoc_Shader           &acc)
        {
                LXtObjectID              obj;

                acc.clear ();
                if (LXx_FAIL (MeshShaderAccessor (meshItem, &obj)))
                        return false;

                return acc.take (obj);
        }
Esempio n. 10
0
                bool
        AllocSurf (
                ILxUnknownID             attr,
                unsigned                 index,
                CLxLoc_Surface          &surf)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (Evaluate (attr, index, &obj)))
                        return false;

                return surf.take (obj);
        }
Esempio n. 11
0
                bool
        AllocSurf (
                ILxUnknownID             chanRead,
                bool                     morph,
                CLxLoc_Surface          &surf)
        {
                LXtObjectID              obj;

                if (LXx_FAIL (GetSurface (chanRead, morph ? 1 : 0, &obj)))
                        return false;

                return surf.take (obj);
        }
Esempio n. 12
0
                bool
        GetPolyShaders (
                CLxLoc_Item             &meshItem,
                LXtPolygonID             polyID,
                CLxLoc_Shader           &acc)
        {
                LXtObjectID              obj;

                acc.clear ();
                if (LXx_FAIL (PolyShaderAccessor (meshItem, polyID, &obj)))
                        return false;

                return acc.take (obj);
        }
Esempio n. 13
0
	void 
CCommandLoadFile::cmd_Interact ()
{
	/*
	*	When the command is executed, this function is first called.
	*	It's the ideal place to open a file dialog and ask for user
	*	interaction. The resulting path can then be passed to the
	*	commands execute method using the filename argument.
	*
	*	No scene or state altering code should be performed here.
	*/

	CLxUser_CommandService	 cmd_svc;
	CLxUser_Command		 command;
	CLxUser_ValueArray	 val_array;

	std::string		 filename = "";
	unsigned		 n = 0;


	/*
	*	Check if the filename argument is set, if it is, return early.
	*/

	if (dyna_IsSet (ARGi_FILENAME))
		return;

	/*
	*	Fire the commands to open the file dialog.
	*/

	cmd_svc.ExecuteArgString (-1, LXiCTAG_NULL, "dialog.setup fileOpen");
	cmd_svc.ExecuteArgString (-1, LXiCTAG_NULL, "dialog.title {Browse For Files...}");
	cmd_svc.ExecuteArgString (-1, LXiCTAG_NULL, "dialog.fileTypeCustom model {OpenVDB model} {*.vdb} vdb");
	cmd_svc.ExecuteArgString (-1, LXiCTAG_NULL, "dialog.open");

	/*
	*	Spawn a command that can be queried for the result.
	*/

	if (LXx_FAIL(cmd_svc.NewCommand (command, "dialog.result")))
		return;

	/*
	*	Query the first argument on the dialog.result command
	*	and store the results in a value array.
	*/

	if (LXx_FAIL(cmd_svc.QueryIndex (command, 0, val_array)))
		return;

	/*
	*	Get the number of elements in the array. There should
	*	only be one. If there are none, return early.
	*/

	n = val_array.Count ();

	if (!n)
		return;

	/*
	*	Read the string from the value array and set the filename
	*	argument to the value of the string.
	*/

	val_array.String (0, filename);
	attr_SetString (ARGi_FILENAME, filename.c_str ());
}