hmm is it not possible to add the same element that is in the user data?
I tried using
self.AddCustomGui(IDOBJ , pluginid=c4d.CUSTOMGUI_STRING, flags=c4d.BFH_SCALEFIT, minw=0, minh=0, customdata=c4d.BaseContainer())
but it didn't work
hmm is it not possible to add the same element that is in the user data?
I tried using
self.AddCustomGui(IDOBJ , pluginid=c4d.CUSTOMGUI_STRING, flags=c4d.BFH_SCALEFIT, minw=0, minh=0, customdata=c4d.BaseContainer())
but it didn't work
can I drag an obj into an AddEditText to then get string?
similar to the example I show through user data
Im developing a simple script to export an .FBX just the "Joints" object of each .c4d file in a folder, it works without any errors on console but it doesn't create any .FBX file in the folder I define
import c4d
import os
def main() -> None:
plugin = c4d.plugins.FindPlugin(c4d.FORMAT_FBX_EXPORT, c4d.PLUGINTYPE_SCENESAVER)
#print (plugin)
data = {}
plugin.Message(c4d.MSG_RETRIEVEPRIVATEDATA, data)
settings = data.get("imexporter", None)
#print (settings)
settings[c4d.FBXEXPORT_FBX_VERSION] = False
settings[c4d.FBXEXPORT_ASCII] = False
settings[c4d.FBXEXPORT_CAMERAS] = False
settings[c4d.FBXEXPORT_LIGHTS] = False
settings[c4d.FBXEXPORT_SPLINES] = False
settings[c4d.FBXEXPORT_INSTANCES] = False
settings[c4d.FBXEXPORT_SELECTION_ONLY] = True
settings[c4d.FBXEXPORT_GLOBAL_MATRIX] = False
settings[c4d.FBXEXPORT_SDS] = c4d.FBXEXPORT_SDS_GENERATOR
settings[c4d.FBXEXPORT_TRIANGULATE] = False
settings[c4d.FBXEXPORT_SAVE_NORMALS] = True
settings[c4d.FBXEXPORT_SAVE_VERTEX_COLORS] = False
settings[c4d.FBXEXPORT_SAVE_VERTEX_MAPS_AS_COLORS] = False
settings[c4d.FBXEXPORT_UP_AXIS] = c4d.FBXEXPORT_UP_AXIS_Y
settings[c4d.FBXEXPORT_TRACKS] = True
settings[c4d.FBXEXPORT_BAKE_ALL_FRAMES] = False
settings[c4d.FBXEXPORT_PLA_TO_VERTEXCACHE] = False
settings[c4d.FBXEXPORT_BOUND_JOINTS_ONLY] = False
settings[c4d.FBXEXPORT_TAKE_MODE] = c4d.FBXEXPORT_TAKE_TAKES
settings[c4d.FBXEXPORT_MATERIALS] = True
settings[c4d.FBXEXPORT_EMBED_TEXTURES] = False
settings[c4d.FBXEXPORT_SUBSTANCES] = True
settings[c4d.FBXEXPORT_BAKE_MATERIALS] = True
settings[c4d.FBXEXPORT_BAKEDTEXTURE_WIDTH] = 1024
settings[c4d.FBXEXPORT_BAKEDTEXTURE_HEIGHT] = 1024
settings[c4d.FBXEXPORT_BAKEDTEXTURE_RESIZE] = c4d.FBXEXPORT_BAKEDTEXTURE_RESIZE_OFF
settings[c4d.FBXEXPORT_BAKEDTEXTURE_FORMAT] = int(8)
settings[c4d.FBXEXPORT_BAKEDTEXTURE_DEPTH] = c4d.FBXEXPORT_BAKEDTEXTURE_DEPTH_8
settings[c4d.FBXEXPORT_LOD_SUFFIX] = False
c4dfilesfolder = c4d.storage.LoadDialog(c4d.FILESELECTTYPE_ANYTHING, '.C4D Animations Folder', c4d.FILESELECT_DIRECTORY, '','', '')
c4dfileslist = os.listdir(c4dfilesfolder)
exportpath = c4d.storage.LoadDialog(c4d.FILESELECTTYPE_ANYTHING, 'Save .FBX Files', c4d.FILESELECT_DIRECTORY, '','', '')
c4dpath = ''
for file in c4dfileslist :
c4dpath = '{}\{}'.format(c4dfilesfolder, file)
doc = c4d.documents.LoadDocument(c4dpath, c4d.SCENEFILTER_OBJECTS)
if not doc:
print ('NONE DOC')
else:
doc.SetSelection(doc.SearchObject('Joints'), c4d.SELECTION_NEW)
c4d.documents.SaveDocument(doc, exportpath, c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, c4d.FORMAT_FBX_EXPORT)
c4d.documents.KillDocument(doc)
if __name__ == '__main__':
main()
Is it possible for me to create a Python plugin similar to this example I put together? Like a top bar, commands, and a menu, my doubt is whether I need to register the plugin differently.
I need to check if an object has user data and get all the IDs for each one.
I tried op[c4d.ID_USERDATA], but it doesn't work, I imagine it's not that simple to do, i lot of searching, maybe it's something related to c4d.DescID() , I'd like to understand
Guys, I don't know if it's a very noob question, but is it possible for me to create a script, outside of c4d, in this example for testing, I have a Cube in my scene and I would like to print it when I click on a button that opens in the Tkinter window
Thanks, buddy! It worked. To be honest, I never really understood what Message(c4d.MSG_UPDATE) was all about, and now ExecutePasses is new to me
When I use .GetMg() after the script is finished it seems to return the right results
Is this a bug? maybe rerelated to the IK Tag
I want to develop a plugin that defines the path of the folder that the open project window will open
hi @ferdinand ,
I also forgot to mention that there will be a button to save the checkbox configuration.
before Render To Picture Viewer runs, a dialog with two buttons will run "go to render" and "stop"
or a simple c4d.gui.QuestionDialog()
I'm still deciding
by chance, now taking advantage of it, I already had several other doubts that I had to resort here to the forum and the solution was always something related to MSG, I don't understand anything about this subject, where can I read more about this material?