C4D python create CustomGUI floatSlider

A public forum for discussing and asking questions about the demo version of Octane Render.
Forum rules
For new users: this forum is moderated. Your first post will appear only after it has been reviewed by a moderator, so it will not show up immediately.
This is necessary to avoid this forum being flooded by spam.
Post Reply
gr4ph0s
Posts: 3
Joined: Mon Mar 14, 2016 4:44 pm
Location: France
Contact:

Hello otoy team.
I currently developping a light lister for multiple render engine. You can have an old preview here https://vimeo.com/207388639
For the moment I succefully support C4d / Redshift / Arnold and Corona and I would like to expend it to Octane.

Octane seem to use a lot of very litlle float and it have register it's own custom gui for displaying those wich is a good idea.
Sadly I don't succes to recreate them into a Gedialog. So I asking you if you can provide me an exemple for create such an UI directly into a Gedialog and if you could provide me a set/get method it will be nice too :)
Here is an attempt by copying data of the emp parameter. The ui is well created but I can't set/get value from it.

Code: Select all

import c4d
OCTANE_FLOATSLIDER = 1030680
OCTANE_TAG         = 1029526

def getbc():
    tag = c4d.BaseTag(OCTANE_TAG)
    description = tag.GetDescription(c4d.DESCFLAGS_DESC_0)
    save_bc = c4d.BaseContainer()
    for bc, paramid, groupid in description:      
        if paramid[0].id == c4d.LIGHTTAG_BB_TEMPERATURE:
            save_bc = bc
            
    for index, value in save_bc:
        print "Index: %i, Value: %s" % (index, str(value))
        
    print "--------"
    
    return save_bc


class mainDialog(c4d.gui.GeDialog):
    def CreateLayout(self):
        bc = getbc()
        if bc:
            self.linkslot=self.AddCustomGui(9999, bc[21], "Shot Cam Slot", c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, 0, 0, bc)
        self.AddButton(1001, c4d.BFH_CENTER, 60, 15, "")
        return True
        

def main():
    main_dlg = mainDialog()
    main_dlg.Open(dlgtype=c4d.DLG_TYPE_MODAL, defaultw=300, defaulth=150, xpos=-1, ypos=-1)

if __name__=='__main__':
    main()
Thanks in advance and I hope I'm in the good place for post it :)
User avatar
aoktar
Octane Plugin Developer
Posts: 16063
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

Hi there,
i'm developper of plugin. Could you please send a PM to me to track it better. I'll help for that, thanks!
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
gr4ph0s
Posts: 3
Joined: Mon Mar 14, 2016 4:44 pm
Location: France
Contact:

Thanks for the quick reply sadly I'm not allowed to send pm.
User avatar
aoktar
Octane Plugin Developer
Posts: 16063
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

gr4ph0s wrote:Thanks for the quick reply sadly I'm not allowed to send pm.
Can you answer the my PM? Otherwise i'll follow up from this post.
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
gr4ph0s
Posts: 3
Joined: Mon Mar 14, 2016 4:44 pm
Location: France
Contact:

I think I'm not allowed. http://img4.hostingpics.net/pics/292386octane.jpg

If you prefer we can talk via email also.
As you prefer.
User avatar
aoktar
Octane Plugin Developer
Posts: 16063
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

Send me email please. I'll answer until tomorrow
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
JoshuaReeves
Posts: 5
Joined: Tue Apr 25, 2017 7:42 pm

I don't think it's possible to do grouping and GUI changes for UserData... Also, since buttons are technically event creators and not data storage, you can't create button-type UserData. Closest you can have is a Boolean attribute that you check for value changes, then treat that as a button event.
Post Reply

Return to “Demo Version Questions & Discussion”