def __init__(self, config: Config):
        """
        This function is called by the Pipeline object, it initialized the object and reads all important config values

        :param config: The config object used for this module, specified by the .yaml file
        """
        Module.__init__(self, config)

        self.used_floor_area = self.config.get_float("floor_area")
        self.amount_of_extrusions = self.config.get_int(
            "amount_of_extrusions", 0)
        self.fac_from_square_room = self.config.get_float(
            "fac_base_from_square_room", 0.3)
        self.corridor_width = self.config.get_float("minimum_corridor_width",
                                                    0.9)
        self.wall_height = self.config.get_float("wall_height", 2.5)
        self.amount_of_floor_cuts = self.config.get_int(
            "amount_of_floor_cuts", 2)
        self.only_use_big_edges = self.config.get_bool("only_use_big_edges",
                                                       True)
        self.create_ceiling = self.config.get_bool("create_ceiling", True)
        self.assign_material_to_ceiling = self.config.get_bool(
            "assign_material_to_ceiling", False)
        self.tries_per_face = self.config.get_int("placement_tries_per_face",
                                                  3)
        self.amount_of_objects_per_sq_meter = self.config.get_float(
            "amount_of_objects_per_sq_meter", 3.0)
 def __init__(self, config: Config):
     Module.__init__(self, config)
     self.emission_strength = self.config.get_float("emission_strength",
                                                    10.0)
     self.keep_using_base_color = self.config.get_bool(
         "keep_using_base_color", False)
     self.emission_color = self.config.get_vector4d("emission_color", None)
 def __init__(self, config):
     Module.__init__(self, config)
     # Raise an exception if the deprecated source_frame parameter is used
     if self.config.has_param("source_frame"):
         raise Exception(
             "The parameter `source_frame` parameter is not available anymore. Use `local_frame_change` instead, if you are setting camera poses via `cam2world_matrix`, or use `world_frame_change` instead, if you are setting camera poses via `location` and `rotation`."
         )
     self.local_frame_change = self.config.get_list("local_frame_change",
                                                    ["X", "Y", "Z"])
     self.world_frame_change = self.config.get_list("world_frame_change",
                                                    ["X", "Y", "Z"])
    def __init__(self, config):
        Module.__init__(self, config)

        # Clean up example scene or scene created by last run when debugging pipeline inside blender
        cleanup()

        # setting up the GlobalStorage
        global_config = Config(self.config.get_raw_dict("global", {}))
        GlobalStorage.init_global(global_config)

        # call the init again to make sure all values from the global config where read correctly, too
        self._default_init()
Пример #5
0
    def __init__(self, config):
        Module.__init__(self, config)

        object_pose_sampler_config = config.get_raw_dict(
            "object_pose_sampler", {})
        camera_pose_sampler_config = config.get_raw_dict(
            "camera_pose_sampler", {})

        self._object_pose_sampler = Utility.initialize_modules(
            [object_pose_sampler_config])[0]
        self._camera_pose_sampler = Utility.initialize_modules(
            [camera_pose_sampler_config])[0]
Пример #6
0
 def __init__(self, config):
     Module.__init__(self, config)
     self.postprocessing_modules_per_output = {}
     module_configs = config.get_raw_dict("postprocessing_modules", {})
     for output_key in module_configs:
         self.postprocessing_modules_per_output[
             output_key] = Utility.initialize_modules(
                 module_configs[output_key])
     self.name_to_id = {}
     self.destination_frame = self.config.get_list("destination_frame",
                                                   ["X", "Y", "Z"])
     self.write_alpha_channel = self.config.get_bool(
         "write_alpha_channel", False)
Пример #7
0
 def __init__(self, config):
     Module.__init__(self, config)
     self.collision_margin = self.config.get_float("collision_margin",
                                                   0.001)
     self.collision_mesh_source = self.config.get_string(
         'collision_mesh_source', 'FINAL')
     if config.has_param("steps_per_sec"):
         raise Exception(
             "You are using the outdated parameter steps_per_sec. Please update your config by switching to substeps_per_frame (was changed in blender 2.91)."
         )
     self.mass_scaling = self.config.get_bool("mass_scaling", False)
     self.mass_factor = self.config.get_float("mass_factor", 1)
     self.collision_shape = self.config.get_string("collision_shape",
                                                   "CONVEX_HULL")
     self.friction = self.config.get_float("friction", 0.5)
     self.angular_damping = self.config.get_float("angular_damping", 0.1)
     self.linear_damping = self.config.get_float("linear_damping", 0.04)
     self.convex_decomposition_cache_path = self.config.get_string(
         "convex_decomposition_cache_path",
         "blenderproc_resources/decomposition_cache")
     self.vhacd_path = self.config.get_string(
         "vhacd_path", "blenderproc_resources/vhacd")
Пример #8
0
 def __init__(self, config):
     Module.__init__(self, config)
 def __init__(self, config):
     Module.__init__(self, config)
     self.cross_source_settings = self.config.get_raw_dict(
         "cross_source_settings", {})
     self.light_source_collection = ItemCollection(
         self._add_light_source, self.cross_source_settings)
 def __init__(self, config: Config):
     Module.__init__(self, config)
     addon_utils.enable("render_auto_tile_size")