Mesh Operation - Manual implementation

From The Foundry MODO SDK wiki
Revision as of 16:09, 9 August 2019 by Cgolchert (Talk | contribs)

Jump to: navigation, search

Problems with posted code

		pkg_TestInterface (
			const LXtGUID		 guid)			LXx_OVERRIDE
			_inst_spawn.TestInterfaceRC (guid);
guid needs to be a pointer
const LXtGUID *guid
or the IDE complains.

A function that has a return of LxResult needs to return something.

			 *	Spawn the mesh operation and copy the time channel to
			 *	it for the size.
			meshOp = spawner.Alloc (meshOp_obj);
			if (meshOp)
				meshOp->size = time;

will give an error that Class "MeshOp" has no member "size". "size" is declared in the "mop_Evaluate" function but "_size" is the variable in the class.

	class MeshOp : public CLxImpl_MeshOperation
			static void initialize (){...}
				mop_Evaluate (
					ILxUnknownID		 mesh_obj,
					LXtID4			 type,
					LXtMarkMode		 mode)			LXx_OVERRIDE
				 CLxUser_Mesh		 mesh (mesh_obj);
			         ... <snip> ...
				 LXtVector		 pos;
				 double			 size = 0.5;
                                 ... <snip> ...
				 return result;
			double			 _size;

As is this won't work as published.