THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/07/2011 at 15:16, xxxxxxxx wrote:
Can someone please point out to me what I'm doing wrong with the execution of this code? I can't seem to get it to take the settings in the base container field. As you can see I've tried three different ways to set this value, none of them seem to take. The script works but it just executes with the default value, not with the one I want to specify. Many thanks. Also - the only object in the scene is a linear spline with two points.
from c4d import utils
from c4d import documents
doc = documents.GetActiveDocument()
def main() :
settings = c4d.BaseContainer()
# settings = 10
settings[c4d.MDATA_SUBDIVIDE_SUB] = 10
# settings.SetData(c4d.MDATA_SUBDIVIDE_SUB, 10)
command = c4d.MCOMMAND_SUBDIVIDE,
bc = settings,
doc = doc)
if __name__ == '__main__':
On 25/07/2011 at 18:53, xxxxxxxx wrote:
Yeah so it was something simple, I was using MDATA_SUBDIVIDE_SUB instead of MDATA_SUBDIVIDE_SPLINESUB.
Gee whiz the Python SDK could be laid out so much better. Why not just use the same format as the C++ SDK? That's where I found the well laid out group of ID's, with each of their respective modeling data base containers clearly labeled. Have to remember to check the C++ SDK before I bash my head against the wall for two hours!