Page 1 of 1

Viewport colors for objects in Octane for Blender plugin?

PostPosted: Sun Aug 02, 2015 1:30 pm
by Nennig
Hi there,

Is it possible to add a color to the objects in the viewport ?
This would be so helpfull for crowded scenes.

Thank you
Best regards

Marc

Re: Viewport colors for objects in Octane for Blender plugin?

PostPosted: Sun Aug 02, 2015 5:51 pm
by grimm
That is a Blender question, which was discussed at length in this thread on the Blender Artists site:

http://blenderartists.org/forum/showthr ... -Wireframe

Re: Viewport colors for objects in Octane for Blender plugin?

PostPosted: Mon Aug 03, 2015 7:48 am
by aufwind
hi,

I added a view lines of code to the octane ui.py a while ago to get colered objects
in the Viewport. You can even have transparency in object mode.

The Viewport Color is independent from the Material Color.
The Color will be visible in Viewport Shading Mode Solid and Textured.

It's best to set the Type to solid as shown in the picture.


Viewport-Color.png


I wasn't able to upload the changed script.
You have to manually change the script in the folder: 2.75 / scripts / addons / octane / ui.py

Script.png


Place the lines beneath as shown in the picture and save the changed script.

Code: Select all
class OctaneMaterial_PT_settings(OctaneButtonsPanel, Panel):
    bl_label = "Viewport Material Color"
    bl_context = "material"
    bl_options = {'DEFAULT_CLOSED'}

    @classmethod
    def poll(cls, context):
        return context.material and OctaneButtonsPanel.poll(context)

    def draw(self, context):
        layout = self.layout

        mat = context.material
        obj = context.object
        obj_type = obj.type

        split = layout.split()       
        col = split.column()
        col.prop(obj, "draw_type", text="Type")
        if obj_type == 'MESH' or (obj_type == 'EMPTY' and obj.empty_draw_type == 'IMAGE'):
            col.prop(obj, "show_transparent", text="Transparency")

        col = split.column()
        col.prop(mat, "diffuse_color", text="")
        if context.object.show_transparent:
           col.prop(mat, "alpha")

Re: Viewport colors for objects in Octane for Blender plugin?

PostPosted: Mon Aug 03, 2015 8:24 am
by Nennig
Hi aufwind,

This is awesome!
Many thanks for sharing your script. I will try it out tonight after work.

Have a great day.
Marc

Re: Viewport colors for objects in Octane for Blender plugin?

PostPosted: Mon Aug 03, 2015 5:09 pm
by Nennig
Hi aufwind,

Your script works like a charm! Many thanks for sharing !!!!
This is a really cool feature, awesome job.

Marc

Re: Viewport colors for objects in Octane for Blender plugin?

PostPosted: Mon Feb 11, 2019 9:11 am
by J.C
Dear devs, why dont you add this by default? It's so much useful and easy to add.