On 08/04/2017 at 07:09, xxxxxxxx wrote:
Is it possible to set the attribute manager mode, via a script, for example?
Would it need to be active/in focus first?
It would be nice to have the modes as buttons or tabs for quicker/easier access.
Maybe this post would be better suited for the plugin requests, I wasn't sure.
On 08/04/2017 at 07:38, xxxxxxxx wrote:
I guess this function is made for that.
On 08/04/2017 at 08:36, xxxxxxxx wrote:
This seems to work sometimes, I made this super minimalist script
In the cases it doesn't work, e.g. ACTIVEOBJECTMODE_TOOL;
I have an editable poly cube and I set the attribute manager to a mode other than tool mode, when I execute the script with id as
It shows project settings mode instead, noticed this happens with other modes too. Maybe I didn't set up the script properly and it defaults to project settings mode..
On 08/04/2017 at 08:58, xxxxxxxx wrote:
Basicly c4d help you and set the mode according to the op you pass throught it.
Here you have a quick exemple...
def main() :
obj = op
c4d.gui.ActiveObjectManager_SetObject(c4d.ACTIVEOBJECTMODE_OBJECT, obj, c4d.ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN)
tag = op.GetTags()
c4d.gui.ActiveObjectManager_SetObject(c4d.ACTIVEOBJECTMODE_TAG, tag, c4d.ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN)
mat = doc.GetActiveMaterial()
c4d.gui.ActiveObjectManager_SetObject(c4d.ACTIVEOBJECTMODE_MATERIAL, mat, c4d.ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN)
sha = mat.GetFirstShader()
c4d.gui.ActiveObjectManager_SetObject(c4d.ACTIVEOBJECTMODE_SHADER, sha, c4d.ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN)
tool = c4d.plugins.FindPlugin(doc.GetAction(), c4d.PLUGINTYPE_TOOL)
c4d.gui.ActiveObjectManager_SetObject(c4d.ACTIVEOBJECTMODE_TOOL, tool, c4d.ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN)
On 08/04/2017 at 10:07, xxxxxxxx wrote:
Ahh I see, that makes sense! thanks a lot!