btw, same on windows
Posts
-
RE: Cache Proxy Tag
This is how I’ve implemented it at the moment, although users can’t drag and drop selection tags in the same way as with C4D’s built-in generator. Hope there are plans to expose the proxy tags.
Thanks for tour time!
-
RE: Cache Proxy Tag
Thanks for your info @ferdinand, but I would like to raise a few ‘off-topic’ questions on this matter.
When working with object generators, what would you recommend regarding materials and tags? Should you create material labels directly to reference the ‘hidden selection name’, or use BaseLink in the Parameters panel? The user experience is always somewhat suboptimal when there are no proxy tags.
Cheers~
DunHou -
RE: Cache Proxy Tag
@ferdinand said in Cache Proxy Tag:
Tcacheproxytagpointselection and its edge, polygon, vertex color, and vertex map counter parts are a MoGraph mechanism to link from a generator, i.e., the tags visible in the Object Manager to tags in the cache of something, i.e., the invisible part of a scene graph. So that the user can interact with tags buried in the cache of something. They are one of the MoGraph workarounds for the very problem I described above. The generator using them has of course to support them/create them, because you need a selection/vertex tag on some point object in the cache in the first place, to which the proxy can link. I.e., you cannot just create proxy tags on anything.
Sorry, I still confused about proxy tags, do you mean that third-party users cannot create proxy tags, even if the generated model contains an ‘internal selection’, such as when the generator creates a cube and we set a selection to consistently select the top face? Can we not create a proxy tag and assign a material to it, in the same way as with ‘Extrude’?
Cheers~
DunHou -
RE: How to export icons of asset
Hey @ferdinand ,
Sorry I forgot click
Submitbutton
well, that is the info I need, I use same tech to get icons for CMD, and now waiting for svg part in the future.
Cheers~
DunHou -
RE: How to export icons of asset
Ha, If only in terms of usage, I hope to export capsule icons that can be dragged to OM, save to disk, which I can read through regular code, not just limited to C4D.
For example, my custom menu plugin has a settings dialog that is not based on C4D SDK, but I want to UI/UX it closer to C4D, so I want to obtain icon data for drawing.
I hope this makes sense for my purpose.
Cheers~
DunHou -
RE: How to export icons of asset
Hey @ferdinand ,
This is also related to SVG to some extent. My ultimate goal is to export the required commands and corresponding icons for use in my menu plugin. As it is not a traditional C4D API, it needs to be saved as a local image/svg. I am not sure if this is feasible.
Cheers~
DunHou -
How to export icons of asset
Hey community,
I want to get icon of assets like Redshift Nodes or OM capsule(Axis Center). but I can't export or download them, at least that's what @ferdinand said before. Do we have some way to get those icons?
I want to match icons and asset ids, so I can use them in pipeline, but a bit outside the c4d system.
Cheers~
DunHouimport c4d import maxon import shutil def GetAssetDescription(mid: maxon.Id = maxon.Id("net.maxon.pattern.node.twod.blur")) -> maxon.AssetDescription: repository = maxon.AssetInterface.GetUserPrefsRepository() assetDescription = repository.FindLatestAsset( maxon.AssetTypes.File(), mid, maxon.Id(), maxon.ASSET_FIND_MODE.LATEST) if assetDescription is None: raise RuntimeError("Could not find the asset.") return assetDescription def IterateAssetMetadata(): assetDescription = GetAssetDescription() icon = maxon.AssetUtilitiesInterface.GetAssetIcon(assetDescription) print(icon.GetUrl()) if __name__ == "__main__": IterateAssetMetadata() -
RE: How to draw svg to bitmaps?
Well, that's exactly what I'm worried about. I try my best to avoid introducing third-party libraries, but currently it seems that I can only use resvg or pillow.
Cheers~
DunHou. -
How to draw svg to bitmaps?
Hey community,
I want to display capsule assets with icon with
maxon.AssetUtilitiesInterface.GetAssetIcon, but some of the icon is in svg format, can we draw this into a bitmap likecommand palatedid?import c4d import maxon doc: c4d.documents.BaseDocument # The currently active document. op: c4d.BaseObject | None # The primary selected object in `doc`. Can be `None`. def main() -> None: """Called by Cinema 4D when the script is being executed. """ repo = maxon.AssetInterface.GetUserPrefsRepository() uid = maxon.Id("file_bc73b379cb5e509e") # this is the ivy capsule id, it has a svg icon # uid = maxon.Id("com.rocketlasso.neutron.asset.generator.ivy") asset_description = repo.FindLatestAsset( maxon.AssetTypes.File(), uid, maxon.Id(), maxon.ASSET_FIND_MODE.LATEST) preview_url = maxon.AssetUtilitiesInterface.GetAssetIcon(asset_description) bmp = c4d.bitmaps.BaseBitmap() result, _ = bmp.InitWith(preview_url) if result != c4d.IMAGERESULT_OK: return None c4d.bitmaps.ShowBitmap(bmp) if __name__ == '__main__': main()Cheers~
DunHou -
RE: Can we draw alpha image in viewport
Sorry for my stupid question @ferdinand , I should use
c4d.DRAW_ALPHA_NORMALbut notc4d.DRAW_ALPHA_FROM_IMAGE.Shame on me

Cheers~
DunHou -
RE: How to add tabs to tool plugins.
It works! Thanks!
@ferdinand said in How to add tabs to tool plugins.:
Unlike for node description resources, custom GUIs are not indicated as SOME_DATA_TYPE { CUSTOMGUI SOME_CUSTOM_GUI; ... } in dialog resources but always as their own data type (don't ask me why).
Hahaha, this is really strange. The first thing I tried was CUTOMGUI SOME_CUSTOM_GUI. This is what I got with Agent Ransack...
One more thing, I couldn't find the
idd_uv_map.resfile in the image in the local resources. Is it already embedded without displaying the source code.Cheers~
DunHou -
Can we draw alpha image in viewport
Hey,
I want to draw images with alpha in viewport, but what I got is a image with black bg, I already test
DrawTextureflagDRAW_ALPHA_NORMAL_FROM_IMAGEandDRAW_ALPHA_FROM_IMAGE, they will not work.Can I draw bitmaps with alpha in viewport, like the little icon under the mouse?
Cheers~
DunHou -
RE: How to add tabs to tool plugins.
Thanks for your detailed answer @ferdinand
I do know quicktab, but I didn't find its symbol in res file, seems I can only make it works in python codes.I also agree it is bit strange to use sculpt plugins.
Cheers~
DunHou -
How to add tabs to tool plugins.
I want to use groups UI in ToolData plugins is resource file( or in codes maybe ), but I didn't figure out witch us the right flag.
Still, I can not upload images, but please see selection tool, it has
option/axis/soft selectiongroups.How can I do this?
Cheers~
DunHou -
RE: How to start a new line in plugin help with localization?
Thanks for your detailed answers @ferdinand !
At night, I suddenly had a flash of inspiration and found a simpler solution, use html tags:IDS_PLUGIN_HELP "description about......<br><b>Ctrl: </b> do something...<br><b>Alt: </b> do something...Cheers~
DunHou -
RE: How to start a new line in plugin help with localization?
Thanks for your tips!
@ferdinand said in How to start a new line in plugin help with localization?:
I am personally also not sure it is a good idea to allow users putting control characters into strings, primarily due to whitespace
I want to add some shortcut description to plugin like:
Plugin Name
description about.....
Alt : do something...
Shift : do something...do you have suggestions about this case?
Cheers~
DunHou -
How to start a new line in plugin help with localization?
Hey community,
I want to add plugin help (or tooltips), I can use embed string for
\n, it works fine. but when I use c4d resource files (c4d_strings.str), it not worked, how can I fix this?I can not paste imgs, (Something went wrong while parsing server response)
SeeMove Toolin c4d, it has 3 lines.Cheers~
DunHou -
We can update the Python API to align with the C++API
Hi SDK team,
I notice that webview in python only have few api but without functions such as
ExecuteJavascriptorSetWebMessageCallbackand theSetURLCallbackis diffrent form C++, at least that's what the document says.Do we have plans to add corresponding functions in Python APIs?
Or, on the existing basis, how do you suggest implementing data processing from C4D ->web ->C4D?e.g. Read the selected object, click the button in the webview, and rename the selected object.Cheers~
DunHou -
RE: Getting some weird console output from GeDialog.Timer()
Timer should return None:
def Timer(self, msg: BaseContainer) -> None: """ If you subscribe to timer events using :meth:`SetTimer` (x), this function is called every x'th millisecond. :type msg: BaseContainer :param msg: The raw timer message. """ pass