-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #191 #218
base: main
Are you sure you want to change the base?
Fixes #191 #218
Conversation
@@ -737,3 +747,6 @@ def register_object3d_setters(obj, blender_obj): | |||
|
|||
obj.observe(AttributeSetter(blender_obj, "rotation_quaternion"), "quaternion") | |||
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") |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
No description provided.