Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameDescription
setPointerInternal use.
Cobject#freefreeDestroys the object.
getNameGets object name.
setNameSets object name.
isMeshChecks whether the object is a mesh.
isInstanceChecks whether the object is an instance.
getInstancedGets instance's parent.
isRFRKChecks whether the object is a RFRK object.
getRFRKParametersGets ReaFlow RenderKit parameters.
setRFRKParametersSets RealFlow ReaFlow RenderKit  parameters.
getReferencedScenePathGets the scene file referenced by this object.
setReferencedScenePathSets the scene file referenced by this object.
getReferencedSceneMaterialGets the material of an specific object inside the referenced scene.
setReferencedSceneMaterialSets the material of an specific object inside the referenced scene.
getReferencedOverrideFlagsGet the override policy for visibility flags.
setReferencedOverrideFlagsSet the override policy for visibility flags.
mergeMeshesMerges an array of meshes into a single mesh. Target object must not be included.
getParentGets the parent object in the hierarchy.
setParentSets the parent object in the hierarchy.
getUuidUnique user ID that can be used for custom purposes.
setUuidSets the unique user ID.
getMaterialGets the material applied.
setMaterialSets the object material.
setPropertiesSets the caustics properties of the object.

getDependencies

Gets all the extern dependencies of the object (rfrk files, etc).
Geometry
getNumVertexesGets number of vertexes of the object.
getNumTrianglesGets number of triangles of the object.
getNumNormalsGets number of the normals of the object.
getNumPositionsPerVertexGets number of positions per vertex of the object.
getNumChannelsUVWGets number of UVW channels of the object.
addChannelUVWAdds an UVW channel to the object.
generateSphericalUVWGenerates spherical UVW coordinates.
generateCylindricalUVWGenerates cylindrical UVW coordinates.
generateCubicUVWGenerates cubic UVW coordinates.
generatePlanarUVWGenerates planar UVW coordinates.
getVertexGets vertex by index.
setVertexSets vertex by index.
getNormalGets normal by index.
setNormalSets normal by index.
getTriangleGets triangle (vertexes and normals) by index.
setTriangleSets triangle (vertexes and normals) by index.
getTriangleGroupGets triangle group by index.
setTriangleGroupSets triangle group.
getTriangleUVWGets triangle UVW coordinates.
setTriangleUVWSets triangle UVW coordinantes.
getTriangleMaterialGets triangle material.
setTriangleMaterialSets triangle material.
getGroupMaterialGets material of a group of triangles.
setGroupMaterialSets material of a group of triangles.
getBaseAndPivotGets base and pivot axes of the object.
setBaseAndPivotSets base and pivot axes of the object.
getWorldTransformReturn the world transform of the object.
getTransformSubstepsCountReturn the number of substeps used for defining Base and Pivot motion blur.
getTransfrormStepInfoByIndexReturn transform information( base, pivot and time) for the given index.
getPositionUsed by Maxwell Studio (not needed for rendering).
setPositionUsed by Maxwell Studio (not needed for rendering).
getRotationUsed by Maxwell Studio (not needed for rendering).
setRotationUsed by Maxwell Studio (not needed for rendering).
getScaleUsed by Maxwell Studio (not needed for rendering).
setScaleUsed by Maxwell Studio (not needed for rendering).
getShearUsed by Maxwell Studio (not needed for rendering).
setShearUsed by Maxwell Studio (not needed for rendering).
getPivotPositionUsed by Maxwell Studio (not needed for rendering).
setPivotPositionUsed by Maxwell Studio (not needed for rendering).
getPivotRotationUsed by Maxwell Studio (not needed for rendering).
setPivotRotationUsed by Maxwell Studio (not needed for rendering).
isPosRotScaleInitializedChecks if the methods above have been used for the given object.
cleanGeometryOptional routine that removes degenerated triangles, repeated/unused vertex and normals.
Display
getHideGets "hide" status of the object.
setHideSets "hide" status of the object.
getHideToCameraGets "hide to camera" status of the object.
setHideToCameraSets "hide to camera" status of the object.
getHideToReflectionsRefractionsGets "hide to reflections and refractions" status of the object.
setHideToReflectionsRefractionsSets "hide to reflections and refractions" status of the object.
getHideToGIGets "hide to global illumination" status of the object.
setHideToGIGets "hide to global illumination" status of the object.
isExcludedOfCutPlanesGets "excluded of cut planes" status of the object.
excludeOfCutPlanesSets "excluded of cut planes" status of the object.
getProxyDisplayPoints 
setColorID 
getColorID 
setGeometryDirty 
getUserData 
setUserData 
getVertexesBuffer 
getNormalsBuffer 
getTrianglesBuffer 
initializeMesh 
resizeMesh getReferenceDisplayPointsThis function is useful to display a mesh on a viewport.
setColorIDSets the color used by this object in the Object ID render channel.
getColorIDGets the color used by this object in the Object ID render channel.
setSubdivisionLevelSets the subdivision level of the mesh.
getSubdivisionLevelGets the subdivision level of the mesh.
setGeometryDirtySet the geometry "dirty".
getUserDataInternal use.
setUserDataInternal use.
getVertexesBufferInternal use.
getNormalsBufferInternal use.
getTrianglesBufferInternal use.
initializeMeshClean the mesh and allocates memory for vertexes, normals, triangles and motion blur.
resizeMeshReinitializes all the basic geometry and UV arrays.
generateCustomUVW 
getUVWChannelProperties Gets UVW channel properties.
getGlobalXform 
getGlobalNormalsXform 
getInverseGlobalXform 
getInverseGlobalNormalsXform 
isGeometryLoaderChecks if the object was created by a geometry loader extension.
isGeometryProcedural hasGeometryModifiers Checks if the object was created by a procedural geometry extension.
hasGeometryModifiersChecks if the object has geometry modifiers (extensions).
applyGeometryModifierExtension 
cleanAllGeometryModifierExtensionsClean all geometry modifier extensions applyed to the object.
getGeometryLoaderExtensionParams 
getGeometryProceturalExtensionParams getGeometryModifierExtensionNumber
 getGeometryModifierExtensionsNumberGets the number of geometry modifier extensions applied to the object.
getGeometryModifierExtensionParamsAtIndex 

Inherited methods

isNull.

Anchor
free
free

free

Destroys the object.

...

LanguageSyntax
C++Cmaxwell::Cobject getInstanced()
PythonCmaxwellObject getInstanced()

Return value

Cmaxwell::Cobject reference to the instanced object. Null object if the object is not an instance, (Cmaxwell::Cobject::isNull() == true).

Anchor
isrfrk
isrfrk

...

LanguageSyntax
C++byte getReferencedSceneMaterial( const char* objectName, Cmaxwell::Cmaterial& material )
PythonCmaxwellMaterial getReferencedSceneMaterial( str objectName )

...

LanguageSyntax
C++byte setReferencedSceneMaterial( const char* objectName, Cmaxwell::Cmaterial  material )
Pythonint setReferencedSceneMaterial( str objectName, Cmaterial CmaxwellMaterial  material )

Return value

0 = Error setting reference scene file.

1 = Success.

Anchor
mergemeshesgetreferencedoverrideflagsmergemeshes
getreferencedoverrideflags

mergeMeshes

...

getReferencedOverrideFlags

Gets the override policy for visibility flags. Flags are described in OVERRIDE_REFERENCE_FLAGS in maxwellenums.h.

mergeMeshes( const Cobject* pMeshes, dword nMeshes int mergeMeshes( CmaxwellObject[] meshes
LanguageSyntax
C++byte
getReferencedOverrideFlags( byte& flags )
Python
(int flags, int success) getReferencedOverrideFlags()

Return value

C++

0 = Error

...

1 = Success

...

Examples

...

...

languagejavascript
titlePython

...

meshes  = []
meshes.append( scene.getObject("sphere") );
meshes.append( scene.getObject("cube") );
scene.getObject("cubesphere").mergeMeshes( meshes ); // "cubesphere must exists"
scene.getObject("sphere").free();
scene.getObject("cube").free(); 

...

getParent

...

Python

Tuple containing the "override reference" flags of the object, and the function success value.

Anchor
setreferencedoverrideflags
setreferencedoverrideflags

setReferencedOverrideFlags

Sets the override policy for visibility flags. Flags are described in OVERRIDE_REFERENCE_FLAGS in maxwellenums.h.

LanguageSyntax
C++byte setReferencedOverrideFlags( byte& flags )
Pythonint setReferencedOverrideFlags( int flags )

Return value

0 = Error

1 = Success

Anchor
mergemeshes
mergemeshes

mergeMeshes

Merges an array of meshes into a single mesh. The original meshes are not removed (it can be done later calling Cmaxwell::Cobject::free() ). The target object must not be included in the mesh list, so target geometry (if exists) will be erased.

LanguageSyntax
C++byte mergeMeshes( const Cmaxwell::Cobject* pMeshes, dword nMeshes )
Pythonint mergeMeshes( CmaxwellObject[] meshes )

Return value

0 = Error setting reference scene file.

1 = Success.

Examples

Code Block
languagejavascript
titlePython
meshes  = []
meshes.append( scene.getObject("sphere") );
meshes.append( scene.getObject("cube") );
scene.getObject("cubesphere").mergeMeshes( meshes ); // "cubesphere must exists"
scene.getObject("sphere").free();
scene.getObject("cube").free(); 

Anchor
getparent
getparent

getParent

Gets the parent object in the hierarchy.

LanguageSyntax
C++byte getParent( Cmaxwell::Cobject& parent )
PythonCmaxwellObject getParent()

Return value

C++

0 = Error getting parent object.

1 = Success.

Python

Parent object.

Anchor
setparent
setparent

setParent

Sets the parent object in the hierarchy.

LanguageSyntax
C++byte setParent( Cmaxwell::Cobject parent )
Pythonint setParent( CmaxwellObject parent )

Return value

0 = Error setting parent object.

1 = Success.

Anchor
getuuid
getuuid

getUuid

Unique user ID that can be used for custom purposes.

LanguageSyntax
C++const char* getUuid()
Pythonstr getUuid()

Anchor
setuuid
setuuid

setUuid

Sets the unique user ID.

LanguageSyntax
C++byte setUuid( const char* pUuid )
Pythonint setUuid( str uuid )

Return value

0 = Error setting unique user ID.

1 = Success.

Anchor
getmaterial
getmaterial

getMaterial

Gets the material applied.

LanguageSyntax
C++byte getMaterial( Cmaxwell::Cmaterial& parent )
PythonCmaxwellMaterial  getMaterial()

Return value

C++

0 = Error getting object material.

1 = Success.

Python

Object material.

Anchor
setmaterial
setmaterial

setMaterial

Sets the object material.

LanguageSyntax
C++byte setMaterial( Cmaxwell::Cmaterial material )
Pythonint setMaterial( CmaxwellMaterial  material )

Return value

0 = Error setting object material.

1 = Success.

Anchor
setproperties
setproperties

setProperties

Sets the caustics properties of the object. 1 enables, 0 disables.

LanguageSyntax
C++byte setProperties( int doDirectCausticsReflection, int doDirectCausticsRefraction, int doIndirectCausticsReflection, int doIndirectCausticsRefraction )
Pythonint setProperties( byte doDirectCausticsReflection, byte doDirectCausticsRefraction, byte doIndirectCausticsReflection, byte doIndirectCausticsRefraction )

Return value

0 = Error setting object material.

1 = Success.

Anchor
getdependencies
getdependencies

getDependencies

Returns an array of strings with all the extern dependencies of the object (rfrk files, etc).

LanguageSyntax
C++byte getDependencies( dword& numDependencies, char** & paths, const bool& searchInsideProxy = true )
Pythonstr[] getDependencies( bool searchInsideProxy = true )

Parameters

TypeNameIn/OutDescription
dword&numDependenciesout(C++ only) Number of dependencies returned.
char**&pathsout(C++ onlu) String array (size = numDependencies) containing all the dependencies requested.
const bool&searchIndideProxyin

If true, the function search for dependencies also in the referenced proxy objects if exists. searchInsideProxy is true by default.

Return value

C++

0 = Error getting dependency paths.

1 = Success.

Python

List of str containing the dependency paths.

Anchor
getnumvertexes
getnumvertexes

getNumVertexes

Gets number of vertexes of the object.

LanguageSyntax
C++byte getNumVertexes( dword& nVertexes )
Pythonint getNumVertexes()

Return value

C++

0 = Error getting number of vertexes.

1 = Success.

Python

Number of vertexes.

Anchor
getnumtriangles
getnumtriangles

getNumTriangles

Gets number of triangles of the object.

LanguageSyntax
C++byte getNumTriangles( dword& nTriangles )
Pythonint getNumTriangles()

Return value

C++

0 = Error getting number of triangles.

1 = Success.

Python

Number of triangles.

Anchor
getnumnormals
getnumnormals

getNumNormals

Gets number of normals of the object.

LanguageSyntax
C++byte getNumNormals( dword& nNormals )
Pythonint getNumNormals()

Return value

C++

0 = Error getting number of normals.

1 = Success.

Python

Number of normals.

Anchor
getnumpositionspervertex
getnumpositionspervertex

getNumPositionsPerVertex

Gets number of positions per vertex of the object.

LanguageSyntax
C++byte getNumPositionsPerVertex( dword& nPositions )
Pythonint getNumPositionsPerVertex()

Return value

C++

0 = Error getting number of positions per vertex.

1 = Success.

Python

Number of positions per vertex.

Anchor
getnumchannelsuvw
getnumchannelsuvw

getNumChannelsUVW

Gets number of UVW channels of the object.

LanguageSyntax
C++byte getNumChannelsUVW( dword& nChannelsUVW )
Pythonint getNumChannelsUVW()

Return value

C++

0 = Error getting number UVW channels.

1 = Success.

Python

Number of UVW channels.

Anchor
addchanneluvw
addchanneluvw

addChannelUVW

Adds an UVW channel to the object.

LanguageSyntax
C++byte addChannelUVW( dword& index, byte id = 0xFF )
Pythonint addChannelUVW( byte id = 0xFF )

Return value

C++

0 = Error adding UVW channel.

1 = Success.

Python

Index of the new channel.

Anchor
generatesphericaluvw
generatesphericaluvw

generateSphericalUVW

Generates spherical UVW coordinates.

LanguageSyntax
C++byte generateSphericalUVW( dword& iChannel, CbaseT& projectorBase, real& startLatitude, real& endLatitude, real& startLongitude, real& endLongitude )
Pythonint generateSphericalUVW( int iChannel, Cbase projectorBase, float startLatitude, float endLatitude, float startLongitude, float endLongitude )

Return value

0 = Error generating spherical UVW coordinaltes.

1 = Success.

Anchor
generatecylindricaluvw
generatecylindricaluvw

generateCylindricalUVW

Generates cylindrical UVW coordinates.

LanguageSyntax
C++byte generateCylindricalUVW( dword& iChannel,  Cbase& projectorBase, real& startAngle, real& endAngle )
Pythonint generateCylindricalUVW( int iChannel,  Cbase projectorBase, float startAngle, float endAngle )

Return value

0 = Error generating cylindrical UVW coordinaltes.

1 = Success.

Anchor
generatecubicuvw
generatecubicuvw

generateCubicUVW

Generates cubic UVW coordinates.

LanguageSyntax
C++byte generateCubicUVW( dword& iChannel,  Cbase& projectorBase, bool mirrorBackFaces = false )
Pythonint generateCubicUVW( int iChannel,  Cbase projectorBase, bool mirrorBackFaces = False )

Return value

0 = Error generating cubic UVW coordinaltes.

1 = Success.

Anchor
generateplanaruvw
generateplanaruvw

generatePlanarUVW

Generates planar UVW coordinates.

LanguageSyntax
C++byte generatePlanarUVW( dword& iChannel,  Cbase& projectorBase )
Pythonint generatePlanarUVW( int iChannel,  Cbase projectorBase )

Return value

0 = Error generating planar UVW coordinaltes.

1 = Success.

Anchor
getvertex
getvertex

getVertex

Gets vertex by index.

LanguageSyntax
C++byte getVertex( dword iVertex, dword iPosition, Cpoint& point )
PythonCvector getVertex( int iVertex, int iPosition )

Return value

C++

0 = Error getting the vertex.

1 = Success.

Python

 Cvector containing the vertex requested.

Anchor
setvertex
setvertex

setVertex

Sets vertex by index.

LanguageSyntax
C++byte setVertex( dword iVertex, dword iPosition, const Cpoint& point )
Pythonint setVertex( int iVertex, int iPosition, Cvector point )

Return value

0 = Error setting the vertex.

1 = Success.

Anchor
getnormal
getnormal

getNormal

Gets normal by index.

LanguageSyntax
C++byte getNormal( dword iVertex, dword iPosition, Cvector&normal )
PythonCvector getNormal( int iVertex, int iPosition )

Return value

C++

0 = Error getting the normal.

1 = Success.

Python

Cvector containing the normal requested.

Anchor
setnormal
setnormal

setNormal

Sets normal by index.

LanguageSyntax
C++byte setNormal( dword iNormal, dword iPosition, const Cvector& normal )
Pythonint setNormal( int iNormal, int iPosition, Cvector normal )

Return value

0 = Error setting the normal.

1 = Success.

Anchor
gettriangle
gettriangle

getTriangle

Gets triangle (vertexes and normals) by index.

CmaxwellObject getParent(
LanguageSyntax
C++

byte

getParent( Cmaxwell::Cobject& parent )
Python

getTriangle( dword iTriangle, dword &iVertex1, dword &iVertex2, dword &iVertex3, dword &iNormal1, dword &iNormal2, dword &iNormal3 )

Python

(int iVertex1, int iVertex2, int iVertex3, int iNormal1, int iNormal2, int iNormal3) getTriangle( int iTriangle )

Return value

C++

0 = Error getting parent objectthe triangle.

1 = Success.

Python

Parent objectTuple containing the triangle data.

Anchor
setparentsettrianglesetparent
settriangle

...

setTriangle

Sets the parent object in the hierarchytriangle (vertexes and normals) by index.

LanguageSyntax
C++byte setParent( Cmaxwell::Cobject parent setTriangle( dword iTriangle, dword iVertex1, dword iVertex2, dword iVertex3, dword iNormal1, dword iNormal2, dword iNormal3 )
Pythonint setParent( CmaxwellObject parent setTriangle( int iTriangle, int iVertex1, int iVertex2, int iVertex3, int iNormal1, int iNormal2, int iNormal3 )

Return value

0 = Error setting parent objectthe triangle.

1 = Success.

Anchor
getuuidgettrianglegroupgetuuid
gettrianglegroup

getUuid

...

getTriangleGroup

Gets triangle group by index.

LanguageSyntax
C++const char* getUuid(

byte getTriangleGroup( dword iTriangle, dword& idGroup )

Pythonstr getUuidint getTriangleGroup( int iTriangle )

Return value

C++

0 = Error getting the triangle group.

1 = Success.

Python

Triangle group ID.

Anchor
setuuidsettrianglegroupsetuuid
settrianglegroup

...

setTriangleGroup

Sets the unique user IDgroup that's the triangle belongs to.

LanguageSyntax
C++byte setUuid( const char* pUuid setTriangleGroup( dword iTriangle, dword idGroup )
Pythonint setUuid( str uuid setTriangleGroup( int iTriangle, int idGroup )

Return value

0 = Error setting unique user IDthe triangle group.

1 = Success.

Anchor
getmaterialgettriangleuvwgetmaterial
gettriangleuvw

...

getTriangleUVW

Gets the material appliedtriangle UVW coordinates.

CmaxwellMaterial getMaterial(
LanguageSyntax
C++

byte

getMaterial( Cmaxwell::Cmaterial& parent )
Python

getTriangleUVW( dword iTriangle, dword iChannelID, float& u1, float& v1, float& w1, float& u2, float& v2, float& w2, float& u3, float& v3, float& w3 )

Python

(float u1, float v1, float w1, float u2, float v2, float w2, float u3, float v3, float w3) getTriangleUVW( int iTriangle, int iChannelID )

Return value

C++

0 = Error getting object materialthe triangle UVW coordinates.

1 = Success.

Python

Object material.

...

setMaterial

Sets the object material.

LanguageSyntax
C++byte setMaterial( Cmaxwell::Cmaterial material )
Pythonint setMaterial( CmaxwellMaterial material )

Return value

0 = Error setting object material.

1 = Success.

...

setProperties

...

Tuple containing the triangle UVW coordinates.

Anchor
settriangleuvw
settriangleuvw

setTriangleUVW

Sets triangle UVW coordinantes.

LanguageSyntax
C++byte setProperties( int doDirectCausticsReflection, int doDirectCausticsRefraction, int doIndirectCausticsReflection, int doIndirectCausticsRefraction setTriangleUVW( dword iTriangle, dword iChannelID, float u1, float v1, float w1, float u2, float v2, float w2, float u3, float v3, float w3 )
Pythonint setProperties( byte doDirectCausticsReflection, byte doDirectCausticsRefraction, byte doIndirectCausticsReflection, byte doIndirectCausticsRefraction setTriangleUVW( int iTriangle, int iChannelID, float u1, float v1, float w1, float u2, float v2, float w2, float u2, float v2, float w3 )

Return value

0 = Error setting object materialthe triangle UVW coordinates.

1 = Success.

Anchor
getdependenciesgetdependencies

getDependencies

Returns an array of strings with all the extern dependencies of the object (rfrk files, etc).

LanguageSyntax
C++byte getDependencies( dword& numDependencies, char** & paths, const bool& searchInsideProxy = true )
Pythonstr[] getDependencies( bool searchInsideProxy = true )

Parameters

...

gettrianglematerial
gettrianglematerial

getTriangleMaterial

Gets triangle material.

LanguageSyntax
C++byte getTriangleMaterial( dword iTriangle, Cmaxwell::Cmaterial& material )
PythonCmaxwellMaterial getTriangleMaterial( int iTriangle )

Return value

C++

0 = Error getting dependency pathstriangle material.

1 = Success.

Python

List of str containing the dependency pathsTriangle material.

Anchor
getnumvertexessettrianglematerialgetnumvertexes
settrianglematerial

getNumVertexes

...

setTriangleMaterial

Sets the triangle material.

LanguageSyntax
C++byte getNumVertexessetTriangleMaterial( dword & nVertexes iTriangle, Cmaxwell::Cmaterial material )
Pythonint getNumVertexes(setTriangleMaterial( int iTriangle, CmaxwellMaterial material )

Return value

C++

...

0 = Error

...

setting triangle material.

1 = Success

...

Python

...

.

Anchor
getnumtrianglesgetgroupmaterialgetnumtriangles
getgroupmaterial

...

getGroupMaterial

Gets number material of a group of triangles of the object.

LanguageSyntax
C++byte getNumTrianglesgetGroupMaterial( dword & nTriangles iGroup, Cmaxwell::Cmaterial& material )
PythonCmaxwellMaterial getGroupMaterial( int getNumTriangles( iGroup )

Return value

C++

0 = Error getting number of trianglestriangle group material.

1 = Success.

Python

Number of trianglesTriangle group material.

Anchor
getnumnormalssetgroupmaterialgetnumnormals
setgroupmaterial

...

setGroupMaterial

Gets number of normals of the objectSets material of a group of triangles.

LanguageSyntax
C++byte getNumNormalssetGroupMaterial( dword & nNormals iGroup, Cmaxwell::Cmaterial material )
Pythonint getNumNormals(setGroupMaterial( int iGroup, CmaxwellMaterial material )

Return value

...

C++

0 = Error

...

setting triangle group material.

1 = Success.

...

Python

...

Anchor
getnumpositionspervertexsetbaseandpivotgetnumpositionspervertex
setbaseandpivot

getNumPositionsPerVertex

...

setBaseAndPivot

Sets base and pivot axes of the object.

LanguageSyntax
C++

byte

getNumPositionsPerVertex( dword& nPositions

setBaseAndPivot( Cbase base, Cbase pivot, real substepTime = 0.0 )

Pythonint getNumPositionsPerVertex(setBaseAndPivot( Cbase base, Cbase pivot, float substepTime = 0.0 )

Return value

...

C++

0 = Error

...

setting object base and pivot.

1 = Success

...

Python

...

.

Anchor
getnumchannelsuvwgetbaseandpivotgetnumchannelsuvw
getbaseandpivot

...

getBaseAndPivot

Gets number of UVW channels base and pivot axes of the object.

LanguageSyntax
C++byte getNumChannelsUVW( dword& nChannelsUVW getBaseAndPivot( Cbase& base, Cbase& pivot, const real substepTime = 0.0 )
Pythonint getNumChannelsUVW((Cbase base, Cbase pivot) getBaseAndPivot( float substepTime = 0.0 )

Return value

C++

0 = Error getting number UVW channelsobject base and pivot.

1 = Success.

Python

Number of UVW channelsTuple containing Cbase base and Cbase pivot axes (base,pivot).

Anchor
addchanneluvwgetworldtransformaddchanneluvw
getworldtransform

addChannelUVW

...

getWorldTransform

Returns the world transform of the object taking into account base and pivot of all its parents..

LanguageSyntax
C++byte addChannelUVWgetWorldTransform( dword& index, byte id = 0xFF Cbase& base )
Pythonint addChannelUVW( byte id = 0xFF Cbase getWorldTransform()

Return value

C++

0 = Error adding UVW channelgetting world transform of the object.

1 = Success.

Python

Index of the new channelObject world transform.

Anchor
generatesphericaluvwgettransformsubstepscountgeneratesphericaluvw
gettransformsubstepscount

generateSphericalUVW

...

getTransfromSubstepsCount

Return the number of substeps used for defining Base and Pivot motion blur.

LanguageSyntax
C++byte generateSphericalUVW( dword& iChannel, Cbase& projectorBase, real& startLatitude, real& endLatitude, real& startLongitude, real& endLongitude )
Pythonint generateSphericalUVW( int iChannel, Cbase projectorBase, float startLatitude, float endLatitude, float startLongitude, float endLongitude )

Return value

0 = Error generating spherical UVW coordinaltes.

1 = Success.

...

generateCylindricalUVW

...

dword getTransformSubstepsCount()
Pythonint getTransformSubstepsCount()

Anchor
gettransformstepinfobyindex
gettransformstepinfobyindex

getTransformStepInfoByIndex

Return transform information( base, pivot and time) for the given index.

LanguageSyntax
C++byte generateCylindricalUVWgetTransformStepInfoByIndex( dword Cbase& iChannelbase, Cbase& projectorBasepivot, real& startAngle, real& endAngle time, const dword index )
Pythonint generateCylindricalUVW( int iChannelCbase base, Cbase projectorBase pivot, float startAngle, float endAngle time) getTransformStepInfoByIndex( int index )

Return value

C++

0 = Error

...

getting transform information of the object.

1 = Success.

Python

Tuple containing transform information.

 

Anchor
generatecubicuvwisposrotscaleinitializedgeneratecubicuvw
isposrotscaleinitialized

generateCubicUVW

...

isPosRotScaleInitialized

Checks if any of the following methods have been used for the object: setPosition, setRotation, setScale, setShear, setPivotPosition and setPivotRotation. The correct way to transform the object is through the setBaseAndPivot method.

LanguageSyntax
C++byte generateCubicUVWisPosRotScaleInitialized( dword& iChannel, Cbase& projectorBase, bool mirrorBackFaces = false bool& init )
Pythonint generateCubicUVW( int iChannel, Cbase projectorBase, bool mirrorBackFaces = False bool isPosRotScaleInitialized()

Return value

C++

0 = Error

...

getting object transformed for Maxwell Studio.

1 = Success.

Python

True = object initialized using setPosition, setRotation, setScale, setShear, setPivotPosition and/or setPivotRotation (methods used for Maxwell Studio, not for rendering.

Anchor
cleangeometry
cleangeometrygenerateplanaruvwgenerateplanaruvw

generatePlanarUVW

...

cleanGeometry

Optional routine that removes degenerated triangles, repeated/unused vertex and normals. This function is automatically called inside the writeMXS method. It is not needed to call it except in scenarios like the interactive engine.

LanguageSyntax
C++byte generatePlanarUVW( dword& iChannel, Cbase& projectorBase cleanGeometry()
Pythonint generatePlanarUVWcleanGeometry( int iChannel, Cbase projectorBase )

Return value

0 = Error generating planar UVW coordinaltescleaning geometry.

1 = Success.

Anchor
getvertexgethidegetvertex
gethide

...

getHide

Gets vertex by index"hide" status of the object.

LanguageSyntax
C++byte getVertex( dword iVertex, dword iPosition, Cpoint& point getHide( bool& hide )
PythonCvector getVertex( int iVertex, int iPosition bool getHide()

Return value

C++

0 = Error getting the vertex"hide" status.

1 = Success.

Python

Cvector containing the vertex requested.

Python

True = object is hidden.

False = object is not hidden.

Anchor
setvertexsethidesetvertex
sethide

...

setHide

Sets vertex by index"hide" status of the object.

LanguageSyntax
C++byte setVertex( dword iVertex, dword iPosition, const Cpoint& point setHide( bool hide )
Pythonint setVertex( int iVertex, int iPosition, Cvector point setHide( bool hide )

Return value

0 = Error setting the vertex"hide" state.

1 = Success.

Anchor
getnormalgethidetocameragetnormal
gethidetocamera

...

getHideToCamera

Gets normal by index"hide to camera" status of the object.

LanguageSyntax
C++byte getNormal( dword iVertex, dword iPosition, Cvector &normal getHideToCamera( bool& hide )
PythonCvector getNormal( int iVertex, int iPosition bool getHide()

Return value

C++

0 = Error getting the normal"hide to camera" status.

1 = Success.

Python

Cvector containing the normal requestedTrue = object is hidden to camera.

False = object is not hidden to camera.

Anchor
setnormalsethidetocamerasetnormal
sethidetocamera

...

setHideToCamera

Sets normal by index"hide to camera" status of the object.

LanguageSyntax
C++byte setNormal( dword iNormal, dword iPosition, const Cvector& normal setHideToCamera( bool hide )
Pythonint setNormal( int iNormal, int iPosition, Cvector normal setHideToCamera( bool hide )

Return value

0 = Error setting the normalsetting "hide to camera" state.

1 = Success.

Anchor
gettrianglegethidetoreflectionsrefractionsgettriangle
gethidetoreflectionsrefractions

...

getHideToReflectionsRefractions

Gets triangle (vertexes and normals) by index"hide to reflections and refractions" status of the object.

LanguageSyntax
C++byte getTriangle( dword iTriangle, dword &iVertex1, dword &iVertex2, dword &iVertex3, dword &iNormal1, dword &iNormal2, dword &iNormal3 getHideToReflectionsRefractions( bool& hide )
Pythondict getTrianglebool getHideToReflectionsRefractions( int iTriangle )

Return value

C++

0 = Error getting the triangle.

1 = Success.

Python

Dictionary containing the triangle data ("iVertex1", "iVertex2", "iVertex3", "iNormal1", "iNormal2", "iNormal3").

...

setTriangle

...

"hide to reflections and refractions" status.

1 = Success.

Python

True = object is hidden to reflections and refractions.

False = object is not hidden to reflections and refractions.

Anchor
sethidetoreflectionsrefractions
sethidetoreflectionsrefractions

setHideToReflectionsRefractions

Sets "hide to reflections and refractions" status of the object.

LanguageSyntax
C++byte setTriangle( dword iTriangle, dword iVertex1, dword iVertex2, dword iVertex3, dword iNormal1, dword iNormal2, dword iNormal3 byte setHideToReflectionsRefractions( bool hide )
Pythonint setTriangle( int iTriangle, int iVertex1, int iVertex2, int iVertex3, int iNormal1, int iNormal2, int iNormal3 setHideToReflectionsRefractions( bool hide )

Return value

0 = Error setting the triangle"hide to reflections and refractions" state.

1 = Success.

Anchor
gettrianglegroupgethidetogigettrianglegroup
gethidetogi

...

getHideToGI

Gets triangle group by index"hide to global illumination" status of the object.

LanguageSyntax
C++byte getTriangleGroup( dword iTriangle, dword& idGroup getHideToGI( bool& hide )
Pythonint getTriangleGroupbool getHideToGI( int iTriangle )

Return value

C++

0 = Error getting the triangle group"hide to global illumination" status.

1 = Success.

Python

Triangle group IDTrue = object is hidden to global illumination.

False = object is not hidden to global illumination.

Anchor
settrianglegroupsethidetogisettrianglegroup
sethidetogi

...

setHideToGI

Sets group that's the triangle belongs to"hide to global Illumination" status of the object.

LanguageSyntax
C++byte setTriangleGroup( dword iTriangle, dword idGroup setHideToGI( bool hide )
Pythonint setTriangleGroup( int iTriangle, int idGroup setHideToGI( bool hide )

Return value

0 = Error setting the triangle group"hide to global illumination" state.

1 = Success.

Anchor
gettriangleuvwisexcludedofcutplanesgettriangleuvw
isexcludedofcutplanes

...

isExcludedOfCutPlanes

Gets triangle UVW coordinates"excluded of cut planes" status of the object.

LanguageSyntax
C++byte getTriangleUVW( dword iTriangle, dword iChannelID, float& u1, float& v1, float& w1, float& u2, float& v2, float& w2, float& u3, float& v3, float& w3 isExcludedOfCutPlanes( bool& excluded )
Pythondict getTriangleUVW( int iTriangle, int iChannelID bool isExcludedOfCutPlanes()

Return value

C++

0 = Error getting the triangle UVW coordinates"excluded of cut planes" status.

1 = Success.

Python

Dictionary containing the triangle UVW coordinates ('u1','v1,'w1,'u2','v2','w2','u2','v2','w3')True = object is excluded to cut planes.

False = object is not excluded of cut planes.

Anchor
settriangleuvwexcludeofcutplanessettriangleuvw
excludeofcutplanes

...

excludeOfCutPlanes

Sets triangle UVW coordinantes"excluded of cut planes" status of the object.

LanguageSyntax
C++byte setTriangleUVW( dword iTriangle, dword iChannelID, float u1, float v1, float w1, float u2, float v2, float w2, float u3, float v3, float w3 excludeOfCutPlanes( bool exclude )
Pythonint setTriangleUVW( int iTriangle, int iChannelID, float u1, float v1, float w1, float u2, float v2, float w2, float u2, float v2, float w3 excludeOfCutPlanes( bool exclude )

Return value

0 = Error setting the triangle UVW coordinates"excluded of cut planes" state.

1 = Success.

Gets triangle material

Anchor
gettrianglematerialgettrianglematerial

getTriangleMaterial

getreferencedisplaypoints
getreferencedisplaypoints

getReferenceDisplayPoints

This function is useful to display a mesh on a viewport. Returns an array with the vertices of the object in object space. This function is not accurate but should be used for preview purposes only.

LanguageSyntax
C++byte getTriangleMaterial( dword iTriangle, Cmaxwell::Cmaterial& material float* getReferenceDisplayPoints( const dword& percent, const dword& maxPoints, dword& nPoints )
PythonCmaxwellMaterial getTriangleMaterialarray getReferenceDisplayPoints( int iTriangle )

Return value

C++

0 = Error getting triangle material.

1 = Success.

Python

Triangle material.

...

setTriangleMaterial

Sets the triangle material.

LanguageSyntax
C++byte setTriangleMaterial( dword iTriangle, Cmaxwell::Cmaterial material )
Pythonint setTriangleMaterial( int iTriangle, CmaxwellMaterial material )

Return value

0 = Error setting triangle material.

1 = Success.

...

getGroupMaterial

...

percent, int maxPoints )

Parameters

TypeNameIn/OutDescription
const dword&percentinPercent of points of the mesh that will be returned.
const dword&maxPointsin

Maximum number of points that will be in the returned array (-1 means there is not a maximum fixed)

dword&nPointsoutNumber of points returned.

Return value

C++

Array of nPoints * 3 containing the proxy points requested.

Python

NumPy array containing  the proxy points requested. Shape is (nPoints,3).

Anchor
setcolorid
setcolorid

setColorID

Sets the color used by this object in the Object ID render channel. RGB values must always be in the 0-1 range.

LanguageSyntax
C++byte getGroupMaterial( dword iGroup, Cmaxwell::Cmaterial& material setColorID( const Crgb& color )
PythonCmaxwellMaterial getGroupMaterial( int iGroup int setColorID( Crgb  color )

Return value

C++

...

0 = Error

...

setting color ID.

1 = Success

...

Python

...

.

Anchor
setgroupmaterialgetcoloridsetgroupmaterial
getcolorid

setGroupMaterial

...

getColorID

Gets the color used by this object in the Object ID render channel.

LanguageSyntax
C++byte setGroupMaterial( dword iGroup, Cmaxwell::Cmaterial material getColorID( Crgb & color )
Pythonint setGroupMaterial( int iGroup, CmaxwellMaterial material Crgb  getColorID()

Return value

C++

0 = Error

...

getting the color ID.

1 = Success.

Python

Crgb containing the color ID.

Anchor
setbaseandpivotsetsubdivisionlevelsetbaseandpivot
setsubdivisionlevel

...

setSubdivisionLevel

Sets base and pivot axes the subdivision level of the objectmesh.

setBaseAndPivot( Cbase base, Cbase pivot, real substepTime = 0.0 setBaseAndPivot( Cbase base, Cbase pivot, float substepTime = 0.0
LanguageSyntax
C++byte
setSubdivisionLevel( const dword& level )
Pythonint
setSubdivisionLevel( int level )

Return value

0 = Error setting object base and pivot.

1 = Success.

Anchor
getbaseandpivotgetsubdivisionlevelgetbaseandpivot
getsubdivisionlevel

...

getSubdivisionLevel

Gets base and pivot axes the subdivision level of the objectmesh.

tuple getBaseAndPivot( float substepTime = 0.0
LanguageSyntax
C++byte getBaseAndPivotgetSubdivisionLevel( Cbase& base, Cbase& pivot, const real substepTime = 0.0 )Pythondword& level )
Python(int level, int success) getSubdivisionLevel()

Return value

C++

0 = Error getting object base and pivot.

1 = Success.

Python

Object base and pivot axesTuple containing the subdivision level of the mesh and the success value of the method.

Anchor
getworldtransformsetgeometrydirtygetworldtransform
setgeometrydirty

getWorldTransform

...

setGeometryDirty

Method used to recalculate structures needed in interactive mode when the object changes. It is not needed to call it if the UVs or material change, but just should be called when the mesh or base change.

LanguageSyntax
C++byte getWorldTransformsetGeometryDirty( Cbase& base )
PythonCbase getWorldTransformint setGeometryDirty()

Return value

C++

...

0 = Error

...

setting geometry dirty.

1 = Success

...

Python

...

.

Anchor
gettransformsubstepscountinitializemeshgettransformsubstepscount
initializemesh

...

initializeMesh

Return the number of substeps used for defining Base and Pivot motion blur.

LanguageSyntax
C++dword getTransformSubstepsCount()
Pythonint getTransformSubstepsCount()

...

getTransformStepInfoByIndex

Return transform information( base, pivot and time) for the given indexClean the mesh and allocates memory for vertexes, normals, triangles and motion blur.

LanguageSyntax
C++byte getTransformStepInfoByIndex( Cbase& base, Cbase& pivot, real& time, const dword index initializeMesh( dword nVertex, dword nNormals, dword nFaces, dword positionsPerVertex )
Pythondict getTransformStepInfoByIndex( int index )

Return value

C++

0 = Error getting transform information of the object.

1 = Success.

Python

Dictionary containing transform information ('base','pivot','time').

 

...

isPosRotScaleInitialized

...

int initializeMesh( int nVertex, int nNormals, int nFaces, int positionsPerVertex )

Return value

0 = Error initializing mesh.

1 = Success.

Anchor
resizemesh
resizemesh

resizeMesh

This function reinitializes all the basic geometry and UV arrays. The number of UV channels and their ids remain the same, but UV´s are zeroed. Motion blur vertices can be wiped (if there were) setting newNpositionsPerVertex = 1, or added (if there weren´t) setting newNpositionsPerVertex = 2.

LanguageSyntax
C++byte isPosRotScaleInitialized( bool& init resizeMesh( dword newNVertex, dword newNNormals, dword newNFaces, dword newNpositionsPerVertex )
Pythonbool isPosRotScaleInitialized(int resizeMesh( int newNVertex, int newNNormals, int newNFaces, int newNpositionsPerVertex )

Return value

...

C++

0 = Error

...

1 = Success.

Python

...

resizing mesh.

1 = Success.

Anchor
cleangeometrygeneratecustomuvwcleangeometry
generatecustomuvw

cleanGeometry

...

generateCustomUVW

--TODO--.

LanguageSyntax
C++byte cleanGeometrygenerateCustomUVW( dword iChannel, dword iGeneratorType )
Pythonint cleanGeometrygenerateCustomUVW( int iChannel, int iGeneratorType )

Return value

0 = Error cleaning geometrygenerating custom UVW coordinates.

1 = Success.

Gets "hide" status of the object

Anchor
gethidegetuvwchannelpropertiesgethide

getHide

getuvwchannelproperties

getUVWChannelProperties

--TODO--.

bool getHide(
LanguageSyntax
C++byte getHide( bool& hide )PythongetUVWChannelProperties( dword iChannel, byte& projType, bool& customProj, Cbase& projectorBase, real& startLatitude, real& endLatitude, real& startLongitude, real& endLongitude, real& startAngle, real& endAngle, bool& mirrorBackFaces )
Python

(int projType, bool custumProj, Cbase projectorBase, float startLatitude, float endLatutide, float startLongitude, float endLongitude, float startAngle, float endAngle, bool mirrorBackFaces) getUVWChannelProperties( int iChannel )

Return value

C++

0 = Error getting "hide" statusUVW channel properties.

1 = Success.

Python

True = object is hidden.

False = object is not hidden.

...

setHide

Sets "hide" status of the object.

LanguageSyntax
C++byte setHide( bool hide )
Pythonint setHide( bool hide )

Return value

0 = Error setting "hide" state.

...

Tuple containing the UVW channel properties.

Anchor
gethidetocameragetglobalxformgethidetocamera
getglobalxform

getHideToCamera

...

getGlobalXform

--TODO--.

LanguageSyntax
C++byte getHideToCameragetGlobalXform( bool Cbase& hide xForm )
Pythonbool getHideCbase getGlobalXform()

Return value

C++

0 = Error getting "hide to camera" status. --TODO--

1 = Success.

Python

True = object is hidden to camera.False = object is not hidden to camera.Cbase containing --TODO--

Anchor
sethidetocameragetglobalnormalsxformsethidetocamera
getglobalnormalsxform

setHideToCamera

...

getGlobalNormalsXform

--TODO--.

LanguageSyntax
C++byte setHideToCamera( bool hide getGlobalNormalsXform( Cbase& xForm )
Pythonint setHideToCameraCbase getGlobalNormalsXform( bool hide )

Return value

C++

0 = Error

...

getting  --TODO--

1 = Success.

Python

Cbase containing --TODO--

Anchor
gethidetoreflectionsrefractionsgetinverseglobalxformgethidetoreflectionsrefractions
getinverseglobalxform

getHideToReflectionsRefractions

...

getInverseGlobalXform

--TODO--.

LanguageSyntax
C++byte getHideToReflectionsRefractionsgetInverseGlobalXform( bool Cbase& hide ixForm )
Pythonbool getHideToReflectionsRefractionsCbase getInverseGlobalXform()

Return value

C++

0 = Error getting "hide to reflections and refractions" status. --TODO--

1 = Success.

Python

True = object is hidden to reflections and refractions.False = object is not hidden to reflections and refractions.Cbase containing --TODO--

Anchor
sethidetoreflectionsrefractionsgetinverseglobalnormalxformsethidetoreflectionsrefractions
getinverseglobalnormalxform

setHideToReflectionsRefractions

...

getInverseGlobalNormalXform

--TODO--.

LanguageSyntax
C++byte setHideToReflectionsRefractions( bool hide getInverseGlobalNormalXform( Cbase& ixForm )
Pythonint setHideToReflectionsRefractionsCbase getInverseGlobalNormalXform( bool hide )

Return value

C++

0 = Error

...

getting  --TODO--

1 = Success.

Python

Cbase containing --TODO--

Anchor
gethidetogiisgeometryloadergethidetogi
isgeometryloader

getHideToReflectionsRefractions

...

isGeometryLoader

Checks if the object was created by a geometry loader extension.

LanguageSyntax
C++byte getHideToGIisGeometryLoader( bool& hide isGeomExtension )
Pythonbool getHideToGI isGeometryLoader()

Return value

C++

0 = Error getting "hide to global illumination" statuschecking object was created from a geometry loader extension.

1 = Success.

Python

True = object is hidden to global illumination.False = object is not hidden to global illuminationthe object was created by a geometry loader extension.

Anchor
sethidetogiisgeometryproceduralsethidetogi
isgeometryprocedural

setHideToGI

...

isGeometryProcedural

Checks if the object was created by a procedural geometry extension.

LanguageSyntax
C++byte setHideToGIisGeometryProcedural( bool hide & isGeomProceduralExtension )
Pythonint setHideToGIbool isGeometryProcedural( bool hide )

Return value

C++

0 = Error

...

checking object was created from a procedural geometry extension.

1 = Success.

Python

True = the object was created by a procedural geometry extension.

Anchor
isexcludedofcutplaneshasgeometrymodifiersisexcludedofcutplanes
hasgeometrymodifiers

isExcludedOfCutPlanes

...

hasGeometryModifiers

Checks if the object has geometry modifiers (extensions).

LanguageSyntax
C++byte isExcludedOfCutPlaneshasGeometryModifiers( bool& excluded isGeomModifiersExtension )
Pythonbool isExcludedOfCutPlaneshasGeometryModifiers()

Return value

C++

0 = Error getting "excluded of cut planes" statuschecking object have geometry modifiers (extensions).

1 = Success.

Python

True = object is excluded to cut planes.False = object is not excluded of cut planes= the object have geometry modifiers (extensions).

Anchor
cleanallgeometrymodifierextensions
cleanallgeometrymodifierextensions

cleanAllGeometryModifierExtensions

Clean all geometry modifier extensions applyed to the object.

LanguageSyntax
C++byte cleanAllGeometryModifierExtensions()
Pythonint cleanAllGeometryModifierExtensions()

Return value

0 = Error cleaning geometry modifier extensions.

1 = Success.

Anchor
excludeofcutplanesgetgeometrymodifierextensionsnumberexcludeofcutplanes
getgeometrymodifierextensionsnumber

excludeOfCutPlanes

...

getGeometryModifierExtensionsNumber

Gets the number of geometry modifier extensions applied to the object.

LanguageSyntax
C++byte excludeOfCutPlanes( bool exclude getGeometryModifierExtensionsNumber( dword& numModifierExtensions )
Pythonint excludeOfCutPlanesgetGeometryModifierExtensionsNumber( bool exclude )

Return value

C++

0 = Error

...

getting the number of geometry modifier extensions applied to the object.

1 = Success.

Python

Number of geometry modifier extensions applied to the object.