Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

C++Python
Cmaxwell::CobjectCmaxwellObject

Describes a scene object.

Inherits from

Cpointer.

Sub-classes

Citerator

Methods

NameDescription
setPointerInternal use.
Cobject#freeDestroys 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 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.
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
getNumVertexes 
getNumTriangles 
getNumNormals 
getNumPositionsPerVertex 
getNumChannelsUVW 
addChannelUVW 
generateSphericalUVW 
generateCylindricalUVW 
generateCubicUVW 
generatePlanarUVW 
getVertex 
setVertex 
getNormal 
setNormal 
getTriangle 
setTriangle 
getTriangleGroup 
setTriangleGroup 
getTriangleUVW 
setTriangleUVW 
getTriangleMaterial 
setTriangleMaterial 
getGroupMaterial 
setGroupMaterial 
getBaseAndPivot 
setBaseAndPivot 
getWorldTransform 
getTransformSubstepsCount 
getTransfrormStepInfoByIndex 
getPosition 
setPosition 
getRotation 
setRotation 
getScale 
setScale 
getShear 
setShear 
getPivotPosition 
setPivotPosition 
getPivotRotation 
setPivotRotation 
isPosRotScaleInitialized 
cleanGeometry 
Display
getHide 
setHide 
getHideToCamera 
setHideToCamera 
getHideToReflectionsRefractions 
setHideToReflectionsRefractions 
getHideToGI 
setHideToGI 
isExcludedOfCutPlanes 
excludeOfCutPlanes 
getProxyDisplayPoints 
setColorID 
getColorID 
setGeometryDirty 
getUserData 
setUserData 
getVertexesBuffer 
getNormalsBuffer 
getTrianglesBuffer 
initializeMesh 
resizeMesh 
generateCustomUVW 
getUVWChannelProperties 
getGlobalXform 
getGlobalNormalsXform 
getInverseGlobalXform 
getInverseGlobalNormalsXform 
isGeometryLoader 
isGeometryProcedural 
hasGeometryModifiers 
applyGeometryModifierExtension 
cleanAllGeometryModifierExtensions 
getGeometryLoaderExtensionParams 
getGeometryProceturalExtensionParams 
getGeometryModifierExtensionNumber 
getGeometryModifierExtensionParamsAtIndex 

free

Destroys the object.

LanguageSyntax
C++byte free()
Pythonint free()

Return value

0 = Error destroying object.

1 = Success.

getName

Gets the name of the object.

LanguageSyntax
C++byte getName( char** pName)
Pythonstr getName()

Return value

C++

0 = Error getting name.

1 = Success.

Python

Object name.

setName

Sets the name of the object.

LanguageSyntax
C++byte setName( const char* pName )
Pythonint setName( str pName )

Return value

0 = Error setting name.

1 = Success.

isMesh

Checks whether the object is a mesh.

LanguageSyntax
C++byte isMesh( byte& isMesh )
Pythonint isMesh()

Return value

C++

0 = Error getting isMesh value.

1 = Success.

Python

0 = The object is not a mesh.

1 = The object is a mesh.

"" = Error.

isInstance

Checks whether the object is an instance.

LanguageSyntax
C++byte isInstance( byte& isInstance )
Pythonint isInstance()

Return value

C++

0 = Error getting isInstance value.

1 = Success.

Python

0 = The object is not an instance.

1 = The object is an instance.

"" = Error.

getInstanced

If this Cobject is an instance this method returns its parent 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).

isRFRK

Checks whether the object is a RealFlow RenderKit object.

LanguageSyntax
C++byte isRFRK( byte& isRfrk )
Pythonint isRFRK()

Return value

C++

0 = Error getting isRfrk value.

1 = Success.

Python

0 = Object is not a RFRK object.

1 = Object is a RFRK object.

"" = Error.

getRFRKParameters

Gets RealFlow parameters of the object if it is a RFRK object.

LanguageSyntax
C++

byte getRFRKParameters( char*& binSeqNames, char*& rwName, char*& substractiveField, real& scale, real& resolution, real& polySize, real& radius, real& smooth, real& core, real& splash, real& maxVelocity, int& axis, real& fps, int& frame, int& offset, bool& flipNormals, int& rwTesselation, bool& mb, real& mbCoef )

Python

{ str 'binSeqNames', str 'rwName', str 'substractiveField', float 'scale', float 'resolution', float 'polySize', float 'radius', float 'smooth', float 'core', float 'splash', float 'maxVelocity', int 'axis', float 'fps', int 'frame', int 'offset', bool 'flipNormals', int 'rwTesselation', bool 'mb', float 'mbCoef' } getRFRKParameters()

Parameters

TypeNameIn/OutDescription
char*binSeqNamesoutComma separated list of full paths to .bin or .pd files.
char*rwNameoutFull path to a  realwave .sd file.
char*substractiveFieldout'' or Null -> all particle fields are positive. i.e: substractiveField = '011010' -> six particle files, first, third and sixth are negative, and second, third and fifth are positive.
realscaleoutDefault value = 1.0.
realresolutionoutDefault value = 1.0.
realpolySizeoutDefault value = 0.0.
realradiusoutDefault value = 0.33.
realsmoothoutDefault value = 0.3.
realcoreoutDefault value = 0.0.
realsplashoutDefault value = 0.0.
realmaxVelocityoutDefault value = 1000.0.
intaxisout0 = YXZ, 1 = ZXY, 2 = YZX.
realfpsoutDefault value = 25.0.
intframeout 
intoffsetoutDefault value = 0.
boolflipNormalsoutDefault value = false.
intrwTesselationoutDefault value = 3.
boolmboutMotion blur (true) or not (false).
realmbCoefout0.0 to 1.0. Motion blur duration in % of shutter angle.

Return value

C++

0 = Error getting RFRK parameters.

1 = Success.

Python

Dictionary containing all RFRK parameters.

"" = Error.

setRFRKParameters

Gets RealFlow parameters of the object if it is a RFRK object.

LanguageSyntax
C++

byte setRFRKParameters( const char* binSeqNames, const char* rwName, char* substractiveField, real scale, real resolution, real polySize, real radius, real smooth, real core, real splash, real maxVelocity, int axis, real fps, int frame, int offset, bool flipNormals, int rwTesselation, bool mb, real mbCoef )

Python

int setRFRKParameters( str binSeqNames, str rwName, str substractiveField, float scale, float resolution, float polySize, float radius, float smooth, float core, float splash, float maxVelocity, int axis, float fps, int frame, int offset, bool flipNormals, int rwTesselation, bool mb, float mbCoef )

Parameters

TypeNameIn/OutDescription
char*binSeqNamesinComma separated list of full paths to .bin or .pd files.
char*rwNameinFull path to a  realwave .sd file.
char*substractiveFieldin'' or Null -> all particle fields are positive. i.e: substractiveField = '011010' -> six particle files, first, third and sixth are negative, and second, third and fifth are positive.
realscaleinDefault value = 1.0.
realresolutioninDefault value = 1.0.
realpolySizeinDefault value = 0.0.
realradiusinDefault value = 0.33.
realsmoothinDefault value = 0.3.
realcoreinDefault value = 0.0.
realsplashinDefault value = 0.0.
realmaxVelocityinDefault value = 1000.0.
intaxisin0 = YXZ, 1 = ZXY, 2 = YZX.
realfpsinDefault value = 25.0.
intframein 
intoffsetinDefault value = 0.
boolflipNormalsinDefault value = false.
intrwTesselationinDefault value = 3.
boolmbinMotion blur (true) or not (false).
realmbCoefin0.0 to 1.0. Motion blur duration in % of shutter angle.

Return value

0 = Error setting RFRK parameters.

1 = Success.

getReferencedScenePath

Gets the scene file referenced by this object.

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

setReferencedScenePach

Sets the scene file referenced by this object.

LanguageSyntax
C++byte setReferencedScenePath( const char* proxyPath )
Pythonint setReferencedScenePath( const char* proxyPath )

Return value

0 = Error setting reference scene file.

1 = Success.

getReferencedSceneMaterial

Gets the material of an specific object inside the referenced scene.

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

setReferencedSceneMaterial

Sets the material of an specific object inside the referenced scene.

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

Return value

0 = Error setting reference scene file.

1 = Success.

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 Cobject* pMeshes, dword nMeshes )
Pythonint mergeMeshes( CmaxwellObject[] meshes )

Return value

0 = Error setting reference scene file.

1 = Success.

Examples

Python
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

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.

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.

getUuid

Unique user ID that can be used for custom purposes.

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

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.

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.

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

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.

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 object 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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • No labels