去除SceneKit发射材料?

时间:2018-08-12 19:56:50

标签: scenekit

为了突出显示场景中的热门项目,我正在执行以下操作:

declare @tbl table(fn varchar(255), depth int,[isfile] int,primary key(fn))
declare @dir varchar(50)='C:\temp\' --'starting dir
insert @tbl
EXEC Master.dbo.xp_DirTree @dir,1,1 --dir, depth (1 - current only), file (0 - dirs only, 1+ - dirs and files)

delete @tbl where [isfile]=0 or fn not like '%.txt' --keep .txt files only
--select * from @tbl
--will insert into this table
create table #fileTbl (id int identity(1,1) primary key,fn varchar(255),txt varchar(max))
declare @fn varchar(255), @query nvarchar(4000)
select top 1 @fn=fn from @tbl
while @@ROWCOUNT>0--number of rows from the last query executed
begin
--dynamic query required to build OPENROWSET
set @query='insert #fileTbl(fn,txt) select '''+@dir+@fn+''',BulkColumn from openrowset(bulk ''c:\temp\'+@fn+''',single_blob) t'
exec sp_executesql @query
delete @tbl where fn=@fn
select top 1 @fn=fn from @tbl --proceed
end
select * from #fileTbl

不幸的是,物体变成白色,但从不恢复原始颜色。我不能删除这样的排放物吗?我该怎么办?

1 个答案:

答案 0 :(得分:0)

SceneKit中的黑色,即(0.0, 0.0, 0.0),通常是“无”的默认值(这是照明方程式中0的贡献)

geom.firstMaterial?.emission.contents = NSColor.black