Thu, Nov 28, 6:40 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 28 11:20 am)



Subject: OT Which Programming Language is 3D Apps wrote in ?


  • 1
  • 2
RorrKonn ( ) posted Mon, 09 February 2009 at 10:30 PM

 

Got Windows Visual C++ 2008 express edition.

They have Herb Schildt C++ A Beginner's Guide in pdf.helpful stuff.

They also have game development app's.

 

Algebra & Trig, I think it's been a long time since we used them.

Mathematical foundations

 

I surfed threw the links, got a little confused.

I think there talking about deferent countries.cause they have deferent standards.

Not sure if all this is for 3D.but if it is I am using cheat sheets, a lot of them :)

Don't think my app will have physics , planets will not actually have gravity , at lest not the early versions.

standards.iso.org/ittf/PubliclyAvailableStandards/C030811e_FILES/MAIN_C030811e/ISOIEC_18026E_TOC.HTM

 

All this is so cool I am starting to get the idea of what I need to learn & what it takes to make the app.

============================================================ 

The Artist that will fight for decades to conquer their media.
Even if you never know their name ,your know their Art.
Dark Sphere Mage Vengeance


kuroyume0161 ( ) posted Tue, 10 February 2009 at 1:11 AM

Avoid the Schildt!! ;)  Good reference.  No good for programming in C++.  Go to Amazon and get a list of recommended books for beginners in C++ (there will be many).  Eventually get "Effective C++ Third Edition" when you have some experience. :)

I found C++ atrociously difficult back in the late 90s (coming from C/BASIC/Assembler/LISP/Pascal 'procedural' languages).  The books, standard, and STL have improved significantly since.  I went to Java first (for a taste of REAL OOP) because of that first impression and it made the later transition to C++ a lot smoother.

The key to programming in almost any language (I have a dozen or more under my belt) is understanding the underlying programming paradigms.  If you understand something about memory management and how that works (even for a language that handles it for you), boolean algebra, functions and data (and objects for OOP), realize that everything in the end is Binary!, branch conditions, and a few other fundamentals then you can easily adapt to any new language you need to learn.  After that it is all about varied syntaxes and semantics.


There is indeed a new plugin for Cinema 4D that adds Python support but so far it is acting a bit weird and needs more fleshing out of the Cinema 4D support.  For the weird part, an example (ignore lack of indentations):

class ...
def init():
...
def somefunc():
self.init()

I get an error about the function taking no arguments but one is included.  Where? ;)  So there is some work to be done.  This has been a monumental task for the developer but my verdict is that it isn't quite ready for indepth Python scripting in Cinema 4D.  My idea was to take the COFFEE example plugins and turn them into Python plugins but there have been too many omissions and issues to do more than three very basic GUI ones.

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


odf ( ) posted Tue, 10 February 2009 at 1:43 AM · edited Tue, 10 February 2009 at 1:47 AM

Quote -
class ...
def init():
...
def somefunc():
self.init()

I get an error about the function taking no arguments but one is included.  Where? ;)  So there is some work to be done.

This has nothing to do with the implementation. You've simply written incorrect Python code.

In Python, instance methods always receive "self" (the instance they were called on) as an implicit argument. You should have written "def init(self):" and "def somefunc(self):".

-- I'm not mad at you, just Westphalian.


kuroyume0161 ( ) posted Tue, 10 February 2009 at 1:48 AM · edited Tue, 10 February 2009 at 2:02 AM

I tried that and it said '''the function' takes exactly 1 argument (2 given)". ;)

And these are existing class functions in the 'SDK' not my own.  I might be a Python newbie but I understand how this works from learning and example.

ETA: Oh, I see.  So each function in the class needs to be like: def init(self):
and the call self.init().  So much for that.  Hey, I'm just at Classes in "Learning Python" but I want to get a more recent book.  This self. self. self. stuff may drive me insane. :)

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


odf ( ) posted Tue, 10 February 2009 at 2:15 AM · edited Tue, 10 February 2009 at 2:17 AM

Just in case I wasn't clear: you always call an instance method with one parameter less than declared. If you declare it with one parameter, you call it with none, etc. Your example had an instance method with no declared parameters. That's something you simply don't do in Python.

I'm not sure what you mean by "these are existing class functions". You've given an example with self-defined functions. How does that relate to the SDK? Sorry for nitpicking, but from your example it looked like you might have mistaken an error on your part for a problem in the libraries. So I tried to clarify that.

EDIT: Just saw your edit. Yep, it's one of the few things I really don't like very much about Python. One gets used to it after a while, but it's still not very elegant.

-- I'm not mad at you, just Westphalian.


kuroyume0161 ( ) posted Tue, 10 February 2009 at 3:02 AM

I just haven't encountered this yet:

def func(self):

self.func()

But that works. :)

The docs for the Cinema 4D Python interface are a bit rough around the edges.  Some of the methods are shown as this.func(self) whereas other are simply this.func2().  Might be lax documentation.  And () is acceptable in the other ten languages I know so... :D

Thanks. :)

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


odf ( ) posted Tue, 10 February 2009 at 5:29 AM

Quote - The docs for the Cinema 4D Python interface are a bit rough around the edges.  Some of the methods are shown as this.func(self) whereas other are simply this.func2().  Might be lax documentation.  And () is acceptable in the other ten languages I know so... :D

That's definitely sloppy documentation. Methods should be documented the way they are used, not the way they are declared. Then again, in most languages those two coincide. Looks like the person preparing the documentation wasn't an experienced Python programmer. 😉

-- I'm not mad at you, just Westphalian.


  • 1
  • 2

Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.