value = True # Change the text with the name of the camera being displayed caption. active_material = material # Make the screen visible when starting the scene screen. debug ( "Setting material %s for the Screen" % material ) screen. name ) return # Find the material with name "ScreenMat" for mat in camera. warning ( "BUILDER WARNING: Argument to 'select_display_camera' is not a camera ( %s ). name : camera = child break if not camera : logger. _bpy_object # Find the mesh object with a texture called 'ScreenMat' for child in blender_component. get_object ( 'CameraID_text' ) blender_component = self. get_object ( 'Screen' ) caption = bpymorse. _display_camera = robot_camera def _set_scren_mat ( self ): """ Set the material of the Screen object to the same as the one indicated in the _display_camera variable """ camera = None screen = bpymorse. def select_display_camera ( self, robot_camera ): """ Select the camera that will be displayed on the HUD Screen object :param robot_camera: AbstractComponent reference to the camera desired to be displayed """ self. multinode_distribution = distribution self. _server_port = server_port if distribution != None : self. physics_type = 'STATIC' """ Write the 'multinode_config.py' script """ node_config = ) """ self.
![screenmat 1.0 screenmat 1.0](https://3.bp.blogspot.com/-FAoJOodG1zY/Wszp23MIPxI/AAAAAAAAGkI/ZPKUttAUKGM03iJ83tU5ZHF4B7yqkQGWACEwYBhgL/s1600/29872372_1538684526257316_1149581216407773872_o.jpg)
name = 'External_Robot_Tag' # Make external robots static # This should stop them from drifting downwards obj. name ) # Here, we make external other robots if 'Robot_Tag' in p : if not obj. " Will not be published by this MORSE node." ) else : logger. multinode_distribution : if not 'Robot_Tag' in p : logger. properties # Here we check that all objects declared for this node are robots if obj. multinode_distribution = for obj in bpymorse. warning ( "Node " + node_name + " is not defined in the " + \ _multinode_configured : return if not node_name in self. get_object ( 'Scene_Script_Holder' )) # Write the name of the 'environment file' def _write_multinode ( self, node_name ): """ Configure this node according to its name and the multinode_distribution dictionnary. get_objects (): # Add the necessary objects base = Component ( 'props', 'basics' ) self. is_material_mode_custom = False # define 'Scene_Script_Holder' as the blender object of Enrivonment if not 'Scene_Script_Holder' in bpymorse.
![screenmat 1.0 screenmat 1.0](https://i.ytimg.com/vi/_QY2IM0x01g/maxresdefault.jpg)
remove ( self ) # remove myself from the list of components to ensure my destructor is called # Rename the components according to their variable names self.
![screenmat 1.0 screenmat 1.0](https://i.ytimg.com/vi/ExhZDdihZek/maxresdefault.jpg)
_init_ ( self, 'environments', filename ) AbstractComponent. Useful for unit-tests for instance, or in simulations where realistic environment texturing is not required (*e.g.*, no video camera) """ Component. """ multinode_distribution = dict () def _init_ ( self, filename, fastmode = False ): """ :param fastmode: (default: False) if True, disable most visual effects (like lights.) to get the fastest running simulation. Class Environment ( Component ): """ Class to configure the general environment of the simulation It handles the background environment in which your robots are simulated, general properties of the simulation, the default location and orientation of the camera, the Blender Game Engine settings, configure the parameters for the multi-node simulation and also writes the 'component_config.py' file.