diff --git a/direct/src/plugin/p3d_plugin.h b/direct/src/plugin/p3d_plugin.h index 51d0bfb32a..daadf03db5 100644 --- a/direct/src/plugin/p3d_plugin.h +++ b/direct/src/plugin/p3d_plugin.h @@ -348,7 +348,9 @@ P3D_object_get_float_method(const P3D_object *object); string (not counting any terminating null character). If the return value is larger than buffer_length, the string has been truncated. If it is equal, there is no null character written to - the buffer (like strncpy). */ + the buffer (like strncpy). You may call this method first with + buffer = NULL and buffer_length = 0 to return just the required + size of the buffer. */ typedef int P3D_object_get_string_method(const P3D_object *object, char *buffer, int buffer_length); diff --git a/direct/src/showutil/runp3d.py b/direct/src/showutil/runp3d.py index dbcfd2ea78..c068ce359a 100755 --- a/direct/src/showutil/runp3d.py +++ b/direct/src/showutil/runp3d.py @@ -354,9 +354,7 @@ class AppRunner(DirectObject): def scriptRequest(self, operation, object, propertyName = '', value = None, needsResponse = True): """ Issues a new script request to the browser. This queries - or modifies one of the browser's DOM properties. This method - blocks until the return value is received from the browser, - and then it returns that value. + or modifies one of the browser's DOM properties. operation may be one of [ 'get_property', 'set_property', 'call', 'evaluate' ]. @@ -370,6 +368,11 @@ class AppRunner(DirectObject): value is the new value to assign to the property for set_property, or the parameter list for call, or the string expression for evaluate. + + If needsResponse is true, this method will block until the + return value is received from the browser, and then it returns + that value. Otherwise, it returns None immediately, without + waiting for the browser to process the request. """ uniqueId = self.nextScriptId self.nextScriptId += 1