Works fine in bpy.types.Scene, does not work for bpy.types.SpaceView3D… is this intended behavior, or should I log it as a bug?
I believe only types subclassed from bpy.types.ID
(see bpy.types.ID.__subclasses__()
) actually support custom properties. One exception I know of is bpy.types.AddonPreferences
.
man i am striking out here… I just keep running in to dead end solutions.
scene.ray_cast hits invisible objects since there’s no way to filter out objects that are not part of a local view. ok, fine- I’ll just hide objects that are not in the local view before raycasting and then restore them after I’m done. Nope, object.get_local_view() is bugged and always returns False no matter what.
Ok whatever, that bug will get fixed eventually… in the meantime I’ll just write a custom localview ‘wrapper’ operator that tosses object names into a CollectionProperty per space- then I’ll recall those objects when I need to raycast and can hide them properly.
Nope, can’t add a custom property to a SpaceView3D.
I guess I can just store it in Scene, but my original purpose will fail if the user has more than one 3D viewport.
Try using ob.evaluated_get(deg).local_view_get(st)
.
amazing… that worked. thanks!