Exemple #1
0
    def draw(self, context):
        layout = self.layout

        scene = context.scene
        world = context.world
        space = context.space_data

        if scene:
            layout.template_ID(scene, "world", new="world.new")
        elif world:
            layout.template_ID(space, "pin_id")

        if context.world:
            VRayWorld = context.world.vray

            layout.separator()
            layout.prop(VRayWorld, 'global_light_level', slider=True)

            classes.NtreeWidget(layout, VRayWorld, "World Tree", "vray.add_nodetree_world", 'WORLD')

            if not classes.TreeHasNodes(VRayWorld.ntree):
                return

            activeNode = VRayWorld.ntree.nodes[-1]

            layout.separator()
            classes.DrawNodePanel(context, self.layout, activeNode, PLUGINS)
    def draw(self, context):
        layout = self.layout

        ob = context.object
        lamp = context.lamp
        space = context.space_data

        if ob:
            layout.template_ID(ob, 'data')
        elif lamp:
            layout.template_ID(space, 'pin_id')

        VRayLight = lamp.vray

        layout.separator()
        layout.prop(lamp, 'type', expand=True)

        lightSubTypeAttr = LibUtils.LampSubType[lamp.type]
        if lightSubTypeAttr is not None:
            layout.prop(VRayLight, lightSubTypeAttr, expand=True)

        lightPluginName = LibUtils.GetLightPluginName(lamp)
        lightPropGroup = getattr(VRayLight, lightPluginName)

        layout.separator()
        classes.NtreeWidget(layout, VRayLight, "Lamp Tree",
                            "vray.add_nodetree_light", 'LAMP')

        layout.separator()
        classes.DrawPluginUI(context, layout, VRayLight, lightPropGroup,
                             lightPluginName,
                             PLUGINS['LIGHT'][lightPluginName])

        layout.separator()

        if lamp.type == 'AREA':
            layout.prop(VRayLight.LightRectangle, 'is_disc')
            if VRayLight.LightRectangle.is_disc:
                split = layout.split()
                col = split.column()
                col.prop(lamp, 'size')
            else:
                layout.prop(lamp, 'shape', expand=True)
                split = layout.split()
                if lamp.shape == 'SQUARE':
                    col = split.column()
                    col.prop(lamp, 'size')
                else:
                    row = split.row(align=True)
                    row.prop(lamp, 'size', text="X")
                    row.prop(lamp, 'size_y', text="Y")

        elif lamp.type == 'SPOT':
            split = layout.split()
            col = split.column()
            col.prop(lamp, "show_cone")
            if VRayLight.spot_type == 'SPOT':
                col.prop(lamp, 'spot_size', text="Size")
                col.prop(lamp, 'spot_blend', text="Blend")
Exemple #3
0
    def draw(self, context):
        layout = self.layout

        scene = context.scene
        VRayScene = scene.vray

        layout.prop(scene, "camera")
        layout.prop(scene, "background_set", text="Background")
        layout.prop(scene, "active_clip", text="Active Clip")

        classes.NtreeWidget(layout, VRayScene, "Channels Tree",
                            "vray.add_nodetree_scene", 'SCENE')
Exemple #4
0
def RenderMaterialPanel(mat, context, layout):
    if not mat:
        return

    VRayMaterial = mat.vray

    layout.separator()
    layout.prop(mat, "diffuse_color", text="Viewport Color")

    layout.separator()

    classes.NtreeWidget(layout, VRayMaterial, "Shading Tree",
                        "vray.add_nodetree_material", 'MATERIAL')

    if not classes.TreeHasNodes(VRayMaterial.ntree):
        return

    activeNode = VRayMaterial.ntree.nodes[-1]

    layout.separator()
    classes.DrawNodePanel(context, layout, activeNode, PLUGINS)
	def draw(self, context):
		VRayObject = context.object.vray

		classes.NtreeWidget(self.layout, VRayObject, "Object Tree", "vray.add_nodetree_object", 'OBJECT')