blenderproc.python.modules.object.HideModule module

class blenderproc.python.modules.object.HideModule.HideModule(config)[source]

Bases: blenderproc.python.modules.main.Module.Module

Will hide the selected objects from the scene and render frames with and without the objects. Be aware that this doubles the amount of used camera poses.

If number_of_frames is lower than the amount of used camera poses the results might not be as expected.

Example 1, here the object name “wall” will be shown in the first two frames and then hidden in the third and fourth frame. In this example there were only two camera poses before this module was called.

{
  "module": "object.HideModule",
  "config": {
    "selector": {  # this will select the object, which gets removed for the same set of frames.
      "provider": "getter.Entity",
      "conditions": {
        "name": "wall"
      }
    },
    "number_of_frames": 2, # this specifies first n frames to be duplicated, this is optional
  }
}

Configuration:

Parameter Description Type
selector Objects which will be hidden for a certain set of frames Provider
number_of_frames The amount of frames this scene has, by default this is bpy.context.scene.frame_end, which is automatically set by the CameraInterface classes. Default: bpy.context.scene.frame_end int
run()[source]

Hides objects for the set number of frames.