PathSpatialGizmoPlugin::PathSpatialGizmoPlugin() { Color path_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.8)); Ref<SpatialMaterial> path_material = Ref<SpatialMaterial>(memnew(SpatialMaterial)); path_color.a = 0.8; path_material->set_albedo(path_color); path_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); path_material->set_line_width(3); path_material->set_cull_mode(SpatialMaterial::CULL_DISABLED); path_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true); Ref<SpatialMaterial> path_thin_material = Ref<SpatialMaterial>(memnew(SpatialMaterial)); path_color.a = 0.4; path_thin_material->set_albedo(path_color); path_thin_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); path_thin_material->set_line_width(1); path_thin_material->set_cull_mode(SpatialMaterial::CULL_DISABLED); path_thin_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true); add_material("path_material", path_material); add_material("path_thin_material", path_thin_material); create_handle_material("handles"); }
CSGShapeSpatialGizmoPlugin::CSGShapeSpatialGizmoPlugin() { Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/csg", Color(0.2, 0.5, 1, 0.1)); create_material("shape_material", gizmo_color); create_handle_material("handles"); }