Hello,
I tried to create a pattern projector by building a rectangular light (which works fine, and the texture.png is loaded), but when I want to set the “.isProjector” Boolean to “True” nothing happens, I don’t get an error message either. Is there a possibility to either set the value to True while creating or another way. Or can you check my function to see if I did something wrong?
def pattern_projector(self,pattern):
#pattern in "name.png" format
prim_path = "/Replicator/Projector_Xform/Projector"
pos_off_proj = np.asarray([0.0115,0,0])
rep.create.light(
light_type = "Rect",
temperature = 6500,
intensity = 2,
position = self.pos_center[0]+pos_off_proj,
rotation = self.pos_center[1][1:],
scale = 1,
texture = self.base_path + "Pattern_Projector/" + pattern,
name = "Projector",
)
omni.kit.commands.execute("ChangeProperty",
prop_path=Sdf.Path(prim_path + ".isProjector"),
value=True,
prev=False)
Also another question: Is it possible to set the prim path in the creation process? I want to change it to another path.