Skip to content

Conversation

@taiya
Copy link
Collaborator

@taiya taiya commented Apr 6, 2022

No description provided.

@taiya taiya requested a review from Qwlouse April 6, 2022 20:05
@taiya taiya linked an issue Apr 6, 2022 that may be closed by this pull request
obj.observe(KeyframeSetter(blender_obj, "rotation_quaternion"), "quaternion", type="keyframe")

# --- Maps Object3D.cast_shadows to bpy.context.object.cycles_visibility.shadow
obj.observe(VisibleShadowsSetter(blender_obj), "cast_shadows")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should work without the need for a dedicated VisibleShadowsSetter:

obj.observe(AttributeSetter(blender_obj.cycles_visibility, "shadow"), "cast_shadows")


up = tl.CaselessStrEnum(["X", "Y", "Z", "-X", "-Y", "-Z"], default_value="Y")
front = tl.CaselessStrEnum(["X", "Y", "Z", "-X", "-Y", "-Z"], default_value="-Z")
cast_shadows = tl.Bool(default_value=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think PhysicalObject would be a better place for this property, since all cameras and lights also inherit from Object3D, and I am reasonably sure that cast_shadow will either not work on those or not behave as expected.

@Qwlouse Qwlouse self-requested a review April 13, 2022 17:51
Copy link
Collaborator

@Qwlouse Qwlouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest moving the cast_shadow property to PhysicalObject and remove the VisibleShadowsSetter. See comments.
Other than that feel free to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

kb.DirectionalLight does not work with spherical world

2 participants