fix: Review
This commit is contained in:
@ -27,7 +27,6 @@ import blf
|
|||||||
import bpy
|
import bpy
|
||||||
import gpu
|
import gpu
|
||||||
import mathutils
|
import mathutils
|
||||||
# from mathutils import Vector
|
|
||||||
from bpy_extras import view3d_utils
|
from bpy_extras import view3d_utils
|
||||||
from gpu_extras.batch import batch_for_shader
|
from gpu_extras.batch import batch_for_shader
|
||||||
from replication.constants import (STATE_ACTIVE, STATE_AUTH, STATE_CONFIG,
|
from replication.constants import (STATE_ACTIVE, STATE_AUTH, STATE_CONFIG,
|
||||||
@ -447,13 +446,12 @@ class UserModeWidget(Widget):
|
|||||||
area, region, rv3d = view3d_find()
|
area, region, rv3d = view3d_find()
|
||||||
viewport_coord = project_to_viewport(region, rv3d, (0, 0))
|
viewport_coord = project_to_viewport(region, rv3d, (0, 0))
|
||||||
|
|
||||||
for select_obj in user_selection:
|
obj = find_from_attr("uuid", user_selection[0], bpy.data.objects)
|
||||||
obj = find_from_attr("uuid", select_obj, bpy.data.objects)
|
if not obj:
|
||||||
if not obj:
|
return
|
||||||
return
|
mode_current = self.data.get('mode_current')
|
||||||
mode_current = self.data.get('mode_current')
|
color = self.data.get('color')
|
||||||
color = self.data.get('color')
|
origin_coord = project_to_screen(obj.location)
|
||||||
origin_coord = project_to_screen(obj.location)
|
|
||||||
|
|
||||||
distance_viewport_object = math.sqrt((viewport_coord[0]-obj.location[0])**2+(viewport_coord[1]-obj.location[1])**2+(viewport_coord[2]-obj.location[2])**2)
|
distance_viewport_object = math.sqrt((viewport_coord[0]-obj.location[0])**2+(viewport_coord[1]-obj.location[1])**2+(viewport_coord[2]-obj.location[2])**2)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user