<commit_before>##
#	\namespace	blur3d.api.studiomax.studiomaxsceneobject
#
#	\remarks	The StudiomaxSceneObject class provides the implementation of the AbstractSceneObject class as it applies
#				to 3d Studio Max scenes
#	
#	\author		<EMAIL>
#	\author		Blur Studio
#	\date		03/15/10
#

from Py3dsMax import mxs
from blur3d.api.abstract.abstractsceneobject import AbstractSceneObject

class StudiomaxSceneObject( AbstractSceneObject ):
	AppDataAltMtlIndex		= 1108
	AppDataAltPropIndex 	= 1110
	
	#------------------------------------------------------------------------------------------------------------------------
	# 												protected methods
	#------------------------------------------------------------------------------------------------------------------------
	
	def _findNativeChild( self, name, recursive = False, parent = None ):
		"""
			\remarks	implements the AbstractSceneObject._findNativeChild method to find 
						the child by the name and returns it
			\sa			findChild
			\param		name		<str>
			\param		recursive	<bool>
			\param		parent		<Py3dsMax.mxs.Object> nativeObject	(used for recursive searches when necessary)
			\return		<Py3dsMax.mxs.Object> nativeObject || None
		"""
		if ( not parent ):
			parent = self._nativePointer
		
		# loop through all the objects
		for child in parent.children:
			if ( child.name == name ):
				return child
			
			# if recursive, lookup child nodes
			if ( recursive ):
				found = self._findNativeChild( name, recursive = True, parent = child )
				if ( found ):<commit_msg>Added classOf function to return class information as a string we'll use object type in XSI<commit_after>##
#	\namespace	blur3d.api.studiomax.studiomaxsceneobject
#
#	\remarks	The StudiomaxSceneObject class provides the implementation of the AbstractSceneObject class as it applies
#				to 3d Studio Max scenes
#	
#	\author		<EMAIL>
#	\author		<NAME>
#	\date		03/15/10
#

from Py3dsMax import mxs
from blur3d.api.abstract.abstractsceneobject import AbstractSceneObject

class StudiomaxSceneObject( AbstractSceneObject ):
	AppDataAltMtlIndex		= 1108
	AppDataAltPropIndex 	= 1110
	
	#------------------------------------------------------------------------------------------------------------------------
	# 												protected methods
	#------------------------------------------------------------------------------------------------------------------------
	def classOf(self):
		"""
			\remarks	implements the AbstractSceneObject._findNativeChild method as a convinance function to return class 
			information as  string
						
			
			\param		parent		<Py3dsMax.mxs.Object> nativeObject	(used for recursive searches when necessary)
			\return		<Py3dsMax.mxs.Object> nativeObject || None
		"""
		classof 	= mxs.classof
		classN = str(classof (self._nativePointer))
		
		return classN
	def _findNativeChild( self, name, recursive = False, parent = None ):
		"""
			\remarks	implements the AbstractSceneObject._findNativeChild method to find 
						the child by the name and returns it
			\sa			findChild
			\param		name		<str>
			\param		recursive	<bool>
			\param		parent		<Py3dsMax.mxs.Object> nativeObject	(used for recursive searches when necessary)
			\return		<Py3dsMax.mxs.Object> nativeObject || None
		"""
		if ( not parent ):
			parent = self._nativePointer
		
		# loop through all the objects
		for child in parent.children:
			if ( child.name == name ):
				return child
			
			# if recursive, lookup child nodes
			if ( recursive ):
				found = self._findNativeChild( name, recursive = True, parent = child )
				if ( found ):
{'fraction_non_alphanumeric': 0.20217816252443452, 'fraction_numerical': 0.011728567439262776, 'mean_word_length': 2.0278951817413358, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '811305', 'n_tokens_mistral': 1166, 'n_tokens_neox': 982, 'n_words': 304}