rajib wrote:face_off wrote:I can confirm that getPreviewControl()->getBoolValue() is returning TRUE for cube_GroupInstance. You should be able to confirm this yourself with your script (delete everything else from the scene). This would appear to be a bug in DAZStudio, although perhaps there is some other override which we are missing.
The documentation for getPreviewControl() states:
- Code: Select all
The property controlling whether or not the node is drawn in the viewport.
Paul
Hi Paul,
You are right. I completely missed that. I was so busy looking at the UltraScatter created nodes that I forgot to check the getPreviewControl on the manually created instance group node. Like you said it is returning true. I will explore further. I think there might be some other setting that is telling IRAY to ignore the proxy nodes and render only the required nodes. Will explore and update if I find anything.
Regards,
Rajib
Hi Paul,
I think I have figured it out. For each of the DzInstanceGroupNode call getTarget(). That will return the target node for the instance. On that target node object call isVisibileInRender (). If that returns false, don't use it for creating the instances.
I verified the UltraScattered cube Proxies has the target set as UltraScattered cube proxy which has the Visible In Render set to false. For the cube instances the target is the cube and its Visible In Render is set to true.
So I think you need to check the target of the instance group and check its visibility in the render (IsVisibleInRender()). If the target is not visible in the render, don't create the scatter nodes and if it is visible in the render create the scatter nodes.
//Sample script
var TargetNode = CurrentDazInstanceGroupNode.getTarget();
var IsTargetVisibleInRender = false;
if(TargetNode) //Check for TargetNode being NULL
IsTargetVisibleInRender=TargetNode.isVisibileInRender();
if(IsTargetVisibleInRender == true)
CreateOctaneScatterInstances(CurrentDazInstanceGroupNode);
Hope this helps.
Regards,
Rajib