Browse Source

Merge branch 'master' into gl-uniform-buffers

rdb 10 years ago
parent
commit
731f085e7a
72 changed files with 1246 additions and 577 deletions
  1. 454 446
      dtool/src/cppparser/cppBison.cxx.prebuilt
  2. 74 72
      dtool/src/cppparser/cppBison.h.prebuilt
  3. 56 0
      dtool/src/cppparser/cppBison.yxx
  4. 44 6
      dtool/src/cppparser/cppMakeProperty.cxx
  5. 9 2
      dtool/src/cppparser/cppMakeProperty.h
  6. 1 0
      dtool/src/cppparser/cppPreprocessor.cxx
  7. 2 0
      dtool/src/dtoolbase/dtoolbase.h
  8. 3 1
      dtool/src/interrogate/interfaceMaker.cxx
  9. 2 0
      dtool/src/interrogate/interfaceMaker.h
  10. 97 15
      dtool/src/interrogate/interfaceMakerPythonNative.cxx
  11. 1 0
      dtool/src/interrogate/interfaceMakerPythonNative.h
  12. 61 5
      dtool/src/interrogate/interrogateBuilder.cxx
  13. 1 1
      dtool/src/interrogatedb/interrogateDatabase.cxx
  14. 44 0
      dtool/src/interrogatedb/interrogateElement.I
  15. 6 1
      dtool/src/interrogatedb/interrogateElement.cxx
  16. 9 1
      dtool/src/interrogatedb/interrogateElement.h
  17. 12 0
      panda/src/display/displayRegion.I
  18. 8 0
      panda/src/display/displayRegion.h
  19. 1 1
      panda/src/display/graphicsStateGuardian.cxx
  20. 1 1
      panda/src/display/graphicsStateGuardian.h
  21. 2 0
      panda/src/display/stereoDisplayRegion.h
  22. 25 0
      panda/src/display/windowProperties.h
  23. 5 0
      panda/src/express/patchfile.h
  24. 5 0
      panda/src/gobj/bufferContext.h
  25. 7 0
      panda/src/gobj/geom.h
  26. 1 0
      panda/src/gobj/geomContext.h
  27. 15 0
      panda/src/gobj/geomPrimitive.h
  28. 4 1
      panda/src/gobj/geomVertexAnimationSpec.h
  29. 9 0
      panda/src/gobj/geomVertexArrayData.h
  30. 5 0
      panda/src/gobj/geomVertexArrayFormat.h
  31. 7 0
      panda/src/gobj/geomVertexData.h
  32. 2 0
      panda/src/gobj/geomVertexFormat.h
  33. 4 0
      panda/src/gobj/internalName.h
  34. 2 0
      panda/src/gobj/lens.h
  35. 11 0
      panda/src/gobj/material.h
  36. 1 0
      panda/src/gobj/matrixLens.h
  37. 9 0
      panda/src/gobj/paramTexture.h
  38. 1 0
      panda/src/gobj/shaderContext.h
  39. 2 1
      panda/src/gobj/sliderTable.h
  40. 13 0
      panda/src/gobj/texture.I
  41. 24 0
      panda/src/gobj/texture.h
  42. 18 0
      panda/src/gobj/textureStage.h
  43. 2 1
      panda/src/gobj/transformBlend.h
  44. 4 1
      panda/src/gobj/vertexSlider.h
  45. 2 1
      panda/src/gobj/vertexTransform.h
  46. 2 0
      panda/src/gobj/videoTexture.h
  47. 12 1
      panda/src/grutil/movieTexture.h
  48. 2 0
      panda/src/grutil/nodeVertexTransform.h
  49. 1 0
      panda/src/grutil/rigidBodyCombiner.h
  50. 6 0
      panda/src/particlesystem/particleSystem.cxx
  51. 3 1
      panda/src/pgraph/cacheStats.cxx
  52. 5 0
      panda/src/pgraph/fog.h
  53. 1 1
      panda/src/pgraph/modelRoot.h
  54. 15 15
      panda/src/pgraph/nodePath.cxx
  55. 2 0
      panda/src/pgraphnodes/callbackNode.h
  56. 5 0
      panda/src/pgraphnodes/fadeLodNode.h
  57. 3 0
      panda/src/pgraphnodes/spotlight.h
  58. 2 0
      panda/src/pgraphnodes/switchNode.h
  59. 6 0
      panda/src/pgraphnodes/uvScrollNode.h
  60. 2 0
      panda/src/pnmimage/pfmFile.h
  61. 12 0
      panda/src/pnmimage/pnmImageHeader.I
  62. 8 0
      panda/src/pnmimage/pnmImageHeader.h
  63. 3 0
      panda/src/pnmimage/pnmPainter.h
  64. 12 0
      panda/src/putil/animInterface.h
  65. 11 0
      panda/src/putil/bamCache.h
  66. 5 0
      panda/src/putil/bamCacheRecord.h
  67. 9 1
      panda/src/putil/bamReader.h
  68. 7 0
      panda/src/putil/bamWriter.h
  69. 2 0
      panda/src/putil/buttonHandle.h
  70. 3 1
      panda/src/putil/cachedTypedWritableReferenceCount.h
  71. 7 0
      panda/src/text/textAssembler.h
  72. 34 0
      panda/src/text/textProperties.h

File diff suppressed because it is too large
+ 454 - 446
dtool/src/cppparser/cppBison.cxx.prebuilt


+ 74 - 72
dtool/src/cppparser/cppBison.h.prebuilt

@@ -124,42 +124,43 @@ extern int cppyydebug;
      KW_LONG = 333,
      KW_LONGLONG = 334,
      KW_MAKE_PROPERTY = 335,
-     KW_MAKE_SEQ = 336,
-     KW_MUTABLE = 337,
-     KW_NAMESPACE = 338,
-     KW_NEW = 339,
-     KW_NOEXCEPT = 340,
-     KW_NULLPTR = 341,
-     KW_OPERATOR = 342,
-     KW_PRIVATE = 343,
-     KW_PROTECTED = 344,
-     KW_PUBLIC = 345,
-     KW_REGISTER = 346,
-     KW_RETURN = 347,
-     KW_SHORT = 348,
-     KW_SIGNED = 349,
-     KW_SIZEOF = 350,
-     KW_STATIC = 351,
-     KW_STATIC_ASSERT = 352,
-     KW_STATIC_CAST = 353,
-     KW_STRUCT = 354,
-     KW_TEMPLATE = 355,
-     KW_THROW = 356,
-     KW_TRUE = 357,
-     KW_TRY = 358,
-     KW_TYPEDEF = 359,
-     KW_TYPENAME = 360,
-     KW_UNION = 361,
-     KW_UNSIGNED = 362,
-     KW_USING = 363,
-     KW_VIRTUAL = 364,
-     KW_VOID = 365,
-     KW_VOLATILE = 366,
-     KW_WCHAR_T = 367,
-     KW_WHILE = 368,
-     START_CPP = 369,
-     START_CONST_EXPR = 370,
-     START_TYPE = 371
+     KW_MAKE_PROPERTY2 = 336,
+     KW_MAKE_SEQ = 337,
+     KW_MUTABLE = 338,
+     KW_NAMESPACE = 339,
+     KW_NEW = 340,
+     KW_NOEXCEPT = 341,
+     KW_NULLPTR = 342,
+     KW_OPERATOR = 343,
+     KW_PRIVATE = 344,
+     KW_PROTECTED = 345,
+     KW_PUBLIC = 346,
+     KW_REGISTER = 347,
+     KW_RETURN = 348,
+     KW_SHORT = 349,
+     KW_SIGNED = 350,
+     KW_SIZEOF = 351,
+     KW_STATIC = 352,
+     KW_STATIC_ASSERT = 353,
+     KW_STATIC_CAST = 354,
+     KW_STRUCT = 355,
+     KW_TEMPLATE = 356,
+     KW_THROW = 357,
+     KW_TRUE = 358,
+     KW_TRY = 359,
+     KW_TYPEDEF = 360,
+     KW_TYPENAME = 361,
+     KW_UNION = 362,
+     KW_UNSIGNED = 363,
+     KW_USING = 364,
+     KW_VIRTUAL = 365,
+     KW_VOID = 366,
+     KW_VOLATILE = 367,
+     KW_WCHAR_T = 368,
+     KW_WHILE = 369,
+     START_CPP = 370,
+     START_CONST_EXPR = 371,
+     START_TYPE = 372
    };
 #endif
 /* Tokens.  */
@@ -241,42 +242,43 @@ extern int cppyydebug;
 #define KW_LONG 333
 #define KW_LONGLONG 334
 #define KW_MAKE_PROPERTY 335
-#define KW_MAKE_SEQ 336
-#define KW_MUTABLE 337
-#define KW_NAMESPACE 338
-#define KW_NEW 339
-#define KW_NOEXCEPT 340
-#define KW_NULLPTR 341
-#define KW_OPERATOR 342
-#define KW_PRIVATE 343
-#define KW_PROTECTED 344
-#define KW_PUBLIC 345
-#define KW_REGISTER 346
-#define KW_RETURN 347
-#define KW_SHORT 348
-#define KW_SIGNED 349
-#define KW_SIZEOF 350
-#define KW_STATIC 351
-#define KW_STATIC_ASSERT 352
-#define KW_STATIC_CAST 353
-#define KW_STRUCT 354
-#define KW_TEMPLATE 355
-#define KW_THROW 356
-#define KW_TRUE 357
-#define KW_TRY 358
-#define KW_TYPEDEF 359
-#define KW_TYPENAME 360
-#define KW_UNION 361
-#define KW_UNSIGNED 362
-#define KW_USING 363
-#define KW_VIRTUAL 364
-#define KW_VOID 365
-#define KW_VOLATILE 366
-#define KW_WCHAR_T 367
-#define KW_WHILE 368
-#define START_CPP 369
-#define START_CONST_EXPR 370
-#define START_TYPE 371
+#define KW_MAKE_PROPERTY2 336
+#define KW_MAKE_SEQ 337
+#define KW_MUTABLE 338
+#define KW_NAMESPACE 339
+#define KW_NEW 340
+#define KW_NOEXCEPT 341
+#define KW_NULLPTR 342
+#define KW_OPERATOR 343
+#define KW_PRIVATE 344
+#define KW_PROTECTED 345
+#define KW_PUBLIC 346
+#define KW_REGISTER 347
+#define KW_RETURN 348
+#define KW_SHORT 349
+#define KW_SIGNED 350
+#define KW_SIZEOF 351
+#define KW_STATIC 352
+#define KW_STATIC_ASSERT 353
+#define KW_STATIC_CAST 354
+#define KW_STRUCT 355
+#define KW_TEMPLATE 356
+#define KW_THROW 357
+#define KW_TRUE 358
+#define KW_TRY 359
+#define KW_TYPEDEF 360
+#define KW_TYPENAME 361
+#define KW_UNION 362
+#define KW_UNSIGNED 363
+#define KW_USING 364
+#define KW_VIRTUAL 365
+#define KW_VOID 366
+#define KW_VOLATILE 367
+#define KW_WCHAR_T 368
+#define KW_WHILE 369
+#define START_CPP 370
+#define START_CONST_EXPR 371
+#define START_TYPE 372
 
 
 

+ 56 - 0
dtool/src/cppparser/cppBison.yxx

@@ -282,6 +282,7 @@ pop_struct() {
 %token KW_LONG
 %token KW_LONGLONG
 %token KW_MAKE_PROPERTY
+%token KW_MAKE_PROPERTY2
 %token KW_MAKE_SEQ
 %token KW_MUTABLE
 %token KW_NAMESPACE
@@ -529,6 +530,61 @@ declaration:
                                                          setter_func, current_scope, @1.file);
     current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
   }
+}
+        | KW_MAKE_PROPERTY2 '(' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';'
+{
+  CPPDeclaration *hasser = $5->find_symbol(current_scope, global_scope, current_lexer);
+  if (hasser == (CPPDeclaration *)NULL || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
+    yyerror("Reference to non-existent or invalid has-function: " + $5->get_fully_scoped_name(), @5);
+  }
+
+  CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
+  if (getter == (CPPDeclaration *)NULL || getter->get_subtype() != CPPDeclaration::ST_function_group) {
+    yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
+  }
+
+  if (hasser && getter) {
+    CPPMakeProperty *make_property;
+    make_property = new CPPMakeProperty($3,
+                                        hasser->as_function_group(),
+                                        getter->as_function_group(),
+                                        NULL, NULL,
+                                        current_scope, @1.file);
+    current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
+  }
+}
+        | KW_MAKE_PROPERTY2 '(' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';'
+{
+  CPPDeclaration *hasser = $5->find_symbol(current_scope, global_scope, current_lexer);
+  if (hasser == (CPPDeclaration *)NULL || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
+    yyerror("Reference to non-existent or invalid has-function: " + $5->get_fully_scoped_name(), @5);
+  }
+
+  CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
+  if (getter == (CPPDeclaration *)NULL || getter->get_subtype() != CPPDeclaration::ST_function_group) {
+    yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
+  }
+
+  CPPDeclaration *setter = $9->find_symbol(current_scope, global_scope, current_lexer);
+  if (setter == (CPPDeclaration *)NULL || setter->get_subtype() != CPPDeclaration::ST_function_group) {
+    yyerror("Reference to non-existent or invalid setter: " + $9->get_fully_scoped_name(), @9);
+  }
+
+  CPPDeclaration *clearer = $11->find_symbol(current_scope, global_scope, current_lexer);
+  if (clearer == (CPPDeclaration *)NULL || clearer->get_subtype() != CPPDeclaration::ST_function_group) {
+    yyerror("Reference to non-existent or invalid clear-function: " + $11->get_fully_scoped_name(), @11);
+  }
+
+  if (hasser && getter && setter && clearer) {
+    CPPMakeProperty *make_property;
+    make_property = new CPPMakeProperty($3,
+                                        hasser->as_function_group(),
+                                        getter->as_function_group(),
+                                        setter->as_function_group(),
+                                        clearer->as_function_group(),
+                                        current_scope, @1.file);
+    current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
+  }
 }
         | KW_MAKE_SEQ '(' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';'
 {

+ 44 - 6
dtool/src/cppparser/cppMakeProperty.cxx

@@ -26,8 +26,30 @@ CPPMakeProperty(CPPIdentifier *ident,
                 CPPScope *current_scope, const CPPFile &file) :
   CPPDeclaration(file),
   _ident(ident),
-  _getter(getter),
-  _setter(setter)
+  _has_function(NULL),
+  _get_function(getter),
+  _set_function(setter),
+  _clear_function(NULL)
+{
+  _ident->_native_scope = current_scope;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: CPPMakeProperty::Constructor
+//       Access: Public
+//  Description:
+////////////////////////////////////////////////////////////////////
+CPPMakeProperty::
+CPPMakeProperty(CPPIdentifier *ident,
+                CPPFunctionGroup *hasser, CPPFunctionGroup *getter,
+                CPPFunctionGroup *setter, CPPFunctionGroup *clearer,
+                CPPScope *current_scope, const CPPFile &file) :
+  CPPDeclaration(file),
+  _ident(ident),
+  _has_function(hasser),
+  _get_function(getter),
+  _set_function(setter),
+  _clear_function(clearer)
 {
   _ident->_native_scope = current_scope;
 }
@@ -69,12 +91,28 @@ get_fully_scoped_name() const {
 ////////////////////////////////////////////////////////////////////
 void CPPMakeProperty::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
-  out << "__make_property(" << _ident->get_local_name(scope)
-      << ", " << _getter->_name;
+  out << "__make_property";
+
+  if (_has_function != NULL) {
+    out.put('2');
+  }
+
+  out << "(" << _ident->get_local_name(scope);
 
-  if (_setter != NULL) {
-    out << ", " << _setter->_name;
+  if (_has_function != NULL) {
+    out << ", " << _has_function->_name;
   }
+
+  out << ", " << _get_function->_name;
+
+  if (_set_function != NULL) {
+    out << ", " << _set_function->_name;
+  }
+
+  if (_clear_function != NULL) {
+    out << ", " << _clear_function->_name;
+  }
+
   out << ");";
 }
 

+ 9 - 2
dtool/src/cppparser/cppMakeProperty.h

@@ -34,6 +34,11 @@ public:
                   CPPFunctionGroup *getter, CPPFunctionGroup *setter,
                   CPPScope *current_scope, const CPPFile &file);
 
+  CPPMakeProperty(CPPIdentifier *ident,
+                  CPPFunctionGroup *hasser, CPPFunctionGroup *getter,
+                  CPPFunctionGroup *setter, CPPFunctionGroup *clearer,
+                  CPPScope *current_scope, const CPPFile &file);
+
   virtual string get_simple_name() const;
   virtual string get_local_name(CPPScope *scope = NULL) const;
   virtual string get_fully_scoped_name() const;
@@ -45,8 +50,10 @@ public:
   virtual CPPMakeProperty *as_make_property();
 
   CPPIdentifier *_ident;
-  CPPFunctionGroup *_getter;
-  CPPFunctionGroup *_setter;
+  CPPFunctionGroup *_has_function;
+  CPPFunctionGroup *_get_function;
+  CPPFunctionGroup *_set_function;
+  CPPFunctionGroup *_clear_function;
 };
 
 #endif

+ 1 - 0
dtool/src/cppparser/cppPreprocessor.cxx

@@ -2535,6 +2535,7 @@ check_keyword(const string &name) {
   if (name == "int") return KW_INT;
   if (name == "long") return KW_LONG;
   if (name == "__make_property") return KW_MAKE_PROPERTY;
+  if (name == "__make_property2") return KW_MAKE_PROPERTY2;
   if (name == "__make_seq") return KW_MAKE_SEQ;
   if (name == "mutable") return KW_MUTABLE;
   if (name == "namespace") return KW_NAMESPACE;

+ 2 - 0
dtool/src/dtoolbase/dtoolbase.h

@@ -416,6 +416,7 @@ typedef struct _object PyObject;
 #define END_PUBLISH __end_publish
 #define BLOCKING __blocking
 #define MAKE_PROPERTY(property_name, ...) __make_property(property_name, __VA_ARGS__)
+#define MAKE_PROPERTY2(property_name, ...) __make_property2(property_name, __VA_ARGS__)
 #define MAKE_SEQ(seq_name, num_name, element_name) __make_seq(seq_name, num_name, element_name)
 #undef USE_STL_ALLOCATOR  /* Don't try to parse these template classes in interrogate. */
 #define EXTENSION(x) __extension x
@@ -425,6 +426,7 @@ typedef struct _object PyObject;
 #define END_PUBLISH
 #define BLOCKING
 #define MAKE_PROPERTY(property_name, ...)
+#define MAKE_PROPERTY2(property_name, ...)
 #define MAKE_SEQ(seq_name, num_name, element_name)
 #define EXTENSION(x)
 #define EXTEND

+ 3 - 1
dtool/src/interrogate/interfaceMaker.cxx

@@ -96,7 +96,9 @@ InterfaceMaker::Property::
 Property(const InterrogateElement &ielement) :
   _ielement(ielement),
   _getter(NULL),
-  _setter(NULL)
+  _setter(NULL),
+  _has_function(NULL),
+  _clear_function(NULL)
 {
 }
 

+ 2 - 0
dtool/src/interrogate/interfaceMaker.h

@@ -133,6 +133,8 @@ public:
     const InterrogateElement &_ielement;
     Function *_getter;
     Function *_setter;
+    Function *_has_function;
+    Function *_clear_function;
   };
   typedef vector<Property *> Properties;
 

+ 97 - 15
dtool/src/interrogate/interfaceMakerPythonNative.cxx

@@ -1045,22 +1045,8 @@ write_class_details(ostream &out, Object *obj) {
   Properties::const_iterator pit;
   for (pit = obj->_properties.begin(); pit != obj->_properties.end(); ++pit) {
     Property *property = (*pit);
-    const InterrogateElement &ielem = property->_ielement;
-    string expected_params;
-
-    if (property->_getter != NULL) {
-      std::string fname = "PyObject *Dtool_" + ClassName + "_" + ielem.get_name() + "_Getter(PyObject *self, void *)";
-      write_function_for_name(out, obj, property->_getter->_remaps,
-                              fname, expected_params, true,
-                              AT_no_args, RF_pyobject | RF_err_null);
-    }
 
-    if (property->_setter != NULL) {
-      std::string fname = "int Dtool_" + ClassName + "_" + ielem.get_name() + "_Setter(PyObject *self, PyObject *arg, void *)";
-      write_function_for_name(out, obj, property->_setter->_remaps,
-                              fname, expected_params, true,
-                              AT_single_arg, RF_int);
-    }
+    write_getset(out, obj, property);
   }
 
   // Write the constructors.
@@ -6443,6 +6429,86 @@ write_make_seq(ostream &out, Object *obj, const std::string &ClassName,
     "\n";
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: InterfaceMakerPythonName::write_getset
+//       Access: Public
+//  Description: Generates the synthetic method described by the
+//               MAKE_PROPERTY() macro.
+////////////////////////////////////////////////////////////////////
+void InterfaceMakerPythonNative::
+write_getset(ostream &out, Object *obj, Property *property) {
+
+  string ClassName = make_safe_name(obj->_itype.get_scoped_name());
+  std::string cClassName = obj->_itype.get_true_name();
+
+  const InterrogateElement &ielem = property->_ielement;
+
+  if (property->_getter != NULL) {
+    FunctionRemap *remap = property->_getter->_remaps.front();
+
+    out << "PyObject *Dtool_" + ClassName + "_" + ielem.get_name() + "_Getter(PyObject *self, void *) {\n";
+    if (remap->_const_method) {
+      out << "  const " << cClassName  << " *local_this = NULL;\n";
+      out << "  if (!Dtool_Call_ExtractThisPointer(self, Dtool_" << ClassName << ", (void **)&local_this)) {\n";
+    } else {
+      out << "  " << cClassName  << " *local_this = NULL;\n";
+      out << "  if (!Dtool_Call_ExtractThisPointer_NonConst(self, Dtool_" << ClassName << ", (void **)&local_this, \""
+          << classNameFromCppName(cClassName, false) << "." << ielem.get_name() << "\")) {\n";
+    }
+    out << "    return NULL;\n";
+    out << "  }\n\n";
+
+    if (property->_has_function != NULL) {
+      out << "  if (!local_this->" << property->_has_function->_ifunc.get_name() << "()) {\n"
+          << "    Py_INCREF(Py_None);\n"
+          << "    return Py_None;\n"
+          << "  }\n";
+    }
+
+    std::set<FunctionRemap*> remaps;
+    remaps.insert(remap);
+
+    string expected_params;
+    write_function_forset(out, remaps, 0, 0,
+                          expected_params, 2, false, true, AT_no_args,
+                          RF_pyobject | RF_err_null, false, false);
+    out << "}\n\n";
+  }
+
+  if (property->_setter != NULL) {
+    out << "int Dtool_" + ClassName + "_" + ielem.get_name() + "_Setter(PyObject *self, PyObject *arg, void *) {\n";
+    out << "  " << cClassName  << " *local_this = NULL;\n";
+    out << "  if (!Dtool_Call_ExtractThisPointer_NonConst(self, Dtool_" << ClassName << ", (void **)&local_this, \""
+        << classNameFromCppName(cClassName, false) << "." << ielem.get_name() << "\")) {\n";
+    out << "    return -1;\n";
+    out << "  }\n\n";
+
+    if (property->_clear_function != NULL) {
+      out << "  if (arg == Py_None) {\n"
+          << "    local_this->" << property->_clear_function->_ifunc.get_name() << "();\n"
+          << "    return 0;\n"
+          << "  }\n";
+    }
+
+    std::set<FunctionRemap*> remaps;
+    remaps.insert(property->_setter->_remaps.begin(),
+                  property->_setter->_remaps.end());
+
+    string expected_params;
+    write_function_forset(out, remaps, 1, 1,
+                          expected_params, 2, true, true, AT_single_arg,
+                          RF_int, false, false);
+
+    out << "  if (!_PyErr_OCCURRED()) {\n";
+    out << "    Dtool_Raise_BadArgumentsError(\n";
+    output_quoted(out, 6, expected_params);
+    out << ");\n";
+    out << "  }\n";
+    out << "  return -1;\n";
+    out << "}\n\n";
+  }
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: InterfaceMakerPythonNative::record_object
 //       Access: Protected
@@ -6551,6 +6617,22 @@ record_object(TypeIndex type_index) {
       }
     }
 
+    if (ielement.has_has_function()) {
+      FunctionIndex func_index = ielement.get_has_function();
+      Function *has_function = record_function(itype, func_index);
+      if (is_function_legal(has_function)) {
+        property->_has_function = has_function;
+      }
+    }
+
+    if (ielement.has_clear_function()) {
+      FunctionIndex func_index = ielement.get_clear_function();
+      Function *clear_function = record_function(itype, func_index);
+      if (is_function_legal(clear_function)) {
+        property->_clear_function = clear_function;
+      }
+    }
+
     if (property->_getter != NULL) {
       object->_properties.push_back(property);
     } else {

+ 1 - 0
dtool/src/interrogate/interfaceMakerPythonNative.h

@@ -170,6 +170,7 @@ private:
 
   void write_make_seq(ostream &out, Object *obj, const std::string &ClassName,
                       const std::string &cClassName, MakeSeq *make_seq);
+  void write_getset(ostream &out, Object *obj, Property *property);
 
   void write_class_prototypes(ostream &out) ;
   void write_class_declarations(ostream &out, ostream *out_h, Object *obj);

+ 61 - 5
dtool/src/interrogate/interrogateBuilder.cxx

@@ -1927,14 +1927,16 @@ get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CP
   CPPInstance *getter = NULL;
   CPPType *return_type = NULL;
 
-  CPPFunctionGroup *fgroup = make_property->_getter;
+  CPPFunctionGroup *fgroup = make_property->_get_function;
   if (fgroup != NULL) {
     CPPFunctionGroup::Instances::const_iterator fi;
     for (fi = fgroup->_instances.begin(); fi != fgroup->_instances.end(); ++fi) {
       CPPInstance *function = (*fi);
-      CPPFunctionType *ftype =
-        function->_type->as_function_type();
-      if (ftype != NULL/* && ftype->_parameters->_parameters.size() == 0*/) {
+      CPPFunctionType *ftype = function->_type->as_function_type();
+
+      // The getter must either take no arguments, or all defaults.
+      if (ftype != NULL && (ftype->_parameters->_parameters.size() == 0 ||
+          ftype->_parameters->_parameters[0]->_initializer != NULL)) {
         getter = function;
         return_type = ftype->_return_type;
 
@@ -1953,6 +1955,29 @@ get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CP
     }
   }
 
+  // Find the "hasser".
+  CPPInstance *hasser = NULL;
+
+  fgroup = make_property->_has_function;
+  if (fgroup != NULL) {
+    CPPFunctionGroup::Instances::const_iterator fi;
+    for (fi = fgroup->_instances.begin(); fi != fgroup->_instances.end(); ++fi) {
+      CPPInstance *function = (*fi);
+      CPPFunctionType *ftype =
+        function->_type->as_function_type();
+      if (ftype != NULL && TypeManager::is_bool(ftype->_return_type)) {
+        hasser = function;
+        break;
+      }
+    }
+
+    if (hasser == NULL || return_type == NULL) {
+      cerr << "No instance of has-function '"
+           << fgroup->_name << "' is suitable!\n";
+      return 0;
+    }
+  }
+
   InterrogateDatabase *idb = InterrogateDatabase::get_ptr();
   // It isn't here, so we'll have to define it.
   ElementIndex index = idb->get_next_index();
@@ -1975,6 +2000,18 @@ get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CP
     iproperty._flags |= InterrogateElement::F_has_getter;
     iproperty._getter = get_function(getter, "", struct_type,
                                      struct_type->get_scope(), 0);
+    if (iproperty._getter == 0) {
+      cerr << "failed " << *getter << "\n";
+    }
+  }
+
+  if (hasser != NULL) {
+    iproperty._flags |= InterrogateElement::F_has_has_function;
+    iproperty._has_function = get_function(hasser, "", struct_type,
+                                           struct_type->get_scope(), 0);
+    if (iproperty._has_function == 0) {
+      cerr << "failed " << *hasser << "\n";
+    }
   }
 
   // See if there happens to be a comment before the MAKE_PROPERTY macro.
@@ -1983,7 +2020,7 @@ get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CP
   }
 
   // Now look for setters.
-  fgroup = make_property->_setter;
+  fgroup = make_property->_set_function;
   if (fgroup != NULL) {
     CPPFunctionGroup::Instances::const_iterator fi;
     for (fi = fgroup->_instances.begin(); fi != fgroup->_instances.end(); ++fi) {
@@ -1991,6 +2028,25 @@ get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CP
       iproperty._flags |= InterrogateElement::F_has_setter;
       iproperty._setter = get_function(function, "", struct_type,
                                        struct_type->get_scope(), 0);
+      if (iproperty._setter == 0) {
+        cerr << "failed " << *function << "\n";
+      }
+      break;
+    }
+  }
+
+  fgroup = make_property->_clear_function;
+  if (fgroup != NULL) {
+    CPPFunctionGroup::Instances::const_iterator fi;
+    for (fi = fgroup->_instances.begin(); fi != fgroup->_instances.end(); ++fi) {
+      CPPInstance *function = (*fi);
+      iproperty._flags |= InterrogateElement::F_has_clear_function;
+      iproperty._clear_function = get_function(function, "", struct_type,
+                                               struct_type->get_scope(), 0);
+      if (iproperty._clear_function == 0) {
+        cerr << "failed " << *function << "\n";
+      }
+      break;
     }
   }
 

+ 1 - 1
dtool/src/interrogatedb/interrogateDatabase.cxx

@@ -21,7 +21,7 @@ InterrogateDatabase *InterrogateDatabase::_global_ptr = NULL;
 int InterrogateDatabase::_file_major_version = 0;
 int InterrogateDatabase::_file_minor_version = 0;
 int InterrogateDatabase::_current_major_version = 3;
-int InterrogateDatabase::_current_minor_version = 0;
+int InterrogateDatabase::_current_minor_version = 1;
 
 ////////////////////////////////////////////////////////////////////
 //     Function: InterrogateDatabase::Constructor

+ 44 - 0
dtool/src/interrogatedb/interrogateElement.I

@@ -26,6 +26,8 @@ InterrogateElement(InterrogateModuleDef *def) :
   _type = 0;
   _getter = 0;
   _setter = 0;
+  _has_function = 0;
+  _clear_function = 0;
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -52,6 +54,8 @@ operator = (const InterrogateElement &copy) {
   _type = copy._type;
   _getter = copy._getter;
   _setter = copy._setter;
+  _has_function = copy._has_function;
+  _clear_function = copy._clear_function;
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -156,6 +160,46 @@ get_setter() const {
   return _setter;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Element: InterrogateElement::has_has_function
+//       Access: Public
+//  Description:
+////////////////////////////////////////////////////////////////////
+INLINE bool InterrogateElement::
+has_has_function() const {
+  return (_flags & F_has_has_function) != 0;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Element: InterrogateElement::get_has_function
+//       Access: Public
+//  Description:
+////////////////////////////////////////////////////////////////////
+INLINE FunctionIndex InterrogateElement::
+get_has_function() const {
+  return _has_function;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Element: InterrogateElement::has_clear_function
+//       Access: Public
+//  Description:
+////////////////////////////////////////////////////////////////////
+INLINE bool InterrogateElement::
+has_clear_function() const {
+  return (_flags & F_has_clear_function) != 0;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Element: InterrogateElement::get_clear_function
+//       Access: Public
+//  Description:
+////////////////////////////////////////////////////////////////////
+INLINE FunctionIndex InterrogateElement::
+get_clear_function() const {
+  return _clear_function;
+}
+
 
 INLINE ostream &
 operator << (ostream &out, const InterrogateElement &element) {

+ 6 - 1
dtool/src/interrogatedb/interrogateElement.cxx

@@ -29,7 +29,9 @@ output(ostream &out) const {
   out << _flags << " "
       << _type << " "
       << _getter << " "
-      << _setter << " ";
+      << _setter << " "
+      << _has_function << " "
+      << _clear_function << " ";
   idf_output_string(out, _scoped_name);
   idf_output_string(out, _comment, '\n');
 }
@@ -44,6 +46,9 @@ void InterrogateElement::
 input(istream &in) {
   InterrogateComponent::input(in);
   in >> _flags >> _type >> _getter >> _setter;
+  if (InterrogateDatabase::get_file_minor_version() >= 1) {
+    in >> _has_function >> _clear_function;
+  }
   idf_input_string(in, _scoped_name);
   idf_input_string(in, _comment);
 }

+ 9 - 1
dtool/src/interrogatedb/interrogateElement.h

@@ -45,6 +45,10 @@ public:
   INLINE FunctionIndex get_getter() const;
   INLINE bool has_setter() const;
   INLINE FunctionIndex get_setter() const;
+  INLINE bool has_has_function() const;
+  INLINE FunctionIndex get_has_function() const;
+  INLINE bool has_clear_function() const;
+  INLINE FunctionIndex get_clear_function() const;
 
   void output(ostream &out) const;
   void input(istream &in);
@@ -55,7 +59,9 @@ private:
   enum Flags {
     F_global          = 0x0001,
     F_has_getter      = 0x0002,
-    F_has_setter      = 0x0004
+    F_has_setter      = 0x0004,
+    F_has_has_function= 0x0008,
+    F_has_clear_function= 0x0010,
   };
 
   int _flags;
@@ -64,6 +70,8 @@ private:
   TypeIndex _type;
   FunctionIndex _getter;
   FunctionIndex _setter;
+  FunctionIndex _has_function;
+  FunctionIndex _clear_function;
 
   friend class InterrogateBuilder;
 };

+ 12 - 0
panda/src/display/displayRegion.I

@@ -498,6 +498,18 @@ get_pixel_height(int i) const {
   return cdata->_regions[i]._pixels[3] - cdata->_regions[i]._pixels[2];
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: DisplayRegion::get_pixel_size
+//       Access: Published
+//  Description: Returns the size of the DisplayRegion in pixels.
+////////////////////////////////////////////////////////////////////
+INLINE LVecBase2i DisplayRegion::
+get_pixel_size(int i) const {
+  CDReader cdata(_cycler);
+  return LVecBase2i(cdata->_regions[i]._pixels[1] - cdata->_regions[i]._pixels[0],
+                    cdata->_regions[i]._pixels[3] - cdata->_regions[i]._pixels[2]);
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: DisplayRegion::get_pixels
 //       Access: Public

+ 8 - 0
panda/src/display/displayRegion.h

@@ -86,10 +86,14 @@ PUBLISHED:
   INLINE void set_dimensions(int i, PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat t);
   INLINE void set_dimensions(const LVecBase4 &dimensions);
   virtual void set_dimensions(int i, const LVecBase4 &dimensions);
+  MAKE_PROPERTY(dimensions, get_dimensions, set_dimensions);
 
   INLINE GraphicsOutput *get_window() const;
   GraphicsPipe *get_pipe() const;
   virtual bool is_stereo() const;
+  MAKE_PROPERTY(window, get_window);
+  MAKE_PROPERTY(pipe, get_pipe);
+  MAKE_PROPERTY(stereo, is_stereo);
 
   virtual void set_camera(const NodePath &camera);
   INLINE NodePath get_camera(Thread *current_thread = Thread::get_current_thread()) const;
@@ -140,13 +144,17 @@ PUBLISHED:
   INLINE void set_cull_callback(CallbackObject *object);
   INLINE void clear_cull_callback();
   INLINE CallbackObject *get_cull_callback() const;
+  MAKE_PROPERTY(cull_callback, get_cull_callback, set_cull_callback);
 
   INLINE void set_draw_callback(CallbackObject *object);
   INLINE void clear_draw_callback();
   INLINE CallbackObject *get_draw_callback() const;
+  MAKE_PROPERTY(draw_callback, get_draw_callback, set_draw_callback);
 
   INLINE int get_pixel_width(int i = 0) const;
   INLINE int get_pixel_height(int i = 0) const;
+  INLINE LVecBase2i get_pixel_size(int i = 0) const;
+  MAKE_PROPERTY(pixel_size, get_pixel_size);
 
   virtual void output(ostream &out) const;
 

+ 1 - 1
panda/src/display/graphicsStateGuardian.cxx

@@ -434,7 +434,7 @@ set_gamma(PN_stdfloat gamma) {
 //  Description: Get the current gamma setting.
 ////////////////////////////////////////////////////////////////////
 PN_stdfloat GraphicsStateGuardian::
-get_gamma(PN_stdfloat gamma) {
+get_gamma() const {
   return _gamma;
 }
 

+ 1 - 1
panda/src/display/graphicsStateGuardian.h

@@ -245,7 +245,7 @@ PUBLISHED:
   MAKE_PROPERTY(prepared_objects, get_prepared_objects);
 
   virtual bool set_gamma(PN_stdfloat gamma);
-  PN_stdfloat get_gamma(PN_stdfloat gamma);
+  PN_stdfloat get_gamma() const;
   virtual void restore_gamma();
   MAKE_PROPERTY(gamma, get_gamma, set_gamma);
 

+ 2 - 0
panda/src/display/stereoDisplayRegion.h

@@ -68,6 +68,8 @@ PUBLISHED:
 
   INLINE DisplayRegion *get_left_eye();
   INLINE DisplayRegion *get_right_eye();
+  MAKE_PROPERTY(left_eye, get_left_eye);
+  MAKE_PROPERTY(right_eye, get_right_eye);
 
 private:
   PT(DisplayRegion) _left_eye;

+ 25 - 0
panda/src/display/windowProperties.h

@@ -68,6 +68,7 @@ PUBLISHED:
   INLINE int get_y_origin() const;
   INLINE bool has_origin() const;
   INLINE void clear_origin();
+  MAKE_PROPERTY2(origin, has_origin, get_origin, set_origin, clear_origin);
 
   INLINE void set_size(const LVector2i &size);
   INLINE void set_size(int x_size, int y_size);
@@ -76,41 +77,55 @@ PUBLISHED:
   INLINE int get_y_size() const;
   INLINE bool has_size() const;
   INLINE void clear_size();
+  MAKE_PROPERTY2(size, has_size, get_size, set_size, clear_size);
 
   INLINE bool has_mouse_mode() const;
   INLINE void set_mouse_mode(MouseMode mode);
   INLINE MouseMode get_mouse_mode() const;
   INLINE void clear_mouse_mode();
+  MAKE_PROPERTY2(mouse_mode, has_mouse_mode, get_mouse_mode,
+                             set_mouse_mode, clear_mouse_mode);
 
   INLINE void set_title(const string &title);
   INLINE const string &get_title() const;
   INLINE bool has_title() const;
   INLINE void clear_title();
+  MAKE_PROPERTY2(title, has_title, get_title, set_title, clear_title);
 
   INLINE void set_undecorated(bool undecorated);
   INLINE bool get_undecorated() const;
   INLINE bool has_undecorated() const;
   INLINE void clear_undecorated();
+  MAKE_PROPERTY2(undecorated, has_undecorated, get_undecorated,
+                              set_undecorated, clear_undecorated);
 
   INLINE void set_fixed_size(bool fixed_size);
   INLINE bool get_fixed_size() const;
   INLINE bool has_fixed_size() const;
   INLINE void clear_fixed_size();
+  MAKE_PROPERTY2(fixed_size, has_fixed_size, get_fixed_size,
+                             set_fixed_size, clear_fixed_size);
 
   INLINE void set_fullscreen(bool fullscreen);
   INLINE bool get_fullscreen() const;
   INLINE bool has_fullscreen() const;
   INLINE void clear_fullscreen();
+  MAKE_PROPERTY2(fullscreen, has_fullscreen, get_fullscreen,
+                             set_fullscreen, clear_fullscreen);
 
   INLINE void set_foreground(bool foreground);
   INLINE bool get_foreground() const;
   INLINE bool has_foreground() const;
   INLINE void clear_foreground();
+  MAKE_PROPERTY2(foreground, has_foreground, get_foreground,
+                             set_foreground, clear_foreground);
 
   INLINE void set_minimized(bool minimized);
   INLINE bool get_minimized() const;
   INLINE bool has_minimized() const;
   INLINE void clear_minimized();
+  MAKE_PROPERTY2(minimized, has_minimized, get_minimized,
+                            set_minimized, clear_minimized);
 
   INLINE void set_raw_mice(bool raw_mice);
   INLINE bool get_raw_mice() const;
@@ -121,32 +136,42 @@ PUBLISHED:
   INLINE bool get_open() const;
   INLINE bool has_open() const;
   INLINE void clear_open();
+  MAKE_PROPERTY2(open, has_open, get_open, set_open, clear_open);
 
   INLINE void set_cursor_hidden(bool cursor_hidden);
   INLINE bool get_cursor_hidden() const;
   INLINE bool has_cursor_hidden() const;
   INLINE void clear_cursor_hidden();
+  MAKE_PROPERTY2(cursor_hidden, has_cursor_hidden, get_cursor_hidden,
+                                set_cursor_hidden, clear_cursor_hidden);
 
   INLINE void set_icon_filename(const Filename &icon_filename);
   INLINE const Filename &get_icon_filename() const;
   INLINE bool has_icon_filename() const;
   INLINE void clear_icon_filename();
+  MAKE_PROPERTY2(icon_filename, has_icon_filename, get_icon_filename,
+                                set_icon_filename, clear_icon_filename);
 
   INLINE void set_cursor_filename(const Filename &cursor_filename);
   INLINE const Filename &get_cursor_filename() const;
   INLINE bool has_cursor_filename() const;
   INLINE void clear_cursor_filename();
+  MAKE_PROPERTY2(cursor_filename, has_cursor_filename, get_cursor_filename,
+                                  set_cursor_filename, clear_cursor_filename);
 
   INLINE void set_z_order(ZOrder z_order);
   INLINE ZOrder get_z_order() const;
   INLINE bool has_z_order() const;
   INLINE void clear_z_order();
+  MAKE_PROPERTY2(z_order, has_z_order, get_z_order, set_z_order, clear_z_order);
 
   void set_parent_window(size_t parent);
   INLINE void set_parent_window(WindowHandle *parent_window = NULL);
   INLINE WindowHandle *get_parent_window() const;
   INLINE bool has_parent_window() const;
   INLINE void clear_parent_window();
+  MAKE_PROPERTY2(parent_window, has_parent_window, get_parent_window,
+                                set_parent_window, clear_parent_window);
 
   void add_properties(const WindowProperties &other);
 

+ 5 - 0
panda/src/express/patchfile.h

@@ -57,17 +57,22 @@ PUBLISHED:
              const Filename &target_file);
 
   INLINE PN_stdfloat get_progress() const;
+  MAKE_PROPERTY(progress, get_progress);
 
   INLINE void set_allow_multifile(bool allow_multifile);
   INLINE bool get_allow_multifile();
+  MAKE_PROPERTY(allow_multifile, get_allow_multifile, set_allow_multifile);
 
   INLINE void set_footprint_length(int length);
   INLINE int get_footprint_length();
   INLINE void reset_footprint_length();
+  MAKE_PROPERTY(footprint_length, get_footprint_length, set_footprint_length);
 
   INLINE bool has_source_hash() const;
   INLINE const HashVal &get_source_hash() const;
   INLINE const HashVal &get_result_hash() const;
+  MAKE_PROPERTY2(source_hash, has_source_hash, get_source_hash);
+  MAKE_PROPERTY(result_hash, get_result_hash);
 
 private:
   int internal_read_header(const Filename &patch_file);

+ 5 - 0
panda/src/gobj/bufferContext.h

@@ -49,6 +49,11 @@ PUBLISHED:
   INLINE bool get_active() const;
   INLINE bool get_resident() const;
 
+  MAKE_PROPERTY(data_size_bytes, get_data_size_bytes);
+  MAKE_PROPERTY(modified, get_modified);
+  MAKE_PROPERTY(active, get_active);
+  MAKE_PROPERTY(resident, get_resident);
+
 public:
   INLINE void set_active(bool flag);
   INLINE void set_resident(bool flag);

+ 7 - 0
panda/src/gobj/geom.h

@@ -75,9 +75,13 @@ PUBLISHED:
   INLINE PrimitiveType get_primitive_type() const;
   INLINE ShadeModel get_shade_model() const;
   INLINE int get_geom_rendering() const;
+  MAKE_PROPERTY(primitive_type, get_primitive_type);
+  MAKE_PROPERTY(shade_model, get_shade_model);
+  MAKE_PROPERTY(geom_rendering, get_geom_rendering);
 
   INLINE UsageHint get_usage_hint() const;
   void set_usage_hint(UsageHint usage_hint);
+  MAKE_PROPERTY(usage_hint, get_usage_hint, set_usage_hint);
 
   INLINE CPT(GeomVertexData) get_vertex_data(Thread *current_thread = Thread::get_current_thread()) const;
   PT(GeomVertexData) modify_vertex_data();
@@ -118,6 +122,8 @@ PUBLISHED:
 
   int get_num_bytes() const;
   INLINE UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const;
+  MAKE_PROPERTY(num_bytes, get_num_bytes);
+  MAKE_PROPERTY(modified, get_modified);
 
   bool request_resident() const;
 
@@ -132,6 +138,7 @@ PUBLISHED:
   INLINE BoundingVolume::BoundsType get_bounds_type() const;
   INLINE void set_bounds(const BoundingVolume *volume);
   INLINE void clear_bounds();
+  MAKE_PROPERTY(bounds_type, get_bounds_type, set_bounds_type);
 
   virtual void output(ostream &out) const;
   virtual void write(ostream &out, int indent_level = 0) const;

+ 1 - 0
panda/src/gobj/geomContext.h

@@ -42,6 +42,7 @@ public:
 
 PUBLISHED:
   INLINE Geom *get_geom() const;
+  MAKE_PROPERTY(geom, get_geom);
 
 public:
   // This cannot be a PT(Geom), because the geom and the GSG

+ 15 - 0
panda/src/gobj/geomPrimitive.h

@@ -76,15 +76,20 @@ PUBLISHED:
 
   virtual PrimitiveType get_primitive_type() const=0;
   virtual int get_geom_rendering() const;
+  MAKE_PROPERTY(primitive_type, get_primitive_type);
+  MAKE_PROPERTY(geom_rendering, get_geom_rendering);
 
   INLINE ShadeModel get_shade_model() const;
   INLINE void set_shade_model(ShadeModel shade_model);
+  MAKE_PROPERTY(shade_model, get_shade_model);
 
   INLINE UsageHint get_usage_hint() const;
   void set_usage_hint(UsageHint usage_hint);
+  MAKE_PROPERTY(usage_hint, get_usage_hint);
 
   INLINE NumericType get_index_type() const;
   void set_index_type(NumericType index_type);
+  MAKE_PROPERTY(index_type, get_index_type);
 
   // The following published methods are provided for safe, high-level
   // iteration through the vertices and sub-primitives within the
@@ -140,6 +145,9 @@ PUBLISHED:
   int get_num_bytes() const;
   INLINE int get_data_size_bytes() const;
   INLINE UpdateSeq get_modified() const;
+  MAKE_PROPERTY(num_bytes, get_num_bytes);
+  MAKE_PROPERTY(data_size_bytes, get_data_size_bytes);
+  MAKE_PROPERTY(modified, get_modified);
 
   bool request_resident() const;
 
@@ -166,6 +174,8 @@ PUBLISHED:
 
   INLINE int get_index_stride() const;
   INLINE int get_strip_cut_index() const;
+  MAKE_PROPERTY(index_stride, get_index_stride);
+  MAKE_PROPERTY(strip_cut_index, get_strip_cut_index);
 
   INLINE CPTA_int get_ends() const;
   PTA_int modify_ends();
@@ -173,6 +183,8 @@ PUBLISHED:
 
   INLINE CPT(GeomVertexArrayData) get_mins() const;
   INLINE CPT(GeomVertexArrayData) get_maxs() const;
+  MAKE_PROPERTY(mins, get_mins);
+  MAKE_PROPERTY(maxs, get_maxs);
 
   void set_minmax(int min_vertex, int max_vertex,
                   GeomVertexArrayData *mins, GeomVertexArrayData *maxs);
@@ -181,6 +193,9 @@ PUBLISHED:
   virtual int get_num_vertices_per_primitive() const;
   virtual int get_min_num_vertices_per_primitive() const;
   virtual int get_num_unused_vertices_per_primitive() const;
+  MAKE_PROPERTY(num_vertices_per_primitive, get_num_vertices_per_primitive);
+  MAKE_PROPERTY(min_num_vertices_per_primitive, get_min_num_vertices_per_primitive);
+  MAKE_PROPERTY(num_unused_vertices_per_primitive, get_num_unused_vertices_per_primitive);
 
 public:
   void prepare(PreparedGraphicsObjects *prepared_objects);

+ 4 - 1
panda/src/gobj/geomVertexAnimationSpec.h

@@ -46,9 +46,12 @@ PUBLISHED:
   INLINE void operator = (const GeomVertexAnimationSpec &other);
 
   INLINE AnimationType get_animation_type() const;
+  MAKE_PROPERTY(animation_type, get_animation_type);
 
   INLINE int get_num_transforms() const;
   INLINE bool get_indexed_transforms() const;
+  MAKE_PROPERTY(num_transforms, get_num_transforms);
+  MAKE_PROPERTY(indexed_transforms, get_indexed_transforms);
 
   INLINE void set_none();
   INLINE void set_panda();
@@ -66,7 +69,7 @@ public:
   void write_datagram(BamWriter *manager, Datagram &dg);
   void fillin(DatagramIterator &scan, BamReader *manager);
 
-private:  
+private:
   AnimationType _animation_type;
 
   int _num_transforms;

+ 9 - 0
panda/src/gobj/geomVertexArrayData.h

@@ -78,9 +78,11 @@ PUBLISHED:
   int compare_to(const GeomVertexArrayData &other) const;
 
   INLINE const GeomVertexArrayFormat *get_array_format() const;
+  MAKE_PROPERTY(array_format, get_array_format);
 
   INLINE UsageHint get_usage_hint() const;
   void set_usage_hint(UsageHint usage_hint);
+  MAKE_PROPERTY(usage_hint, get_usage_hint, set_usage_hint);
 
   INLINE bool has_column(const InternalName *name) const;
 
@@ -92,6 +94,8 @@ PUBLISHED:
 
   INLINE size_t get_data_size_bytes() const;
   INLINE UpdateSeq get_modified() const;
+  MAKE_PROPERTY(data_size_bytes, get_data_size_bytes);
+  MAKE_PROPERTY(modified, get_modified);
 
   void output(ostream &out) const;
   void write(ostream &out, int indent_level = 0) const;
@@ -274,9 +278,12 @@ public:
 PUBLISHED:
   INLINE const GeomVertexArrayData *get_object() const;
   INLINE GeomVertexArrayData *get_object();
+  MAKE_PROPERTY(object, get_object);
 
   INLINE const GeomVertexArrayFormat *get_array_format() const;
   INLINE UsageHint get_usage_hint() const;
+  MAKE_PROPERTY(array_format, get_array_format);
+  MAKE_PROPERTY(usage_hint, get_usage_hint);
 
   INLINE int get_num_rows() const;
   bool set_num_rows(int n);
@@ -286,6 +293,8 @@ PUBLISHED:
 
   INLINE size_t get_data_size_bytes() const;
   INLINE UpdateSeq get_modified() const;
+  MAKE_PROPERTY(data_size_bytes, get_data_size_bytes);
+  MAKE_PROPERTY(modified, get_modified);
 
   INLINE bool request_resident() const;
 

+ 5 - 0
panda/src/gobj/geomVertexArrayFormat.h

@@ -81,17 +81,22 @@ PUBLISHED:
 
   INLINE bool is_registered() const;
   INLINE static CPT(GeomVertexArrayFormat) register_format(const GeomVertexArrayFormat *format);
+  MAKE_PROPERTY(registered, is_registered);
 
   INLINE int get_stride() const;
   INLINE void set_stride(int stride);
+  MAKE_PROPERTY(stride, get_stride, set_stride);
 
   INLINE int get_pad_to() const;
   INLINE void set_pad_to(int pad_to);
+  MAKE_PROPERTY(pad_to, get_pad_to, set_pad_to);
 
   INLINE int get_divisor() const;
   INLINE void set_divisor(int divisor);
+  MAKE_PROPERTY(divisor, get_divisor, set_divisor);
 
   INLINE int get_total_bytes() const;
+  MAKE_PROPERTY(total_bytes, get_total_bytes);
 
   int add_column(CPT_InternalName name, int num_components,
                  NumericType numeric_type, Contents contents,

+ 7 - 0
panda/src/gobj/geomVertexData.h

@@ -94,13 +94,16 @@ PUBLISHED:
 
   INLINE const string &get_name() const;
   void set_name(const string &name);
+  MAKE_PROPERTY(name, get_name, set_name);
 
   INLINE UsageHint get_usage_hint() const;
   void set_usage_hint(UsageHint usage_hint);
+  MAKE_PROPERTY(usage_hint, get_usage_hint, set_usage_hint);
 
   INLINE const GeomVertexFormat *get_format() const;
   void set_format(const GeomVertexFormat *format);
   void unclean_set_format(const GeomVertexFormat *format);
+  MAKE_PROPERTY(format, get_format, set_format);
 
   INLINE bool has_column(const InternalName *name) const;
 
@@ -119,6 +122,7 @@ PUBLISHED:
   INLINE const TransformTable *get_transform_table() const;
   void set_transform_table(const TransformTable *table);
   INLINE void clear_transform_table();
+  MAKE_PROPERTY(transform_table, get_transform_table, set_transform_table);
 
   INLINE CPT(TransformBlendTable) get_transform_blend_table() const;
   PT(TransformBlendTable) modify_transform_blend_table();
@@ -128,9 +132,12 @@ PUBLISHED:
   INLINE const SliderTable *get_slider_table() const;
   void set_slider_table(const SliderTable *table);
   INLINE void clear_slider_table();
+  MAKE_PROPERTY(slider_table, get_slider_table, set_slider_table);
 
   INLINE int get_num_bytes() const;
   INLINE UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const;
+  MAKE_PROPERTY(num_bytes, get_num_bytes);
+  MAKE_PROPERTY(modified, get_modified);
 
   bool request_resident() const;
 

+ 2 - 0
panda/src/gobj/geomVertexFormat.h

@@ -71,9 +71,11 @@ PUBLISHED:
   INLINE bool is_registered() const;
   INLINE static CPT(GeomVertexFormat) register_format(const GeomVertexFormat *format);
   INLINE static CPT(GeomVertexFormat) register_format(const GeomVertexArrayFormat *format);
+  MAKE_PROPERTY(registered, is_registered);
 
   INLINE const GeomVertexAnimationSpec &get_animation() const;
   INLINE void set_animation(const GeomVertexAnimationSpec &animation);
+  MAKE_PROPERTY(animation, get_animation, set_animation);
 
   CPT(GeomVertexFormat) get_post_animated_format() const;
   CPT(GeomVertexFormat) get_union_format(const GeomVertexFormat *other) const;

+ 4 - 0
panda/src/gobj/internalName.h

@@ -62,6 +62,10 @@ PUBLISHED:
   string join(const string &sep) const;
   INLINE const string &get_basename() const;
 
+  MAKE_PROPERTY(parent, get_parent);
+  MAKE_PROPERTY(name, get_name);
+  MAKE_PROPERTY(basename, get_basename);
+
   int find_ancestor(const string &basename) const;
   const InternalName *get_ancestor(int n) const;
   const InternalName *get_top() const;

+ 2 - 0
panda/src/gobj/lens.h

@@ -74,6 +74,8 @@ PUBLISHED:
 
   void set_coordinate_system(CoordinateSystem cs);
   INLINE CoordinateSystem get_coordinate_system() const;
+  MAKE_PROPERTY(coordinate_system, get_coordinate_system,
+                                   set_coordinate_system);
 
   void clear();
 

+ 11 - 0
panda/src/gobj/material.h

@@ -44,29 +44,40 @@ PUBLISHED:
   INLINE const LColor &get_ambient() const;
   void set_ambient(const LColor &color);
   INLINE void clear_ambient();
+  MAKE_PROPERTY2(ambient, has_ambient, get_ambient,
+                          set_ambient, clear_ambient);
 
   INLINE bool has_diffuse() const;
   INLINE const LColor &get_diffuse() const;
   void set_diffuse(const LColor &color);
   INLINE void clear_diffuse();
+  MAKE_PROPERTY2(diffuse, has_diffuse, get_diffuse,
+                          set_diffuse, clear_diffuse);
 
   INLINE bool has_specular() const;
   INLINE const LColor &get_specular() const;
   void set_specular(const LColor &color);
   INLINE void clear_specular();
+  MAKE_PROPERTY2(specular, has_specular, get_specular,
+                           set_specular, clear_specular);
 
   INLINE bool has_emission() const;
   INLINE const LColor &get_emission() const;
   void set_emission(const LColor &color);
   INLINE void clear_emission();
+  MAKE_PROPERTY2(emission, has_emission, get_emission,
+                           set_emission, clear_emission);
 
   INLINE PN_stdfloat get_shininess() const;
   INLINE void set_shininess(PN_stdfloat shininess);
+  MAKE_PROPERTY(shininess, get_shininess, set_shininess);
 
   INLINE bool get_local() const;
   INLINE void set_local(bool local);
   INLINE bool get_twoside() const;
   INLINE void set_twoside(bool twoside);
+  MAKE_PROPERTY(local, get_local, set_local);
+  MAKE_PROPERTY(twoside, get_twoside, set_twoside);
 
   INLINE bool operator == (const Material &other) const;
   INLINE bool operator != (const Material &other) const;

+ 1 - 0
panda/src/gobj/matrixLens.h

@@ -39,6 +39,7 @@ public:
 PUBLISHED:
   INLINE void set_user_mat(const LMatrix4 &user_mat);
   INLINE const LMatrix4 &get_user_mat() const;
+  MAKE_PROPERTY(user_mat, get_user_mat, set_user_mat);
 
   INLINE void set_left_eye_mat(const LMatrix4 &user_mat);
   INLINE void clear_left_eye_mat();

+ 9 - 0
panda/src/gobj/paramTexture.h

@@ -37,6 +37,9 @@ PUBLISHED:
   INLINE Texture *get_texture() const;
   INLINE const SamplerState &get_sampler() const;
 
+  MAKE_PROPERTY(texture, get_texture);
+  MAKE_PROPERTY(sampler, get_sampler);
+
   virtual void output(ostream &out) const;
 
 private:
@@ -102,6 +105,12 @@ PUBLISHED:
   INLINE int get_bind_level() const;
   INLINE int get_bind_layer() const;
 
+  MAKE_PROPERTY(texture, get_texture);
+  MAKE_PROPERTY(read_access, has_read_access);
+  MAKE_PROPERTY(write_access, has_write_access);
+  MAKE_PROPERTY(bind_level, get_bind_level);
+  MAKE_PROPERTY2(bind_layer, get_bind_layered, get_bind_layer);
+
   virtual void output(ostream &out) const;
 
 private:

+ 1 - 0
panda/src/gobj/shaderContext.h

@@ -52,6 +52,7 @@ public:
 
 PUBLISHED:
   INLINE Shader *get_shader() const;
+  MAKE_PROPERTY(shader, get_shader);
 
 public:
   Shader *_shader;

+ 2 - 1
panda/src/gobj/sliderTable.h

@@ -57,7 +57,8 @@ PUBLISHED:
   INLINE const SparseArray &find_sliders(const InternalName *name) const;
   INLINE bool has_slider(const InternalName *name) const;
   INLINE bool is_empty() const;
-  INLINE UpdateSeq get_modified(Thread *current_thread) const;
+  INLINE UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const;
+  MAKE_PROPERTY(modified, get_modified);
 
   void set_slider(size_t n, const VertexSlider *slider);
   void set_slider_rows(size_t n, const SparseArray &rows);

+ 13 - 0
panda/src/gobj/texture.I

@@ -334,6 +334,19 @@ set_clear_color(const LColor &color) {
   cdata->_has_clear_color = true;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: Texture::clear_clear_color
+//       Access: Published
+//  Description: The opposite of set_clear_color.  If the image is
+//               cleared after setting this, its contents may be
+//               undefined (or may in fact not be cleared at all).
+////////////////////////////////////////////////////////////////////
+INLINE void Texture::
+clear_clear_color() {
+  CDWriter cdata(_cycler, true);
+  cdata->_has_clear_color = true;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: Texture::get_clear_data
 //       Access: Published

+ 24 - 0
panda/src/gobj/texture.h

@@ -260,7 +260,10 @@ PUBLISHED:
   INLINE bool has_clear_color() const;
   INLINE LColor get_clear_color() const;
   INLINE void set_clear_color(const LColor &color);
+  INLINE void clear_clear_color();
   INLINE string get_clear_data() const;
+  MAKE_PROPERTY2(clear_color, has_clear_color, get_clear_color,
+                              set_clear_color, clear_clear_color);
 
   BLOCKING bool read(const Filename &fullpath, const LoaderOptions &options = LoaderOptions());
   BLOCKING bool read(const Filename &fullpath, const Filename &alpha_fullpath,
@@ -301,11 +304,15 @@ PUBLISHED:
   INLINE const Filename &get_filename() const;
   INLINE bool has_alpha_filename() const;
   INLINE const Filename &get_alpha_filename() const;
+  MAKE_PROPERTY2(filename, has_filename, get_filename);
+  MAKE_PROPERTY2(alpha_filename, has_alpha_filename, get_alpha_filename);
 
   INLINE bool has_fullpath() const;
   INLINE const Filename &get_fullpath() const;
   INLINE bool has_alpha_fullpath() const;
   INLINE const Filename &get_alpha_fullpath() const;
+  MAKE_PROPERTY2(fullpath, has_fullpath, get_fullpath);
+  MAKE_PROPERTY2(alpha_fullpath, has_alpha_fullpath, get_alpha_fullpath);
 
   INLINE int get_x_size() const;
   INLINE int get_y_size() const;
@@ -318,6 +325,14 @@ PUBLISHED:
   INLINE Format get_format() const;
   INLINE ComponentType get_component_type() const;
   INLINE GeomEnums::UsageHint get_usage_hint() const;
+  MAKE_PROPERTY(num_views, get_num_views);
+  MAKE_PROPERTY(num_pages, get_num_pages);
+  MAKE_PROPERTY(num_components, get_num_components);
+  MAKE_PROPERTY(component_width, get_component_width);
+  MAKE_PROPERTY(texture_type, get_texture_type);
+  MAKE_PROPERTY(format, get_format);
+  MAKE_PROPERTY(component_type, get_component_type);
+  MAKE_PROPERTY(usage_hint, get_usage_hint);
 
   INLINE void set_wrap_u(WrapMode wrap);
   INLINE void set_wrap_v(WrapMode wrap);
@@ -345,10 +360,14 @@ PUBLISHED:
   INLINE bool has_compression() const;
   INLINE bool get_render_to_texture() const;
   INLINE bool uses_mipmaps() const;
+  MAKE_PROPERTY(default_sampler, get_default_sampler, set_default_sampler);
+  MAKE_PROPERTY(compression, get_compression, set_compression);
 
   INLINE void set_quality_level(QualityLevel quality_level);
   INLINE QualityLevel get_quality_level() const;
   INLINE QualityLevel get_effective_quality_level() const;
+  MAKE_PROPERTY(quality_level, get_quality_level, set_quality_level);
+  MAKE_PROPERTY(effective_quality_level, get_effective_quality_level);
 
   INLINE int get_expected_num_mipmap_levels() const;
   INLINE int get_expected_mipmap_x_size(int n) const;
@@ -420,10 +439,15 @@ PUBLISHED:
   INLINE UpdateSeq get_properties_modified() const;
   INLINE UpdateSeq get_image_modified() const;
   INLINE UpdateSeq get_simple_image_modified() const;
+  MAKE_PROPERTY(properties_modified, get_properties_modified);
+  MAKE_PROPERTY(image_modified, get_image_modified);
+  MAKE_PROPERTY(simple_image_modified, get_simple_image_modified);
 
   INLINE void set_auto_texture_scale(AutoTextureScale scale);
   INLINE AutoTextureScale get_auto_texture_scale() const;
   INLINE bool has_auto_texture_scale() const;
+  MAKE_PROPERTY(auto_texture_scale, get_auto_texture_scale,
+                                    set_auto_texture_scale);
 
   void prepare(PreparedGraphicsObjects *prepared_objects);
   bool is_prepared(PreparedGraphicsObjects *prepared_objects) const;

+ 18 - 0
panda/src/gobj/textureStage.h

@@ -188,6 +188,24 @@ PUBLISHED:
 
   INLINE static TextureStage *get_default();
 
+PUBLISHED:
+  MAKE_PROPERTY(name, get_name, set_name);
+  MAKE_PROPERTY(sort, get_sort, set_sort);
+  MAKE_PROPERTY(priority, get_priority, set_priority);
+
+  MAKE_PROPERTY(texcoord_name, get_texcoord_name, set_texcoord_name);
+  MAKE_PROPERTY(tangent_name, get_tangent_name);
+  MAKE_PROPERTY(binormal_name, get_binormal_name);
+
+  MAKE_PROPERTY(mode, get_mode, set_mode);
+
+  MAKE_PROPERTY(color, get_color, set_color);
+  MAKE_PROPERTY(rgb_scale, get_rgb_scale, set_rgb_scale);
+  MAKE_PROPERTY(alpha_scale, get_alpha_scale, set_alpha_scale);
+  MAKE_PROPERTY(saved_result, get_saved_result, set_saved_result);
+
+  MAKE_PROPERTY(tex_view_offset, get_tex_view_offset, set_tex_view_offset);
+
 public:
   INLINE static UpdateSeq get_sort_seq();
 

+ 2 - 1
panda/src/gobj/transformBlend.h

@@ -81,7 +81,8 @@ PUBLISHED:
   INLINE void transform_point(LPoint3d &point, Thread *current_thread) const;
   INLINE void transform_vector(LVector3d &point, Thread *current_thread) const;
 
-  INLINE UpdateSeq get_modified(Thread *current_thread) const;
+  INLINE UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const;
+  MAKE_PROPERTY(modified, get_modified);
 
   void output(ostream &out) const;
   void write(ostream &out, int indent_level) const;

+ 4 - 1
panda/src/gobj/vertexSlider.h

@@ -44,9 +44,12 @@ PUBLISHED:
   virtual ~VertexSlider();
 
   INLINE const InternalName *get_name() const;
+  MAKE_PROPERTY(name, get_name);
 
   virtual PN_stdfloat get_slider() const=0;
-  INLINE UpdateSeq get_modified(Thread *current_thread) const;
+  INLINE UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const;
+  MAKE_PROPERTY(slider, get_slider);
+  MAKE_PROPERTY(modified, get_modified);
 
   virtual void output(ostream &out) const;
   virtual void write(ostream &out, int indent_level) const;

+ 2 - 1
panda/src/gobj/vertexTransform.h

@@ -45,7 +45,8 @@ PUBLISHED:
   virtual void mult_matrix(LMatrix4 &result, const LMatrix4 &previous) const;
   virtual void accumulate_matrix(LMatrix4 &accum, PN_stdfloat weight) const;
 
-  INLINE UpdateSeq get_modified(Thread *current_thread) const;
+  INLINE UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const;
+  MAKE_PROPERTY(modified, get_modified);
 
   virtual void output(ostream &out) const;
   virtual void write(ostream &out, int indent_level) const;

+ 2 - 0
panda/src/gobj/videoTexture.h

@@ -38,6 +38,8 @@ PUBLISHED:
 
   INLINE int get_video_width() const;
   INLINE int get_video_height() const;
+  MAKE_PROPERTY(video_width, get_video_width);
+  MAKE_PROPERTY(video_height, get_video_height);
 
 public:
   virtual bool has_cull_callback() const;

+ 12 - 1
panda/src/grutil/movieTexture.h

@@ -62,7 +62,18 @@ PUBLISHED:
   bool   is_playing() const;
   void   synchronize_to(AudioSound *sound);
   void   unsynchronize();
-  
+
+PUBLISHED:
+  MAKE_PROPERTY(video_length, get_video_length);
+  MAKE_PROPERTY(video_width, get_video_width);
+  MAKE_PROPERTY(video_height, get_video_height);
+
+  MAKE_PROPERTY(time, get_time, set_time);
+  MAKE_PROPERTY(loop, get_loop, set_loop);
+  MAKE_PROPERTY(loop_count, get_loop_count, set_loop_count);
+  MAKE_PROPERTY(play_rate, get_play_rate, set_play_rate);
+  MAKE_PROPERTY(playing, is_playing);
+
 public:
   virtual void ensure_loader_type(const Filename &filename);
 

+ 2 - 0
panda/src/grutil/nodeVertexTransform.h

@@ -37,6 +37,8 @@ PUBLISHED:
 
   INLINE const PandaNode *get_node() const;
   INLINE const VertexTransform *get_prev() const;
+  MAKE_PROPERTY(node, get_node);
+  MAKE_PROPERTY(prev, get_prev);
 
   virtual void get_matrix(LMatrix4 &matrix) const;
 

+ 1 - 0
panda/src/grutil/rigidBodyCombiner.h

@@ -60,6 +60,7 @@ PUBLISHED:
   void collect();
 
   NodePath get_internal_scene();
+  MAKE_PROPERTY(internal_scene, get_internal_scene);
 
 public:
   // From parent class PandaNode

+ 6 - 0
panda/src/particlesystem/particleSystem.cxx

@@ -247,6 +247,12 @@ spawn_child_system(BaseParticle *bp) {
     return;
   }
 
+  if (_spawn_templates.size() == 0) {
+    physics_cat.error() << "ParticleSystem::spawn_child_system: "
+                        << "no spawn templates presesnt." << endl;
+    return;
+  }
+
   NodePath physical_np = get_physical_node_path();
   NodePath parent_np = physical_np.get_parent();
 

+ 3 - 1
panda/src/pgraph/cacheStats.cxx

@@ -24,7 +24,9 @@
 void CacheStats::
 init() {
 #ifndef NDEBUG
-  reset(ClockObject::get_global_clock()->get_real_time());
+  // Let's not use the clock at static init time.
+  reset(0.0);
+  //reset(ClockObject::get_global_clock()->get_real_time());
   _total_cache_size = 0;
   _num_states = 0;
 

+ 5 - 0
panda/src/pgraph/fog.h

@@ -65,25 +65,30 @@ PUBLISHED:
 
   INLINE Mode get_mode() const;
   INLINE void set_mode(Mode mode);
+  MAKE_PROPERTY(mode, get_mode, set_mode);
 
   INLINE const LColor &get_color() const;
   INLINE void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b);
   INLINE void set_color(const LColor &color);
+  MAKE_PROPERTY(color, get_color, set_color);
 
   INLINE void set_linear_range(PN_stdfloat onset, PN_stdfloat opaque);
 
   INLINE const LPoint3 &get_linear_onset_point() const;
   INLINE void set_linear_onset_point(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
   INLINE void set_linear_onset_point(const LPoint3 &linear_onset_point);
+  MAKE_PROPERTY(linear_onset_point, get_linear_onset_point, set_linear_onset_point);
 
   INLINE const LPoint3 &get_linear_opaque_point() const;
   INLINE void set_linear_opaque_point(const LPoint3 &linear_opaque_point);
   INLINE void set_linear_opaque_point(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
+  MAKE_PROPERTY(linear_opaque_point, get_linear_opaque_point, set_linear_opaque_point);
 
   INLINE void set_linear_fallback(PN_stdfloat angle, PN_stdfloat onset, PN_stdfloat opaque);
 
   INLINE PN_stdfloat get_exp_density() const;
   INLINE void set_exp_density(PN_stdfloat exp_density);
+  MAKE_PROPERTY(exp_density, get_exp_density, set_exp_density);
 
   void output(ostream &out) const;
 

+ 1 - 1
panda/src/pgraph/modelRoot.h

@@ -31,7 +31,7 @@
 class EXPCL_PANDA_PGRAPH ModelRoot : public ModelNode {
 PUBLISHED:
   INLINE ModelRoot(const string &name);
-  INLINE ModelRoot(const Filename &fulllpath, time_t timestamp);
+  INLINE ModelRoot(const Filename &fullpath, time_t timestamp);
 
   INLINE int get_model_ref_count() const;
   MAKE_PROPERTY(model_ref_count, get_model_ref_count);

+ 15 - 15
panda/src/pgraph/nodePath.cxx

@@ -4860,9 +4860,9 @@ get_fog() const {
 void NodePath::
 set_render_mode_wireframe(int priority) {
   nassertv_always(!is_empty());
-  PN_stdfloat thickness = get_render_mode_thickness();
-  bool perspective = get_render_mode_perspective();
-  node()->set_attrib(RenderModeAttrib::make(RenderModeAttrib::M_wireframe, thickness, perspective), priority);
+  const RenderModeAttrib *rma;
+  node()->get_state()->get_attrib_def(rma);
+  node()->set_attrib(RenderModeAttrib::make(RenderModeAttrib::M_wireframe, rma->get_thickness(), rma->get_perspective()), priority);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -4875,9 +4875,9 @@ set_render_mode_wireframe(int priority) {
 void NodePath::
 set_render_mode_filled(int priority) {
   nassertv_always(!is_empty());
-  PN_stdfloat thickness = get_render_mode_thickness();
-  bool perspective = get_render_mode_perspective();
-  node()->set_attrib(RenderModeAttrib::make(RenderModeAttrib::M_filled, thickness, perspective), priority);
+  const RenderModeAttrib *rma;
+  node()->get_state()->get_attrib_def(rma);
+  node()->set_attrib(RenderModeAttrib::make(RenderModeAttrib::M_filled, rma->get_thickness(), rma->get_perspective()), priority);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -4891,9 +4891,9 @@ set_render_mode_filled(int priority) {
 void NodePath::
 set_render_mode_filled_wireframe(const LColor &wireframe_color, int priority) {
   nassertv_always(!is_empty());
-  PN_stdfloat thickness = get_render_mode_thickness();
-  bool perspective = get_render_mode_perspective();
-  node()->set_attrib(RenderModeAttrib::make(RenderModeAttrib::M_filled_wireframe, thickness, perspective, wireframe_color), priority);
+  const RenderModeAttrib *rma;
+  node()->get_state()->get_attrib_def(rma);
+  node()->set_attrib(RenderModeAttrib::make(RenderModeAttrib::M_filled_wireframe, rma->get_thickness(), rma->get_perspective(), wireframe_color), priority);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -4914,9 +4914,9 @@ set_render_mode_filled_wireframe(const LColor &wireframe_color, int priority) {
 void NodePath::
 set_render_mode_perspective(bool perspective, int priority) {
   nassertv_always(!is_empty());
-  RenderModeAttrib::Mode mode = get_render_mode();
-  PN_stdfloat thickness = get_render_mode_thickness();
-  node()->set_attrib(RenderModeAttrib::make(mode, thickness, perspective), priority);
+  const RenderModeAttrib *rma;
+  node()->get_state()->get_attrib_def(rma);
+  node()->set_attrib(RenderModeAttrib::make(rma->get_mode(), rma->get_thickness(), perspective, rma->get_wireframe_color()), priority);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -4935,9 +4935,9 @@ set_render_mode_perspective(bool perspective, int priority) {
 void NodePath::
 set_render_mode_thickness(PN_stdfloat thickness, int priority) {
   nassertv_always(!is_empty());
-  RenderModeAttrib::Mode mode = get_render_mode();
-  bool perspective = get_render_mode_perspective();
-  node()->set_attrib(RenderModeAttrib::make(mode, thickness, perspective), priority);
+  const RenderModeAttrib *rma;
+  node()->get_state()->get_attrib_def(rma);
+  node()->set_attrib(RenderModeAttrib::make(rma->get_mode(), thickness, rma->get_perspective(), rma->get_wireframe_color()), priority);
 }
 
 ////////////////////////////////////////////////////////////////////

+ 2 - 0
panda/src/pgraphnodes/callbackNode.h

@@ -32,10 +32,12 @@ PUBLISHED:
   INLINE void set_cull_callback(CallbackObject *object);
   INLINE void clear_cull_callback();
   INLINE CallbackObject *get_cull_callback() const;
+  MAKE_PROPERTY(cull_callback, get_cull_callback, set_cull_callback);
 
   INLINE void set_draw_callback(CallbackObject *object);
   INLINE void clear_draw_callback();
   INLINE CallbackObject *get_draw_callback() const;
+  MAKE_PROPERTY(draw_callback, get_draw_callback, set_draw_callback);
 
 public:
   CallbackNode(const CallbackNode &copy);

+ 5 - 0
panda/src/pgraphnodes/fadeLodNode.h

@@ -37,13 +37,18 @@ public:
 PUBLISHED:
   INLINE void set_fade_time(PN_stdfloat t);
   INLINE PN_stdfloat get_fade_time() const;
+  MAKE_PROPERTY(fade_time, get_fade_time, set_fade_time);
 
   void set_fade_bin(const string &name, int draw_order);
   INLINE const string &get_fade_bin_name() const;
   INLINE int get_fade_bin_draw_order() const;
+  MAKE_PROPERTY(fade_bin_name, get_fade_bin_name);
+  MAKE_PROPERTY(fade_bin_draw_order, get_fade_bin_draw_order);
 
   void set_fade_state_override(int override);
   INLINE int get_fade_state_override() const;
+  MAKE_PROPERTY(fade_state_override, get_fade_state_override,
+                                     set_fade_state_override);
 
 private:
   CPT(RenderState) get_fade_1_old_state();

+ 3 - 0
panda/src/pgraphnodes/spotlight.h

@@ -53,12 +53,15 @@ public:
 PUBLISHED:
   INLINE PN_stdfloat get_exponent() const FINAL;
   INLINE void set_exponent(PN_stdfloat exponent);
+  MAKE_PROPERTY(exponent, get_exponent, set_exponent);
 
   INLINE const LColor &get_specular_color() const FINAL;
   INLINE void set_specular_color(const LColor &color);
+  MAKE_PROPERTY(specular_color, get_specular_color, set_specular_color);
 
   INLINE const LVecBase3 &get_attenuation() const FINAL;
   INLINE void set_attenuation(const LVecBase3 &attenuation);
+  MAKE_PROPERTY(attenuation, get_attenuation, set_attenuation);
 
   virtual int get_class_priority() const;
 

+ 2 - 0
panda/src/pgraphnodes/switchNode.h

@@ -43,6 +43,8 @@ PUBLISHED:
   INLINE void set_visible_child(int index);
   virtual int get_visible_child() const;
 
+  MAKE_PROPERTY(visible_child, get_visible_child, set_visible_child);
+
 private:
   class EXPCL_PANDA_PGRAPHNODES CData : public CycleData {
   public:

+ 6 - 0
panda/src/pgraphnodes/uvScrollNode.h

@@ -50,6 +50,12 @@ PUBLISHED:
   INLINE PN_stdfloat get_w_speed() const;
   INLINE PN_stdfloat get_r_speed() const;
 
+PUBLISHED:
+  MAKE_PROPERTY(u_speed, get_u_speed, set_u_speed);
+  MAKE_PROPERTY(v_speed, get_v_speed, set_v_speed);
+  MAKE_PROPERTY(w_speed, get_w_speed, set_w_speed);
+  MAKE_PROPERTY(r_speed, get_r_speed, set_r_speed);
+
 private:
   PN_stdfloat _u_speed;
   PN_stdfloat _v_speed;

+ 2 - 0
panda/src/pnmimage/pfmFile.h

@@ -52,9 +52,11 @@ PUBLISHED:
   BLOCKING bool store_mask(PNMImage &pnmimage) const;
 
   INLINE bool is_valid() const;
+  MAKE_PROPERTY(valid, is_valid);
 
   INLINE PN_float32 get_scale() const;
   INLINE void set_scale(PN_float32 scale);
+  MAKE_PROPERTY(scale, get_scale, set_scale);
 
   INLINE bool has_point(int x, int y) const;
   INLINE PN_float32 get_channel(int x, int y, int c) const;

+ 12 - 0
panda/src/pnmimage/pnmImageHeader.I

@@ -191,6 +191,18 @@ get_y_size() const {
   return _y_size;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: PNMImageHeader::get_size
+//       Access: Published
+//  Description: Returns the number of pixels in each direction.
+//               This is one more than the largest allowable
+//               coordinates.
+////////////////////////////////////////////////////////////////////
+INLINE LVecBase2i PNMImageHeader::
+get_size() const {
+  return LVecBase2i(_x_size, _y_size);
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: PNMImageHeader::get_comment
 //       Access: Published

+ 8 - 0
panda/src/pnmimage/pnmImageHeader.h

@@ -25,6 +25,7 @@
 #include "pmap.h"
 #include "pvector.h"
 #include "colorSpace.h"
+#include "lvecBase2.h"
 
 class PNMFileType;
 class PNMReader;
@@ -60,6 +61,7 @@ PUBLISHED:
 
   INLINE ColorType get_color_type() const;
   INLINE int get_num_channels() const;
+  MAKE_PROPERTY(num_channels, get_num_channels);
 
   INLINE static bool is_grayscale(ColorType color_type);
   INLINE bool is_grayscale() const;
@@ -69,16 +71,22 @@ PUBLISHED:
 
   INLINE xelval get_maxval() const;
   INLINE ColorSpace get_color_space() const;
+  MAKE_PROPERTY(maxval, get_maxval);
+  MAKE_PROPERTY(color_space, get_color_space);
 
   INLINE int get_x_size() const;
   INLINE int get_y_size() const;
+  INLINE LVecBase2i get_size() const;
+  MAKE_PROPERTY(size, get_size);
 
   INLINE string get_comment() const;
   INLINE void set_comment(const string &comment);
+  MAKE_PROPERTY(comment, get_comment, set_comment);
 
   INLINE bool has_type() const;
   INLINE PNMFileType *get_type() const;
   INLINE void set_type(PNMFileType *type);
+  MAKE_PROPERTY2(type, has_type, get_type);
 
   BLOCKING bool read_header(const Filename &filename, PNMFileType *type = NULL,
                             bool report_unknown_type = true);

+ 3 - 0
panda/src/pnmimage/pnmPainter.h

@@ -41,6 +41,9 @@ PUBLISHED:
   INLINE void set_fill(PNMBrush *fill);
   INLINE PNMBrush *get_fill() const;
 
+  MAKE_PROPERTY(pen, get_pen, set_pen);
+  MAKE_PROPERTY(fill, get_fill, set_fill);
+
   INLINE void draw_point(float x, float y);
   void draw_line(float xa, float ya, float xb, float yb);
   void draw_rectangle(float xa, float ya, float xb, float yb);

+ 12 - 0
panda/src/putil/animInterface.h

@@ -66,6 +66,18 @@ PUBLISHED:
 
   virtual void output(ostream &out) const;
 
+PUBLISHED:
+  MAKE_PROPERTY(play_rate, get_play_rate, set_play_rate);
+  MAKE_PROPERTY(frame_rate, get_frame_rate);
+  MAKE_PROPERTY(num_frames, get_num_frames);
+
+  MAKE_PROPERTY(frame, get_frame);
+  MAKE_PROPERTY(next_frame, get_next_frame);
+  MAKE_PROPERTY(frac, get_frac);
+  MAKE_PROPERTY(full_frame, get_full_frame);
+  MAKE_PROPERTY(full_fframe, get_full_fframe);
+  MAKE_PROPERTY(playing, is_playing);
+
 protected:
   INLINE void set_frame_rate(double frame_rate);
   INLINE void set_num_frames(int num_frames);

+ 11 - 0
panda/src/putil/bamCache.h

@@ -86,6 +86,17 @@ PUBLISHED:
   INLINE static void consider_flush_global_index();
   INLINE static void flush_global_index();
 
+PUBLISHED:
+  MAKE_PROPERTY(active, get_active, set_active);
+  MAKE_PROPERTY(cache_models, get_cache_models, set_cache_models);
+  MAKE_PROPERTY(cache_textures, get_cache_textures, set_cache_textures);
+  MAKE_PROPERTY(cache_compressed_textures, get_cache_compressed_textures,
+                                           set_cache_compressed_textures);
+  MAKE_PROPERTY(root, get_root, set_root);
+  MAKE_PROPERTY(flush_time, get_flush_time, set_flush_time);
+  MAKE_PROPERTY(cache_max_kbytes, get_cache_max_kbytes, set_cache_max_kbytes);
+  MAKE_PROPERTY(read_only, get_read_only, set_read_only);
+
 private:
   void read_index();
   bool read_index_pathname(Filename &index_pathname,

+ 5 - 0
panda/src/putil/bamCacheRecord.h

@@ -55,6 +55,11 @@ PUBLISHED:
   INLINE time_t get_source_timestamp() const;
   INLINE time_t get_recorded_time() const;
 
+  MAKE_PROPERTY(source_pathname, get_source_pathname);
+  MAKE_PROPERTY(cache_filename, get_cache_filename);
+  MAKE_PROPERTY(source_timestamp, get_source_timestamp);
+  MAKE_PROPERTY(recorded_time, get_recorded_time);
+
   INLINE int get_num_dependent_files() const;
   INLINE const Filename &get_dependent_pathname(int n) const;
 

+ 9 - 1
panda/src/putil/bamReader.h

@@ -143,7 +143,7 @@ PUBLISHED:
 
   INLINE const LoaderOptions &get_loader_options() const;
   INLINE void set_loader_options(const LoaderOptions &options);
-  
+
   TypedWritable *read_object();
   bool read_object(TypedWritable *&ptr, ReferenceCount *&ref_ptr);
 
@@ -160,6 +160,14 @@ PUBLISHED:
   INLINE int get_current_major_ver() const;
   INLINE int get_current_minor_ver() const;
 
+PUBLISHED:
+  MAKE_PROPERTY(source, get_source, set_source);
+  MAKE_PROPERTY(filename, get_filename);
+  MAKE_PROPERTY(loader_options, get_loader_options, set_loader_options);
+
+  MAKE_PROPERTY(file_endian, get_file_endian);
+  MAKE_PROPERTY(file_stdfloat_double, get_file_stdfloat_double);
+
 public:
   // Functions to support classes that read themselves from the Bam.
 

+ 7 - 0
panda/src/putil/bamWriter.h

@@ -90,6 +90,13 @@ PUBLISHED:
   INLINE BamTextureMode get_file_texture_mode() const;
   INLINE void set_file_texture_mode(BamTextureMode file_texture_mode);
 
+PUBLISHED:
+  MAKE_PROPERTY(target, get_target, set_target);
+  MAKE_PROPERTY(filename, get_filename);
+  MAKE_PROPERTY(file_endian, get_file_endian);
+  MAKE_PROPERTY(file_stdfloat_double, get_file_stdfloat_double);
+  MAKE_PROPERTY(file_texture_mode, get_file_texture_mode);
+
 public:
   // Functions to support classes that write themselves to the Bam.
 

+ 2 - 0
panda/src/putil/buttonHandle.h

@@ -58,6 +58,8 @@ PUBLISHED:
 
   MAKE_PROPERTY(index, get_index);
   MAKE_PROPERTY(name, get_name);
+  MAKE_PROPERTY2(ascii_equivalent, has_ascii_equivalent,
+                                   get_ascii_equivalent);
   MAKE_PROPERTY(alias, get_alias);
 
 private:

+ 3 - 1
panda/src/putil/cachedTypedWritableReferenceCount.h

@@ -50,6 +50,8 @@ PUBLISHED:
   INLINE bool cache_unref() const;
   INLINE bool test_ref_count_integrity() const;
 
+  MAKE_PROPERTY(cache_ref_count, get_cache_ref_count);
+
 protected:
   INLINE void cache_unref_only() const;
   bool do_test_ref_count_integrity() const;
@@ -77,4 +79,4 @@ INLINE void cache_unref_delete(RefCountType *ptr);
 
 #include "cachedTypedWritableReferenceCount.I"
 
-#endif  
+#endif

+ 7 - 0
panda/src/text/textAssembler.h

@@ -107,6 +107,13 @@ PUBLISHED:
   static bool has_character(wchar_t character, const TextProperties &properties);
   static bool is_whitespace(wchar_t character, const TextProperties &properties);
 
+PUBLISHED:
+  MAKE_PROPERTY(usage_hint, get_usage_hint, set_usage_hint);
+  MAKE_PROPERTY(max_rows, get_max_rows, set_max_rows);
+  MAKE_PROPERTY(dynamic_merge, get_dynamic_merge, set_dynamic_merge);
+  MAKE_PROPERTY(multiline_mode, get_multiline_mode, set_multiline_mode);
+  MAKE_PROPERTY(properties, get_properties, set_properties);
+
 private:
   class ComputedProperties : public ReferenceCount {
   public:

+ 34 - 0
panda/src/text/textProperties.h

@@ -170,6 +170,40 @@ PUBLISHED:
 
   void write(ostream &out, int indent_level = 0) const;
 
+PUBLISHED:
+  MAKE_PROPERTY2(font, has_font, get_font, set_font, clear_font);
+  MAKE_PROPERTY2(small_caps, has_small_caps, get_small_caps,
+                             set_small_caps, clear_small_caps);
+  MAKE_PROPERTY2(small_caps_scale, has_small_caps_scale, get_small_caps_scale,
+                                   set_small_caps_scale, clear_small_caps_scale);
+  MAKE_PROPERTY2(slant, has_slant, get_slant, set_slant, clear_slant);
+  MAKE_PROPERTY2(underscore, has_underscore, get_underscore,
+                                 set_underscore, clear_underscore);
+  MAKE_PROPERTY2(underscore_height, has_underscore_height, get_underscore_height,
+                                    set_underscore_height, clear_underscore_height);
+  MAKE_PROPERTY2(align, has_align, get_align, set_align, clear_align);
+  MAKE_PROPERTY2(indent, has_indent, get_indent, set_indent, clear_indent);
+  MAKE_PROPERTY2(wordwrap, has_wordwrap, get_wordwrap, set_wordwrap, clear_wordwrap);
+  MAKE_PROPERTY2(preserve_trailing_whitespace,
+                 has_preserve_trailing_whitespace, get_preserve_trailing_whitespace,
+                 set_preserve_trailing_whitespace, clear_preserve_trailing_whitespace);
+  MAKE_PROPERTY2(text_color, has_text_color, get_text_color,
+                             set_text_color, clear_text_color);
+  MAKE_PROPERTY2(shadow_color, has_shadow_color, get_shadow_color,
+                               set_shadow_color, clear_shadow_color);
+  MAKE_PROPERTY2(shadow, has_shadow, get_shadow, set_shadow, clear_shadow);
+  MAKE_PROPERTY2(bin, has_bin, get_bin, set_bin, clear_bin);
+  MAKE_PROPERTY2(draw_order, has_draw_order, get_draw_order,
+                             set_draw_order, clear_draw_order);
+  MAKE_PROPERTY2(tab_width, has_tab_width, get_tab_width,
+                            set_tab_width, clear_tab_width);
+  MAKE_PROPERTY2(glyph_scale, has_glyph_scale, get_glyph_scale,
+                              set_glyph_scale, clear_glyph_scale);
+  MAKE_PROPERTY2(glyph_shift, has_glyph_shift, get_glyph_shift,
+                              set_glyph_shift, clear_glyph_shift);
+  MAKE_PROPERTY2(text_scale, has_text_scale, get_text_scale,
+                             set_text_scale, clear_text_scale);
+
 public:
   const RenderState *get_text_state() const;
   const RenderState *get_shadow_state() const;

Some files were not shown because too many files changed in this diff