Hi Swinn,
First of all, about the delay please read this announcement where we inform the community we would not be reachable while this 26th to 28th on September.
Then when you post code, please use the correct markdown for code which is 3 single quote `` `.
I also encourage you to read How to post questions in order to learn how to make use of the tagging system. And finally Q&A functionnaly To get used to of our new Q&A tools.
With that's said, actually I agree, the function should not return True but False instead. I will report the issue.
But in all case, the issue happens because you didn't fill the correct type of object (it should be a list of c4d.Ovolume object).
You can get the settings of the command in the C++ documentation about VolumeToMeshSettings
And here it's an example which makes use of VOLUMECOMMANDTYPE_VOLUMETOMESH
import c4d
# Main function
def main():
#Get the selected object
volume = op
if not volume: return
# If it's a volume builder we access the volume Object
if volume.CheckType(c4d.Ovolumebuilder):
volume = volume.GetCache()
# Check if we get a volume object
if not volume.CheckType(c4d.Ovolume): return
# Define our parameters for the volume commad
objList = [volume]
settings = c4d.BaseContainer()
settings[c4d.VOLUMETOMESHSETTINGS_ISO] = 2.0
settings[c4d.VOLUMETOMESHSETTINGS_ADAPTIVE] = 0.5
document = doc
# Call the Volume Command
obj = c4d.modules.volume.SendVolumeCommand(
command = c4d.VOLUMECOMMANDTYPE_VOLUMETOMESH,
list = objList,
bc = settings,
doc = document)
# If we get a boolean something went wrong
if isinstance(obj, bool) and not obj[0].CheckType(c4d.Opolygon):
return False
# Insert the object in the scene
doc.InsertObject(obj[0])
c4d.EventAdd()
# Execute main()
if __name__=='__main__':
main()
If you have any question, please let me know.
Cheers,
Maxime.