Yes, that's also a good idea. But I would make this optional since it is quite uncommon that objects are automatically placed at the camera. Therefore I would suggest a button that places all selected light sources to the camera (if no light source is selected, all lights will be moved). Do you agree?Zoltan wrote: ↑Sun Jun 12, 2022 7:34 am I was thinking of something simpler:
- The camera setting would be left as it is, i.e. take the current view.
- As for the lights: when the user clicks on the icon of any of the three light source types, the light source would be positioned based on the current view.
I also don't know why the spotlight points to -y, it doesn't seem like a reasonable choice... But I figured out how to apply the 90° rotation in FreeCAD so this also wouldn't be a problem anymore.Zoltan wrote: ↑Sun Jun 12, 2022 7:34 am I don't know how you construct the spotlight and why it is pointing to another direction than the area light. Setting the direction of the spotlight should be no different from that of the area light. As you could see in my macro I attached previously, setting the placement (i.e. the position and the direction) of the lights is done with the code.Code: Select all
obj.Placement = Gui.ActiveDocument.ActiveView.viewPosition()