Py4D in R12 (OBJECT_GENERATOR)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/09/2010 at 08:47, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12
Platform: Mac OSX ;
Language(s) : PYTHON ;---------
Hello there,I'm a bit confused. Today I installed R12 and all my Py4D plugins didn't work any longer.
I thought Py4D comes preinstalled with R12. Is that correct or do I need to install Py4D by hand, like it was in R11.5? If that's the case, where do i get it?
My main problem: The SimpleObject plugin, that was put online as an Py4D-example, is giving me the error message:
File "SimpleObject.pyp", line 64, in <module> AttibuteError: 'module' object has no attribute 'OBJECT_GENERATOR'
In the R12 Py4D SDK OBJECT_GENERATOR is listed as a valid flag for the RegisterObjectPlugin -function. Many other Py4D-plugins show the same error, now.
Can anyone help me out?
Thank you very much! -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/09/2010 at 11:49, xxxxxxxx wrote:
I don't use Python in C4D, but I think the implementation in R12 is different (more advanced) than the one from Py4D. So some plugins and scripts might have to be modified somewhat to work on R12. You'll need to hit the Python SDK to resolve these problems.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/09/2010 at 12:05, xxxxxxxx wrote:
Hey Spedler, thanks for your reply!
But as said... I looked into the Py4D SDK for R12. That has to be the right place to check, because I'm... well, writing Python in R12
Maybe I mixed up some of the terms, or maybe I don't know the right place to look for help. It'd be great if someone could make the whole stuff more clear to me. I'm still a beginner in Py4D.
So:
- Python is the coding language.
- Py4D is the implementation of Python into Cinema 4D.
- In Cinema 4D R11.5 you could install Py4D as described on py4d.com.Questions:
- How do I install Py4D for Cinema 4D R12?
- Where can I learn what are the differences in the language between Py4D for R11.5 and Py4D for R12?Thank you again!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/09/2010 at 12:45, xxxxxxxx wrote:
Hi robibert,
So:
- Python is the coding language.
- Py4D is the implementation of Python into Cinema 4D.
- In Cinema 4D R11.5 you could install Py4D as described on py4d.com.This is all correct, you dont mix up the terms. Py4D is for CINEMA 4D R11.5 and the Python integration for R12 has no real name, it's simply Python in C4D
The documentation of the Python C4DSDK is shipped with several new updated examples.
The biggest change: Python in R12 contains no built-in module called c4d.symbols and all constants were moved to the c4d main module. So just use c4d.BJECT_GENERATOR and it should work again. Also check out the introduction of SetRelPos, SetRelRot, SetRelScale, SetAbsPos, ... etc. If you use SetPos in your script, just replace it with SetRelPos, etc...
Cheers, Sebastian
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/09/2010 at 23:19, xxxxxxxx wrote:
Thanks Sebastian!
That seems to be the answer I'm looking for. Going to try it soon.I have another question:
Let's say I have an xpresso-setup that, at some point, has a collision detection giving me a boolean TRUE at varying frames in time. Whenever that value (xpresso-node-Output) is TRUE I want to let's say generate a Cube in the scene.
The problem I am facing is, that the Python-xpresso-node is basically only meant for mathmatical stuff (it says so in the C4D help). An object-creation like return c4d.BaseObject(c4d.Ocube) takes no effect.
Can I get the xpresso working together with Python? Maybe by using a Python Generator object or a Python Tag and dragging them into the xpresso-setup? And if so, what would be a simple example for getting that boolean value (or any other value, for that matter) from xpresso into the Python Generator or Python Tag?
Thank you very much for your time to help me out!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/09/2010 at 02:59, xxxxxxxx wrote:
Creating new objects or change the structure of a scene from a tag, node or object might lead to a crash (for Coffee, Python, C++).
Currently there is no built-in pipeline between the generator, tag and node available, but you can simply use user-data fields to exchange data.
Cheers, Sebastian
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/09/2010 at 03:14, xxxxxxxx wrote:
Just to add to Sebastian's reply, currently the only way to create new objects through XPresso or any other expression is with Thinking Particles.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/09/2010 at 03:49, xxxxxxxx wrote:
Ok. I understand. Thank you.
Matthias, do you happen to know a link to an example for such object-creation through TP?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/09/2010 at 05:30, xxxxxxxx wrote:
You might check out the TP Preset 3.0 Library in R12 which contains a lot of useful stuff. Also a TP Random Generator which works with Python and creates geometry.